diff options
Diffstat (limited to 'Src/nprt_plugin')
541 files changed, 104837 insertions, 0 deletions
diff --git a/Src/nprt_plugin/Makefile.in b/Src/nprt_plugin/Makefile.in new file mode 100644 index 00000000..f5de94fa --- /dev/null +++ b/Src/nprt_plugin/Makefile.in @@ -0,0 +1,68 @@ +############################################################################ +## Makefile.in (Generic SANE Plugin Tree) +## +## 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. +## Contributor(s): +## +## Rusty Lynch <rusty.lynch@intel.com> +############################################################################ + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = plugin +LIBRARY_NAME = nprt +ifeq ($(OS_ARCH),WINNT) +RESFILE = nprt.res +DEFFILE = $(srcdir)/nprt.def +endif + +# plugins should always be shared, even in the "static" build +FORCE_SHARED_LIB = 1 + +# Force use of PIC +FORCE_USE_PIC = 1 + +NO_DIST_INSTALL = 1 +NO_INSTALL = 1 + +CPPSRCS = \ + np_entry.cpp \ + npn_gate.cpp \ + npp_gate.cpp \ + plugin.cpp \ + $(NULL) + +REQUIRES = \ + plugin \ + java \ + $(NULL) + +LOCAL_INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../public \ + -I/usr/lib/glib/include + +include $(topsrcdir)/config/rules.mk + +install-plugin: $(SHARED_LIBRARY) +ifdef SHARED_LIBRARY + $(INSTALL) $(SHARED_LIBRARY) $(DIST)/bin/plugins +endif + +libs:: install-plugin + +install:: $(SHARED_LIBRARY) +ifdef SHARED_LIBRARY + $(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)/plugins +endif diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/domstubs.idl b/Src/nprt_plugin/gecko/1.8/win/idl/domstubs.idl new file mode 100644 index 00000000..a1851c0d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/domstubs.idl @@ -0,0 +1,127 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +typedef unsigned long long DOMTimeStamp; + +// Core +interface nsIDOMAttr; +interface nsIDOMCDATASection; +interface nsIDOMCharacterData; +interface nsIDOMComment; +interface nsIDOMDOMImplementation; +interface nsIDOMDocument; +interface nsIDOMDocumentFragment; +interface nsIDOMDocumentType; +interface nsIDOMElement; +interface nsIDOMEntity; +interface nsIDOMEntityReference; +interface nsIDOMNSDocument; +interface nsIDOMNamedNodeMap; +interface nsIDOMNode; +interface nsIDOMNodeList; +interface nsIDOMNotation; +interface nsIDOMProcessingInstruction; +interface nsIDOMText; +interface nsIDOMDOMStringList; +interface nsIDOMNameList; + +// Needed for raises() in our IDL +interface DOMException; +interface RangeException; + +// Style Sheets +interface nsIDOMStyleSheetList; +interface nsIDOMLinkStyle; +interface nsIDOMStyleSheet; +interface nsIDOMMediaList; + +// Views +interface nsIDOMAbstractView; +interface nsIDOMDocumentView; + +// Base +interface nsIDOMWindow; +interface nsIDOMWindowInternal; +interface nsIDOMWindowCollection; +interface nsIDOMPlugin; +interface nsIDOMPluginArray; +interface nsIDOMMimeType; +interface nsIDOMMimeTypeArray; +interface nsIDOMBarProp; +interface nsIDOMNavigator; +interface nsIDOMScreen; +interface nsIDOMHistory; + +// Events +interface nsIDOMEvent; +interface nsIDOMEventTarget; +interface nsIDOMEventListener; +interface nsIDOMEventGroup; + +// HTML +interface nsIDOMHTMLElement; +interface nsIDOMHTMLFormElement; +interface nsIDOMHTMLCollection; + +// CSS +interface nsIDOMCSSValue; +interface nsIDOMCSSValueList; +interface nsIDOMCSSPrimitiveValue; +interface nsIDOMCSSRule; +interface nsIDOMCSSRuleList; +interface nsIDOMCSSStyleSheet; +interface nsIDOMCSSStyleDeclaration; +interface nsIDOMCounter; +interface nsIDOMRect; +interface nsIDOMRGBColor; +interface nsIDOMCSSStyleRule; +interface nsIDOMCSSStyleRuleCollection; +interface nsIDOMHTMLTableCaptionElement; +interface nsIDOMHTMLTableSectionElement; + +// Range +interface nsIDOMRange; + +// Crypto +interface nsIDOMCRMFObject; +interface nsIDOMCrypto; +interface nsIDOMPkcs11; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/mozIJSSubScriptLoader.idl b/Src/nprt_plugin/gecko/1.8/win/idl/mozIJSSubScriptLoader.idl new file mode 100644 index 00000000..c3884e8a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/mozIJSSubScriptLoader.idl @@ -0,0 +1,64 @@ +/* -*- 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Robert Ginda <rginda@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/* + * @status FROZEN + */ + +[scriptable, uuid(8792d77e-1dd2-11b2-ac7f-9bc9be4f2916)] +interface mozIJSSubScriptLoader : nsISupports +{ + /** + * This method should only be called from JS! + * In JS, the signature looks like: + * rv loadSubScript (url [, obj]); + * @param url the url if the sub-script, it MUST be either a file:, + * resource:, or chrome: url, and MUST be local. + * @param obj an optional object to evaluate the script onto, it + * defaults to the global object of the caller. + * @retval rv the value returned by the sub-script + */ + void loadSubScript (in wstring url); +}; + + + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIASN1Object.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIASN1Object.idl new file mode 100644 index 00000000..65dab183 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIASN1Object.idl @@ -0,0 +1,105 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo <javi@netscape.com> + * + * 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" + +/** + * This represents an ASN.1 object, + * where ASN.1 is "Abstract Syntax Notation number One". + * + * The additional state information carried in this interface + * makes it fit for being used as the data structure + * when working with visual reprenstation of ASN.1 objects + * in a human user interface, like in a tree widget + * where open/close state of nodes must be remembered. + * + * @status FROZEN + */ +[scriptable, uuid(ba8bf582-1dd1-11b2-898c-f40246bc9a63)] +interface nsIASN1Object : nsISupports { + + /** + * Identifiers for the possible types of object. + */ + const unsigned long ASN1_END_CONTENTS = 0; + const unsigned long ASN1_BOOLEAN = 1; + const unsigned long ASN1_INTEGER = 2; + const unsigned long ASN1_BIT_STRING = 3; + const unsigned long ASN1_OCTET_STRING = 4; + const unsigned long ASN1_NULL = 5; + const unsigned long ASN1_OBJECT_ID = 6; + const unsigned long ASN1_ENUMERATED = 10; + const unsigned long ASN1_UTF8_STRING = 12; + const unsigned long ASN1_SEQUENCE = 16; + const unsigned long ASN1_SET = 17; + const unsigned long ASN1_PRINTABLE_STRING = 19; + const unsigned long ASN1_T61_STRING = 20; + const unsigned long ASN1_IA5_STRING = 22; + const unsigned long ASN1_UTC_TIME = 23; + const unsigned long ASN1_GEN_TIME = 24; + const unsigned long ASN1_VISIBLE_STRING = 26; + const unsigned long ASN1_UNIVERSAL_STRING = 28; + const unsigned long ASN1_BMP_STRING = 30; + const unsigned long ASN1_HIGH_TAG_NUMBER = 31; + const unsigned long ASN1_CONTEXT_SPECIFIC = 32; + const unsigned long ASN1_APPLICATION = 33; + const unsigned long ASN1_PRIVATE = 34; + + /** + * "type" will be equal to one of the defined object identifiers. + */ + attribute unsigned long type; + + + /** + * This contains a tag as explained in ASN.1 standards documents. + */ + attribute unsigned long tag; + + /** + * "displayName" contains a human readable explanatory label. + */ + attribute AString displayName; + + /** + * "displayValue" contains the human readable value. + */ + attribute AString displayValue; +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIASN1Sequence.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIASN1Sequence.idl new file mode 100644 index 00000000..3c5482a9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIASN1Sequence.idl @@ -0,0 +1,91 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo <javi@netscape.com> + * + * 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 "nsIASN1Object.idl" + +interface nsIMutableArray; + +/** + * This represents a sequence of ASN.1 objects, + * where ASN.1 is "Abstract Syntax Notation number One". + * + * Overview of how this ASN1 interface is intended to + * work. + * + * First off, the nsIASN1Sequence is any type in ASN1 + * that consists of sub-elements (ie SEQUENCE, SET) + * nsIASN1Printable Items are all the other types that + * can be viewed by themselves without interpreting further. + * Examples would include INTEGER, UTF-8 STRING, OID. + * These are not intended to directly reflect the numberous + * types that exist in ASN1, but merely an interface to ease + * producing a tree display the ASN1 structure of any DER + * object. + * + * The additional state information carried in this interface + * makes it fit for being used as the data structure + * when working with visual reprenstation of ASN.1 objects + * in a human user interface, like in a tree widget + * where open/close state of nodes must be remembered. + * + * @status FROZEN + */ +[scriptable, uuid(b6b957e6-1dd1-11b2-89d7-e30624f50b00)] +interface nsIASN1Sequence : nsIASN1Object { + + /** + * The array of objects stored in the sequence. + */ + attribute nsIMutableArray ASN1Objects; + + /** + * Whether the node at this position in the ASN.1 data structure + * sequence contains sub elements understood by the + * application. + */ + attribute boolean isValidContainer; + + /** + * Whether the contained objects should be shown or hidden. + * A UI implementation can use this flag to store the current + * expansion state when shown in a tree widget. + */ + attribute boolean isExpanded; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIBadCertListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIBadCertListener.idl new file mode 100644 index 00000000..5e9e7508 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIBadCertListener.idl @@ -0,0 +1,155 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo <javi@netscape.com> + * + * 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" + +interface nsIX509Cert; +interface nsIInterfaceRequestor; + +/** + * Functions that display warnings for problems with web site trust. + * + * @status FROZEN + */ +[scriptable, uuid(86960956-edb0-11d4-998b-00b0d02354a0)] +interface nsIBadCertListener : nsISupports { + + /** + * No decision was made by the user, whether to trust a cert. + */ + const short UNINIT_ADD_FLAG = -1; + + /** + * The user decided to add trust to a certificate temporarily + * for the current application session only. + */ + const short ADD_TRUSTED_FOR_SESSION = 1; + + /** + * The user decided to add trust to a certificate permanently. + */ + const short ADD_TRUSTED_PERMANENTLY = 2; + + /** + * Inform the user there are problems with the trust of a certificate, + * and request a decision from the user. + * The UI should offer the user a way to look at the certificate in detail. + * The following is a sample UI message to be shown to the user: + * + * Unable to verify the identity of %S as a trusted site. + * Possible reasons for this error: + * - Your browser does not recognize the Certificate Authority + * that issued the site's certificate. + * - The site's certificate is incomplete due to a + * server misconfiguration. + * - You are connected to a site pretending to be %S, + * possibly to obtain your confidential information. + * Please notify the site's webmaster about this problem. + * Before accepting this certificate, you should examine this site's + * certificate carefully. Are you willing to to accept this certificate + * for the purpose of identifying the Web site %S? + * o Accept this certificate permanently + * x Accept this certificate temporarily for this session + * o Do not accept this certificate and do not connect to this Web site + * + * @param socketInfo A network communication context that can be used to obtain more information + * about the active connection. + * @param cert The certificate that is not trusted and that is having the problem. + * @param certAddType The user's trust decision. See constants defined above. + * + * @return true if the user decided to connect anyway, false if the user decided to not connect + */ + boolean confirmUnknownIssuer(in nsIInterfaceRequestor socketInfo, + in nsIX509Cert cert, + out short certAddType); + + /** + * Inform the user there are problems with the trust of a certificate, + * and request a decision from the user. + * The hostname mentioned in the server's certificate is not the hostname + * that was used as a destination address for the current connection. + * + * @param socketInfo A network communication context that can be used to obtain more information + * about the active connection. + * @param targetURL The URL that was used to open the current connection. + * @param cert The certificate that was presented by the server. + * + * @return true if the user decided to connect anyway, false if the user decided to not connect + */ + boolean confirmMismatchDomain(in nsIInterfaceRequestor socketInfo, + in AUTF8String targetURL, + in nsIX509Cert cert); + + /** + * Inform the user there are problems with the trust of a certificate, + * and request a decision from the user. + * The certificate presented by the server is no longer valid because + * the validity period has expired. + * + * @param socketInfo A network communication context that can be used to obtain more information + * about the active connection. + * @param cert The certificate that was presented by the server. + * + * @return true if the user decided to connect anyway, false if the user decided to not connect + */ + boolean confirmCertExpired(in nsIInterfaceRequestor socketInfo, + in nsIX509Cert cert); + + /** + * Inform the user there are problems with the trust of a certificate, + * and request a decision from the user. + * The Certificate Authority (CA) that issued the server's certificate has issued a + * Certificate Revocation List (CRL). + * However, the application does not have a current version of the CA's CRL. + * Due to the application configuration, the application disallows the connection + * to the remote site. + * + * @param socketInfo A network communication context that can be used to obtain more information + * about the active connection. + * @param targetURL The URL that was used to open the current connection. + * @param cert The certificate that was presented by the server. + */ + void notifyCrlNextupdate(in nsIInterfaceRequestor socketInfo, + in AUTF8String targetURL, in nsIX509Cert cert); + +}; + +%{C++ +#define NS_BADCERTLISTENER_CONTRACTID "@mozilla.org/nsBadCertListener;1" +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsICRLInfo.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsICRLInfo.idl new file mode 100644 index 00000000..1c08fee1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsICRLInfo.idl @@ -0,0 +1,93 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo <javi@netscape.com> + * + * 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" + +/** + * Information on a Certificate Revocation List (CRL) + * issued by a Aertificate Authority (CA). + * + * @status FROZEN + */ +[scriptable, uuid(c185d920-4a3e-11d5-ba27-00108303b117)] +interface nsICRLInfo : nsISupports { + + /** + * The issuing CA's organization. + */ + readonly attribute AString organization; + + /** + * The issuing CA's organizational unit. + */ + readonly attribute AString organizationalUnit; + + /** + * The time this CRL was created at. + */ + readonly attribute PRTime lastUpdate; + + /** + * The time the suggested next update for this CRL. + */ + readonly attribute PRTime nextUpdate; + + /** + * lastUpdate formatted as a human readable string + * formatted according to the environment locale. + */ + readonly attribute AString lastUpdateLocale; + + /** + * nextUpdate formatted as a human readable string + * formatted according to the environment locale. + */ + readonly attribute AString nextUpdateLocale; + + /** + * The key identifying the CRL in the database. + */ + readonly attribute AString nameInDb; + + /** + * The URL this CRL was last fetched from. + */ + readonly attribute AUTF8String lastFetchURL; +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsICategoryManager.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsICategoryManager.idl new file mode 100644 index 00000000..509f7870 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsICategoryManager.idl @@ -0,0 +1,101 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsISimpleEnumerator.idl" + +/* + * nsICategoryManager + * @status FROZEN + */ + +[scriptable, uuid(3275b2cd-af6d-429a-80d7-f0c5120342ac)] +interface nsICategoryManager : nsISupports +{ + /** + * Get the value for the given category's entry. + * @param aCategory The name of the category ("protocol") + * @param aEntry The entry you're looking for ("http") + * @return The value. + */ + string getCategoryEntry(in string aCategory, in string aEntry); + + /** + * Add an entry to a category. + * @param aCategory The name of the category ("protocol") + * @param aEntry The entry to be added ("http") + * @param aValue The value for the entry ("moz.httprulez.1") + * @param aPersist Should this data persist between invocations? + * @param aReplace Should we replace an existing entry? + * @return Previous entry, if any + */ + string addCategoryEntry(in string aCategory, in string aEntry, + in string aValue, in boolean aPersist, + in boolean aReplace); + + /** + * Delete an entry from the category. + * @param aCategory The name of the category ("protocol") + * @param aEntry The entry to be added ("http") + * @param aPersist Delete persistent data from registry, if present? + */ + void deleteCategoryEntry(in string aCategory, in string aEntry, + in boolean aPersist); + + /** + * Delete a category and all entries. + * @param aCategory The category to be deleted. + */ + void deleteCategory(in string aCategory); + + /** + * Enumerate the entries in a category. + * @param aCategory The category to be enumerated. + * @return a simple enumerator, each result QIs to + * nsISupportsCString. + */ + nsISimpleEnumerator enumerateCategory(in string aCategory); + + /** + * Enumerate all existing categories + * @param aCategory The category to be enumerated. + * @return a simple enumerator, each result QIs to + * nsISupportsCString. + */ + nsISimpleEnumerator enumerateCategories(); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsICertificateDialogs.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsICertificateDialogs.idl new file mode 100644 index 00000000..d7572c8a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsICertificateDialogs.idl @@ -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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Terry Hayes <thayes@netscape.com> + * + * 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" + +interface nsIInterfaceRequestor; +interface nsIX509Cert; +interface nsICRLInfo; + +/** + * Functions that implement user interface dialogs to manage certificates. + * + * @status FROZEN + */ +[scriptable, uuid(a03ca940-09be-11d5-ac5d-000064657374)] +interface nsICertificateDialogs : nsISupports +{ + /** + * UI shown when a user is asked to download a new CA cert. + * Provides user with ability to choose trust settings for the cert. + * Asks the user to grant permission to import the certificate. + * + * @param ctx A user interface context. + * @param cert The certificate that is about to get installed. + * @param trust a bit mask of trust flags, + * see nsIX509CertDB for possible values. + * + * @return true if the user allows to import the certificate. + */ + boolean confirmDownloadCACert(in nsIInterfaceRequestor ctx, + in nsIX509Cert cert, + out unsigned long trust); + + /** + * UI shown when a web site has delivered a CA certificate to + * be imported, but the certificate is already contained in the + * user's storage. + * + * @param ctx A user interface context. + */ + void notifyCACertExists(in nsIInterfaceRequestor ctx); + + /** + * UI shown when a user's personal certificate is going to be + * exported to a backup file. + * The implementation of this dialog should make sure + * to prompt the user to type the password twice in order to + * confirm correct input. + * The wording in the dialog should also motivate the user + * to enter a strong password. + * + * @param ctx A user interface context. + * @param password The password provided by the user. + * + * @return false if the user requests to cancel. + */ + boolean setPKCS12FilePassword(in nsIInterfaceRequestor ctx, + out AString password); + + /** + * UI shown when a user is about to restore a personal + * certificate from a backup file. + * The user is requested to enter the password + * that was used in the past to protect that backup file. + * + * @param ctx A user interface context. + * @param password The password provided by the user. + * + * @return false if the user requests to cancel. + */ + boolean getPKCS12FilePassword(in nsIInterfaceRequestor ctx, + out AString password); + + /** + * UI shown when a certificate needs to be shown to the user. + * The implementation should try to display as many attributes + * as possible. + * + * @param ctx A user interface context. + * @param cert The certificate to be shown to the user. + */ + void viewCert(in nsIInterfaceRequestor ctx, + in nsIX509Cert cert); + + /** + * UI shown after a Certificate Revocation List (CRL) has been + * successfully imported. + * + * @param ctx A user interface context. + * @param crl Information describing the CRL that was imported. + */ + void crlImportStatusDialog(in nsIInterfaceRequestor ctx, + in nsICRLInfo crl); +}; + +%{C++ +#define NS_CERTIFICATEDIALOGS_CONTRACTID "@mozilla.org/nsCertificateDialogs;1" +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIChannel.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIChannel.idl new file mode 100644 index 00000000..aecbd18e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIChannel.idl @@ -0,0 +1,219 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 "nsIRequest.idl" + +interface nsIURI; +interface nsIInterfaceRequestor; +interface nsIInputStream; +interface nsIStreamListener; + +/** + * The nsIChannel interface allows clients to construct "GET" requests for + * specific protocols, and manage them in a uniform way. Once a channel is + * created (via nsIIOService::newChannel), parameters for that request may + * be set by using the channel attributes, or by QI'ing to a subclass of + * nsIChannel for protocol-specific parameters. Then, the URI can be fetched + * by calling nsIChannel::open or nsIChannel::asyncOpen. + * + * After a request has been completed, the channel is still valid for accessing + * protocol-specific results. For example, QI'ing to nsIHttpChannel allows + * response headers to be retrieved for the corresponding http transaction. + * + * @status FROZEN + */ +[scriptable, uuid(c63a055a-a676-4e71-bf3c-6cfa11082018)] +interface nsIChannel : nsIRequest +{ + /** + * The original URI used to construct the channel. This is used in the case + * of a redirect or URI "resolution" (e.g. resolving a resource: URI to a + * file: URI) so that the original pre-redirect URI can still be obtained. + * + * NOTE: this is distinctly different from the http Referer (referring URI), + * which is typically the page that contained the original URI (accessible + * from nsIHttpChannel). + */ + attribute nsIURI originalURI; + + /** + * The URI corresponding to the channel. Its value is immutable. + */ + readonly attribute nsIURI URI; + + /** + * The owner, corresponding to the entity that is responsible for this + * channel. Used by the security manager to grant or deny privileges to + * mobile code loaded from this channel. + * + * NOTE: this is a strong reference to the owner, so if the owner is also + * holding a strong reference to the channel, care must be taken to + * explicitly drop its reference to the channel. + */ + attribute nsISupports owner; + + /** + * The notification callbacks for the channel. This is set by clients, who + * wish to provide a means to receive progress, status and protocol-specific + * notifications. If this value is NULL, the channel implementation may use + * the notification callbacks from its load group. The channel may also + * query the notification callbacks from its load group if its notification + * callbacks do not supply the requested interface. + * + * Interfaces commonly requested include: nsIProgressEventSink, nsIPrompt, + * and nsIAuthPrompt. + * + * When the channel is done, it must not continue holding references to + * this object. + * + * NOTE: A channel implementation should take care when "caching" an + * interface pointer queried from its notification callbacks. If the + * notification callbacks are changed, then a cached interface pointer may + * become invalid and may therefore need to be re-queried. + */ + attribute nsIInterfaceRequestor notificationCallbacks; + + /** + * Transport-level security information (if any) corresponding to the channel. + */ + readonly attribute nsISupports securityInfo; + + /** + * The MIME type of the channel's content if available. + * + * NOTE: the content type can often be wrongly specified (e.g., wrong file + * extension, wrong MIME type, wrong document type stored on a server, etc.), + * and the caller most likely wants to verify with the actual data. + * + * Setting contentType before the channel has been opened provides a hint + * to the channel as to what the MIME type is. The channel may ignore this + * hint in deciding on the actual MIME type that it will report. + * + * Setting contentType after onStartRequest has been fired or after open() + * is called will override the type determined by the channel. + * + * Setting contentType between the time that asyncOpen() is called and the + * time when onStartRequest is fired has undefined behavior at this time. + * + * The value of the contentType attribute is a lowercase string. A value + * assigned to this attribute will be parsed and normalized as follows: + * 1- any parameters (delimited with a ';') will be stripped. + * 2- if a charset parameter is given, then its value will replace the + * the contentCharset attribute of the channel. + * 3- the stripped contentType will be lowercased. + * Any implementation of nsIChannel must follow these rules. + */ + attribute ACString contentType; + + /** + * The character set of the channel's content if available and if applicable. + * This attribute only applies to textual data. + * + * The value of the contentCharset attribute is a mixedcase string. + */ + attribute ACString contentCharset; + + /** + * The length of the data associated with the channel if available. A value + * of -1 indicates that the content length is unknown. + * + * Callers should prefer getting the "content-length" property + * as 64-bit value by QIing the channel to nsIPropertyBag2, + * if that interface is exposed by the channel. + */ + attribute long contentLength; + + /** + * Synchronously open the channel. + * + * @return blocking input stream to the channel's data. + * + * NOTE: nsIChannel implementations are not required to implement this + * method. Moreover, since this method may block the calling thread, it + * should not be called on a thread that processes UI events. + */ + nsIInputStream open(); + + /** + * Asynchronously open this channel. Data is fed to the specified stream + * listener as it becomes available. The stream listener's methods are + * called on the thread that calls asyncOpen and are not called until + * after asyncOpen returns. + * + * @param aListener the nsIStreamListener implementation + * @param aContext an opaque parameter forwarded to aListener's methods + */ + void asyncOpen(in nsIStreamListener aListener, in nsISupports aContext); + + /************************************************************************** + * Channel specific load flags: + * + * Bits 21-31 are reserved for future use by this interface or one of its + * derivatives (e.g., see nsICachingChannel). + */ + + /** + * Set (e.g., by the docshell) to indicate whether or not the channel + * corresponds to a document URI. + */ + const unsigned long LOAD_DOCUMENT_URI = 1 << 16; + + /** + * If the end consumer for this load has been retargeted after discovering + * it's content, this flag will be set: + */ + const unsigned long LOAD_RETARGETED_DOCUMENT_URI = 1 << 17; + + /** + * This flag is set to indicate that onStopRequest may be followed by + * another onStartRequest/onStopRequest pair. This flag is, for example, + * used by the multipart/replace stream converter. + */ + const unsigned long LOAD_REPLACE = 1 << 18; + + /** + * Set (e.g., by the docshell) to indicate whether or not the channel + * corresponds to an initial document URI load (e.g., link click). + */ + const unsigned long LOAD_INITIAL_DOCUMENT_URI = 1 << 19; + + /** + * Set (e.g., by the URILoader) to indicate whether or not the end consumer + * for this load has been determined. + */ + const unsigned long LOAD_TARGETED = 1 << 20; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIClassInfo.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIClassInfo.idl new file mode 100644 index 00000000..e934057c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIClassInfo.idl @@ -0,0 +1,132 @@ +/* -*- Mode: C++; tab-width: 8; 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * John Bandhauer <jband@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIProgrammingLanguage.idl" + +/** + * Provides information about a specific implementation class + * @status FROZEN + */ + +[scriptable, uuid(986c11d0-f340-11d4-9075-0010a4e73d9a)] +interface nsIClassInfo : 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); + + /** + * 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); + + /** + * 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; + + /** + * A human readable string naming the class, or null. + */ + readonly attribute string classDescription; + + /** + * 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; + + /** + * Return language type from list in nsIProgrammingLanguage + */ + + readonly attribute PRUint32 implementationLanguage; + + /** + * Bitflags for 'flags' attribute. + */ + const PRUint32 SINGLETON = 1 << 0; + const PRUint32 THREADSAFE = 1 << 1; + const PRUint32 MAIN_THREAD_ONLY = 1 << 2; + const PRUint32 DOM_OBJECT = 1 << 3; + const PRUint32 PLUGIN_OBJECT = 1 << 4; + const PRUint32 EAGER_CLASSINFO = 1 << 5; + /** + * 'flags' attribute bitflag: whether objects of this type implement + * nsIContent. + */ + const PRUint32 CONTENT_NODE = 1 << 6; + + // The high order bit is RESERVED for consumers of these flags. + // No implementor of this interface should ever return flags + // with this bit set. + const PRUint32 RESERVED = 1 << 31; + + + readonly attribute PRUint32 flags; + + /** + * 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; + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIClipboardCommands.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIClipboardCommands.idl new file mode 100644 index 00000000..1d2d0e15 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIClipboardCommands.idl @@ -0,0 +1,146 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Dan Rosen <dr@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/** + * An interface for embedding clients who wish to interact with + * the system-wide OS clipboard. Mozilla does not use a private + * clipboard, instead it places its data directly onto the system + * clipboard. The webshell implements this interface. + * + * @status FROZEN + */ + +[scriptable, uuid(b8100c90-73be-11d2-92a5-00105a1b0d64)] +interface nsIClipboardCommands : nsISupports { + + /** + * Returns whether there is a selection and it is not read-only. + * + * @return <code>true</code> if the current selection can be cut, + * <code>false</code> otherwise. + */ + boolean canCutSelection(); + + /** + * Returns whether there is a selection and it is copyable. + * + * @return <code>true</code> if there is a selection, + * <code>false</code> otherwise. + */ + boolean canCopySelection(); + + /** + * Returns whether we can copy a link location. + * + * @return <code>true</code> if a link is selected, + * <code>false</code> otherwise. + */ + boolean canCopyLinkLocation(); + + /** + * Returns whether we can copy an image location. + * + * @return <code>true</code> if an image is selected, + <code>false</code> otherwise. + */ + boolean canCopyImageLocation(); + + /** + * Returns whether we can copy an image's contents. + * + * @return <code>true</code> if an image is selected, + * <code>false</code> otherwise + */ + boolean canCopyImageContents(); + + /** + * Returns whether the current contents of the clipboard can be + * pasted and if the current selection is not read-only. + * + * @return <code>true</code> there is data to paste on the clipboard + * and the current selection is not read-only, + * <code>false</code> otherwise + */ + boolean canPaste(); + + /** + * Cut the current selection onto the clipboard. + */ + void cutSelection(); + + /** + * Copy the current selection onto the clipboard. + */ + void copySelection(); + + /** + * Copy the link location of the current selection (e.g., + * the |href| attribute of a selected |a| tag). + */ + void copyLinkLocation(); + + /** + * Copy the location of the selected image. + */ + void copyImageLocation(); + + /** + * Copy the contents of the selected image. + */ + void copyImageContents(); + + /** + * Paste the contents of the clipboard into the current selection. + */ + void paste(); + + /** + * Select the entire contents. + */ + void selectAll(); + + /** + * Clear the current selection (if any). Insertion point ends up + * at beginning of current selection. + */ + void selectNone(); + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIComponentManager.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIComponentManager.idl new file mode 100644 index 00000000..d6278489 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIComponentManager.idl @@ -0,0 +1,110 @@ +/* -*- Mode: IDL; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +/** + * The nsIComponentManager interface. + * @status FROZEN + */ + +#include "nsISupports.idl" + +interface nsIFactory; + +[scriptable, uuid(a88e5a60-205a-4bb1-94e1-2628daf51eae)] +interface nsIComponentManager : nsISupports +{ + /** + * 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); + + /** + * 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); + + + /** + * 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); + + /** + * 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); +}; + + +%{ C++ +#ifdef MOZILLA_INTERNAL_API +#include "nsComponentManagerUtils.h" +#endif +%} C++ diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIComponentRegistrar.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIComponentRegistrar.idl new file mode 100644 index 00000000..2a4a55db --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIComponentRegistrar.idl @@ -0,0 +1,243 @@ +/* ***** 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 XPCOM. + * + * The Initial Developer of the Original Code is Netscape Communications. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/** + * The nsIComponentRegistrar interface. + * @status FROZEN + */ + +#include "nsISupports.idl" + +interface nsIFile; +interface nsIFactory; +interface nsISimpleEnumerator; + +[scriptable, uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392)] +interface nsIComponentRegistrar : nsISupports +{ + /** + * autoRegister + * + * Register a component file or all component files in a directory. + * + * Component files must have an associated loader and export the required + * symbols which this loader defines. For example, if the given file is a + * native library (which is built into XPCOM), it must export the symbol + * "NSGetModule". Other loaders may have different semantics. + * + * This method may only be called from the main thread. + * + * @param aSpec : Filename spec for component file's location. If aSpec + * is a directory, then every component file in the + * directory will be registered. + * If the aSpec is null, then the application component's + * directory as defined by NS_XPCOM_COMPONENT_DIR will be + * registered (see nsIDirectoryService.idl) + * + * @return NS_OK : Registration was successful. + * NS_ERROR: Method failure. + */ + void autoRegister(in nsIFile aSpec); + + /** + * autoUnregister + * + * Unregister a component file or all component files in a directory. + * This method may only be called from the main thread. + * + * @param aSpec : Filename spec for component file's location. If aSpec + * is a directory, the every component file in the directory + * will be registered. + * If aSpec is null, then the application component's + * directory as defined by NS_XPCOM_COMPONENT_DIR will be + * registered. (see nsIDirectoryService.idl) + * + * @return NS_OK Unregistration was successful. + * NS_ERROR* Method failure. + */ + void autoUnregister(in nsIFile aSpec); + + + /** + * registerFactory + * + * Register a factory with a given ContractID, CID and Class Name. + * + * @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 + * + * @return NS_OK Registration was successful. + * NS_ERROR* method failure. + */ + void registerFactory(in nsCIDRef aClass, + in string aClassName, + in string aContractID, + in nsIFactory aFactory); + + /** + * unregisterFactory + * + * Unregister a factory associated with CID aClass. + * + * @param aClass : CID being unregistered + * @param aFactory : Factory previously registered to create instances of + * CID aClass. + * + * @return NS_OK Unregistration was successful. + * NS_ERROR* Method failure. + */ + void unregisterFactory(in nsCIDRef aClass, + in nsIFactory aFactory); + + /** + * registerFactoryLocation + * + * Register a factory with a given ContractID, CID and Class Name + * + * @param aClass : CID of object + * @param aClassName : Class Name of CID + * @param aContractID : ContractID associated with CID aClass + * @param aFile : Component File. This file must have an associated + * loader and export the required symbols which this + * loader specifies. + * @param aLoaderStr : Opaque loader specific string. This value is + * passed into the nsIModule's registerSelf + * callback and must be fowarded unmodified when + * registering factories via their location. + * @param aType : Component Type of CID aClass. This value is + * passed into the nsIModule's registerSelf + * callback and must be fowarded unmodified when + * registering factories via their location. + * + * @return NS_OK Registration was successful. + * NS_ERROR* Method failure. + */ + void registerFactoryLocation(in nsCIDRef aClass, + in string aClassName, + in string aContractID, + in nsIFile aFile, + in string aLoaderStr, + in string aType); + + /** + * unregisterFactoryLocation + * + * Unregister a factory associated with CID aClass. + * + * @param aClass : CID being unregistered + * @param aFile : Component File previously registered + * + * @return NS_OK Unregistration was successful. + * NS_ERROR* Method failure. + */ + void unregisterFactoryLocation(in nsCIDRef aClass, + in nsIFile aFile); + + /** + * isCIDRegistered + * + * Returns true if a factory is registered for the CID. + * + * @param aClass : CID queried for registeration + * @return : true if a factory is registered for CID + * false otherwise. + */ + boolean isCIDRegistered(in nsCIDRef aClass); + + /** + * isContractIDRegistered + * + * Returns true if a factory is registered for the contract id. + * + * @param aClass : contract id queried for registeration + * @return : true if a factory is registered for contract id + * false otherwise. + */ + boolean isContractIDRegistered(in string aContractID); + + /** + * enumerateCIDs + * + * Enumerate the list of all registered CIDs. + * + * @return : enumerator for CIDs. Elements of the enumeration can be QI'ed + * for the nsISupportsID interface. From the nsISupportsID, you + * can obtain the actual CID. + */ + nsISimpleEnumerator enumerateCIDs(); + + /** + * enumerateContractIDs + * + * Enumerate the list of all registered ContractIDs. + * + * @return : enumerator for ContractIDs. Elements of the enumeration can be + * QI'ed for the nsISupportsCString interface. From the + * nsISupportsCString interface, you can obtain the actual + * Contract ID string. + */ + nsISimpleEnumerator enumerateContractIDs(); + + /** + * CIDToContractID + * + * Returns the Contract ID for a given CID, if one exists and is registered. + * + * @return : Contract ID. + */ + string CIDToContractID(in nsCIDRef aClass); + + /** + * contractIDToCID + * + * Returns the CID for a given Contract ID, if one exists and is registered. + * + * @return : Contract ID. + */ + nsCIDPtr contractIDToCID(in string aContractID); + +}; + + + + + + + + + + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIContextMenuListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIContextMenuListener.idl new file mode 100644 index 00000000..35b6da95 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIContextMenuListener.idl @@ -0,0 +1,100 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Adam Lock <adamlock@netscape.com> + * + * 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" + +interface nsIDOMEvent; +interface nsIDOMNode; + +/** + * An optional interface for embedding clients wishing to receive + * notifications for context menu events (e.g. generated by + * a user right-mouse clicking on a link). The embedder implements + * this interface on the web browser chrome object associated + * with the window that notifications are required for. When a context + * menu event, the browser will call this interface if present. + * + * @see nsIDOMNode + * @see nsIDOMEvent + * + * @status FROZEN + */ +[scriptable, uuid(3478b6b0-3875-11d4-94ef-0020183bf181)] +interface nsIContextMenuListener : nsISupports +{ + /** Flag. No context. */ + const unsigned long CONTEXT_NONE = 0; + /** Flag. Context is a link element. */ + const unsigned long CONTEXT_LINK = 1; + /** Flag. Context is an image element. */ + const unsigned long CONTEXT_IMAGE = 2; + /** Flag. Context is the whole document. */ + const unsigned long CONTEXT_DOCUMENT = 4; + /** Flag. Context is a text area element. */ + const unsigned long CONTEXT_TEXT = 8; + /** Flag. Context is an input element. */ + const unsigned long CONTEXT_INPUT = 16; + + /** + * Called when the browser receives a context menu event (e.g. user is right-mouse + * clicking somewhere on the document). The combination of flags, event and node + * provided in the call indicate where and what was clicked on. + * + * The following table describes what context flags and node combinations are + * possible. + * + * <TABLE> + * <TR><TD><B>aContextFlag</B></TD><TD>aNode</TD></TR> + * <TR><TD>CONTEXT_LINK</TD><TD><A></TD></TR> + * <TR><TD>CONTEXT_IMAGE</TD><TD><IMG></TD></TR> + * <TR><TD>CONTEXT_IMAGE | CONTEXT_LINK</TD><TD><IMG> + * with an <A> as an ancestor</TD></TR> + * <TR><TD>CONTEXT_INPUT</TD><TD><INPUT></TD></TR> + * <TR><TD>CONTEXT_TEXT</TD><TD><TEXTAREA></TD></TR> + * <TR><TD>CONTEXT_DOCUMENT</TD><TD><HTML></TD></TR> + * </TABLE> + * + * @param aContextFlags Flags indicating the kind of context. + * @param aEvent The DOM context menu event. + * @param aNode The DOM node most relevant to the context. + * + * @return <CODE>NS_OK</CODE> always. + */ + void onShowContextMenu(in unsigned long aContextFlags, in nsIDOMEvent aEvent, in nsIDOMNode aNode); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsICookie.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsICookie.idl new file mode 100644 index 00000000..1f4dcb39 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsICookie.idl @@ -0,0 +1,125 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +/** + * An optional interface for accessing the HTTP or + * javascript cookie object + * + * @status FROZEN + */ + +typedef long nsCookieStatus; +typedef long nsCookiePolicy; + +[scriptable, uuid(E9FCB9A4-D376-458f-B720-E65E7DF593BC)] + +interface nsICookie : nsISupports { + + /** + * the name of the cookie + */ + readonly attribute ACString name; + + /** + * the cookie value + */ + readonly attribute ACString value; + + /** + * true if the cookie is a domain cookie, false otherwise + */ + readonly attribute boolean isDomain; + + /** + * the host (possibly fully qualified) of the cookie + */ + readonly attribute AUTF8String host; + + /** + * the path pertaining to the cookie + */ + readonly attribute AUTF8String path; + + /** + * true if the cookie was transmitted over ssl, false otherwise + */ + readonly attribute boolean isSecure; + + /** + * expiration time (local timezone) expressed as number of seconds since Jan 1, 1970 + */ + readonly attribute PRUint64 expires; + + /** + * P3P status of cookie. Values are + * + * STATUS_UNKNOWN -- cookie collected in a previous session and this info no longer available + * STATUS_ACCEPTED -- cookie was accepted as it + * STATUS_DOWNGRADED -- cookie was accepted but downgraded to a session cookie + * STATUS_FLAGGED -- cookie was accepted with a warning being issued to the user + * STATUS_REJECTED -- cookie was not accepted + */ + const nsCookieStatus STATUS_UNKNOWN=0; + const nsCookieStatus STATUS_ACCEPTED=1; + const nsCookieStatus STATUS_DOWNGRADED=2; + const nsCookieStatus STATUS_FLAGGED=3; + const nsCookieStatus STATUS_REJECTED=4; + + readonly attribute nsCookieStatus status; + + /** + * Site's compact policy. Values are + * + * POLICY_UNKNOWN -- cookie collected in a previous session and this info no longer available + * POLICY_NONE -- site did not send a compact policy along with the cookie + * POLICY_NO_CONSENT -- site collects identfiable information without user involvement + * POLICY_IMPLICIT_CONSENT -- site collects identifiable information unless user opts out + * POLICY_EXPLICIT_CONSENT -- site does not collect identifiable information unless user opts in + * POLICY_NO_II -- site does not collect identifiable information + */ + const nsCookiePolicy POLICY_UNKNOWN=0; + const nsCookiePolicy POLICY_NONE=1; + const nsCookiePolicy POLICY_NO_CONSENT=2; + const nsCookiePolicy POLICY_IMPLICIT_CONSENT=3; + const nsCookiePolicy POLICY_EXPLICIT_CONSENT=4; + const nsCookiePolicy POLICY_NO_II=5; + readonly attribute nsCookiePolicy policy; + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsICookieManager.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsICookieManager.idl new file mode 100644 index 00000000..c59fc455 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsICookieManager.idl @@ -0,0 +1,73 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 "nsISimpleEnumerator.idl" + + +/** + * An optional interface for accessing or removing the cookies + * that are in the cookie list + * + * @status FROZEN + */ + +[scriptable, uuid(AAAB6710-0F2C-11d5-A53B-0010A401EB10)] +interface nsICookieManager : nsISupports +{ + + /** + * Called to remove all cookies from the cookie list + */ + void removeAll(); + + /** + * Called to enumerate through each cookie in the cookie list. + * The objects enumerated over are of type nsICookie + */ + readonly attribute nsISimpleEnumerator enumerator; + + /** + * Called to remove an individual cookie from the cookie list + * + * @param aDomain The host or domain for which the cookie was set + * @param aName The name specified in the cookie + * @param aBlocked Indicates if cookies from this host should be permanently blocked + * + */ + void remove(in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOM3DocumentEvent.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOM3DocumentEvent.idl new file mode 100644 index 00000000..9912a3e5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOM3DocumentEvent.idl @@ -0,0 +1,55 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMDocumentEvent interface is the interface to the event + * factory method on a DOM document object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Events/ + */ + +[scriptable, uuid(090ecc19-b7cb-4f47-ae47-ed68d4926249)] +interface nsIDOM3DocumentEvent : nsISupports +{ + // Introduced in DOM Level 3: + nsIDOMEventGroup createEventGroup(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOM3EventTarget.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOM3EventTarget.idl new file mode 100644 index 00000000..1160a4eb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOM3EventTarget.idl @@ -0,0 +1,66 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMEventTarget interface is the interface implemented by all + * event targets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Events/ + */ + +[scriptable, uuid(3e9c01a7-de97-4c3b-8294-b4bd9d7056d1)] +interface nsIDOM3EventTarget : nsISupports +{ + // Introduced in DOM Level 3: + void addGroupedEventListener(in DOMString type, + in nsIDOMEventListener listener, + in boolean useCapture, + in nsIDOMEventGroup evtGroup); + // Introduced in DOM Level 3: + void removeGroupedEventListener(in DOMString type, + in nsIDOMEventListener listener, + in boolean useCapture, + in nsIDOMEventGroup evtGroup); + // Introduced in DOM Level 3: + boolean canTrigger(in DOMString type); + // Introduced in DOM Level 3: + boolean isRegisteredHere(in DOMString type); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMAbstractView.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMAbstractView.idl new file mode 100644 index 00000000..2406e7fd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMAbstractView.idl @@ -0,0 +1,55 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@netscape.com> (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMAbstractView interface is a datatype for a view in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Views + * + * @status FROZEN + */ + +[scriptable, uuid(F51EBADE-8B1A-11D3-AAE7-0010830123B4)] +interface nsIDOMAbstractView : nsISupports +{ + readonly attribute nsIDOMDocumentView document; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMAttr.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMAttr.idl new file mode 100644 index 00000000..5ded2695 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMAttr.idl @@ -0,0 +1,63 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * The nsIDOMAttr interface represents an attribute in an "Element" object. + * Typically the allowable values for the attribute are defined in a document + * type definition. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9070-15b3-11d2-932e-00805f8add32)] +interface nsIDOMAttr : nsIDOMNode +{ + readonly attribute DOMString name; + readonly attribute boolean specified; + attribute DOMString value; + // raises(DOMException) on setting + + // Introduced in DOM Level 2: + readonly attribute nsIDOMElement ownerElement; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMBarProp.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMBarProp.idl new file mode 100644 index 00000000..1fea22f2 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMBarProp.idl @@ -0,0 +1,54 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMBarProp interface is the interface for controlling and + * accessing the visibility of certain UI items (scrollbars, menubars, + * toolbars, ...) through the DOM. + * + * @status FROZEN + */ + +[scriptable, uuid(9eb2c150-1d56-11d3-8221-0060083a0bcf)] +interface nsIDOMBarProp : nsISupports +{ + attribute boolean visible; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCDATASection.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCDATASection.idl new file mode 100644 index 00000000..3d1c4bcf --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCDATASection.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMText.idl" + +/** + * CDATA sections are used to escape blocks of text containing characters + * that would otherwise be regarded as markup. + * Their primary purpose is for including material such as XML fragments, + * without needing to escape all the delimiters. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9071-15b3-11d2-932e-00805f8add32)] +interface nsIDOMCDATASection : nsIDOMText +{ +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSPrimitiveValue.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSPrimitiveValue.idl new file mode 100644 index 00000000..04b9b20f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSPrimitiveValue.idl @@ -0,0 +1,99 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@netscape.com> (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMCSSValue.idl" + +/** + * The nsIDOMCSSPrimitiveValue interface is a datatype for a primitive + * CSS value in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(e249031f-8df9-4e7a-b644-18946dce0019)] +interface nsIDOMCSSPrimitiveValue : nsIDOMCSSValue +{ + // UnitTypes + const unsigned short CSS_UNKNOWN = 0; + const unsigned short CSS_NUMBER = 1; + const unsigned short CSS_PERCENTAGE = 2; + const unsigned short CSS_EMS = 3; + const unsigned short CSS_EXS = 4; + const unsigned short CSS_PX = 5; + const unsigned short CSS_CM = 6; + const unsigned short CSS_MM = 7; + const unsigned short CSS_IN = 8; + const unsigned short CSS_PT = 9; + const unsigned short CSS_PC = 10; + const unsigned short CSS_DEG = 11; + const unsigned short CSS_RAD = 12; + const unsigned short CSS_GRAD = 13; + const unsigned short CSS_MS = 14; + const unsigned short CSS_S = 15; + const unsigned short CSS_HZ = 16; + const unsigned short CSS_KHZ = 17; + const unsigned short CSS_DIMENSION = 18; + const unsigned short CSS_STRING = 19; + const unsigned short CSS_URI = 20; + const unsigned short CSS_IDENT = 21; + const unsigned short CSS_ATTR = 22; + const unsigned short CSS_COUNTER = 23; + const unsigned short CSS_RECT = 24; + const unsigned short CSS_RGBCOLOR = 25; + + readonly attribute unsigned short primitiveType; + void setFloatValue(in unsigned short unitType, + in float floatValue) + raises(DOMException); + float getFloatValue(in unsigned short unitType) + raises(DOMException); + void setStringValue(in unsigned short stringType, + in DOMString stringValue) + raises(DOMException); + DOMString getStringValue() + raises(DOMException); + nsIDOMCounter getCounterValue() + raises(DOMException); + nsIDOMRect getRectValue() + raises(DOMException); + nsIDOMRGBColor getRGBColorValue() + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSRule.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSRule.idl new file mode 100644 index 00000000..ac50d5f7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSRule.idl @@ -0,0 +1,70 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMCSSRule interface is a datatype for a CSS style rule in + * the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90c1-15b3-11d2-932e-00805f8add32)] +interface nsIDOMCSSRule : nsISupports +{ + // RuleType + const unsigned short UNKNOWN_RULE = 0; + const unsigned short STYLE_RULE = 1; + const unsigned short CHARSET_RULE = 2; + const unsigned short IMPORT_RULE = 3; + const unsigned short MEDIA_RULE = 4; + const unsigned short FONT_FACE_RULE = 5; + const unsigned short PAGE_RULE = 6; + + readonly attribute unsigned short type; + attribute DOMString cssText; + // raises(DOMException) on setting + + readonly attribute nsIDOMCSSStyleSheet parentStyleSheet; + readonly attribute nsIDOMCSSRule parentRule; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSRuleList.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSRuleList.idl new file mode 100644 index 00000000..bb8d93b4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSRuleList.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMCSSRuleList interface is a datatype for a list of CSS + * style rules in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90c0-15b3-11d2-932e-00805f8add32)] +interface nsIDOMCSSRuleList : nsISupports +{ + readonly attribute unsigned long length; + nsIDOMCSSRule item(in unsigned long index); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSStyleDeclaration.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSStyleDeclaration.idl new file mode 100644 index 00000000..6336aea0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSStyleDeclaration.idl @@ -0,0 +1,70 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMCSSStyleDeclaration interface is a datatype for a CSS + * style declaration in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90be-15b3-11d2-932e-00805f8add32)] +interface nsIDOMCSSStyleDeclaration : nsISupports +{ + attribute DOMString cssText; + // raises(DOMException) on setting + + DOMString getPropertyValue(in DOMString propertyName); + nsIDOMCSSValue getPropertyCSSValue(in DOMString propertyName); + DOMString removeProperty(in DOMString propertyName) + raises(DOMException); + DOMString getPropertyPriority(in DOMString propertyName); + void setProperty(in DOMString propertyName, + in DOMString value, + in DOMString priority) + raises(DOMException); + readonly attribute unsigned long length; + DOMString item(in unsigned long index); + readonly attribute nsIDOMCSSRule parentRule; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSStyleSheet.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSStyleSheet.idl new file mode 100644 index 00000000..1788340d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSStyleSheet.idl @@ -0,0 +1,63 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMStyleSheet.idl" + +/** + * The nsIDOMCSSStyleSheet interface is a datatype for a CSS style + * sheet in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90c2-15b3-11d2-932e-00805f8add32)] +interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet +{ + readonly attribute nsIDOMCSSRule ownerRule; + readonly attribute nsIDOMCSSRuleList cssRules; + + unsigned long insertRule(in DOMString rule, + in unsigned long index) + raises(DOMException); + void deleteRule(in unsigned long index) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSValue.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSValue.idl new file mode 100644 index 00000000..931fcb83 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSValue.idl @@ -0,0 +1,64 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@netscape.com> (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMCSSValue interface is a datatype for a CSS value in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(009f7ea5-9e80-41be-b008-db62f10823f2)] +interface nsIDOMCSSValue : nsISupports +{ + // UnitTypes + const unsigned short CSS_INHERIT = 0; + const unsigned short CSS_PRIMITIVE_VALUE = 1; + const unsigned short CSS_VALUE_LIST = 2; + const unsigned short CSS_CUSTOM = 3; + + attribute DOMString cssText; + // raises(DOMException) on setting + + readonly attribute unsigned short cssValueType; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSValueList.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSValueList.idl new file mode 100644 index 00000000..ea2ba87e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCSSValueList.idl @@ -0,0 +1,55 @@ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2002 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Christopher A. Aillon <christopher@aillon.com> (original author) + * + * 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 "nsIDOMCSSValue.idl" + +/** + * The nsIDOMCSSValueList interface is a datatype for a list of CSS + * values in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(8f09fa84-39b9-4dca-9b2f-db0eeb186286)] +interface nsIDOMCSSValueList : nsIDOMCSSValue +{ + readonly attribute unsigned long length; + nsIDOMCSSValue item(in unsigned long index); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCharacterData.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCharacterData.idl new file mode 100644 index 00000000..38ae2d63 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCharacterData.idl @@ -0,0 +1,75 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * The nsIDOMCharacterData interface extends nsIDOMNode with a set of + * attributes and methods for accessing character data in the DOM. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9072-15b3-11d2-932e-00805f8add32)] +interface nsIDOMCharacterData : nsIDOMNode +{ + attribute DOMString data; + // raises(DOMException) on setting + // raises(DOMException) on retrieval + + readonly attribute unsigned long length; + DOMString substringData(in unsigned long offset, + in unsigned long count) + raises(DOMException); + void appendData(in DOMString arg) + raises(DOMException); + void insertData(in unsigned long offset, + in DOMString arg) + raises(DOMException); + void deleteData(in unsigned long offset, + in unsigned long count) + raises(DOMException); + void replaceData(in unsigned long offset, + in unsigned long count, + in DOMString arg) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMComment.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMComment.idl new file mode 100644 index 00000000..82f42f35 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMComment.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMCharacterData.idl" + +/** + * The nsIDOMComment interface inherits from nsIDOMCharacterData and represents + * the content of a comment, i.e., all the characters between the starting + * '<!--' and ending '-->'. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9073-15b3-11d2-932e-00805f8add32)] +interface nsIDOMComment : nsIDOMCharacterData +{ +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCustomEvent.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCustomEvent.idl new file mode 100644 index 00000000..1abf3d8a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMCustomEvent.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMEvent.idl" + +/** + * The nsIDOMEventTarget interface is the interface implemented by all + * event targets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Events/ + */ + +[scriptable, uuid(55c7af7b-1a64-40bf-87eb-2c2cbee0491b)] +interface nsIDOMCustomEvent : nsIDOMEvent +{ + void setCurrentTarget(in nsIDOMNode target); + void setEventPhase(in unsigned short phase); + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDOMException.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDOMException.idl new file mode 100644 index 00000000..2302c3bf --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDOMException.idl @@ -0,0 +1,86 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * In general, DOM methods return specific error values in ordinary + * processing situations, such as out-of-bound errors. + * However, DOM operations can raise exceptions in "exceptional" + * circumstances, i.e., when an operation is impossible to perform + * (either for logical reasons, because data is lost, or because the + * implementation has become unstable) + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf910a-15b3-11d2-932e-00805f8add32)] +interface nsIDOMDOMException : nsISupports +{ + const unsigned short INDEX_SIZE_ERR = 1; + const unsigned short DOMSTRING_SIZE_ERR = 2; + const unsigned short HIERARCHY_REQUEST_ERR = 3; + const unsigned short WRONG_DOCUMENT_ERR = 4; + const unsigned short INVALID_CHARACTER_ERR = 5; + const unsigned short NO_DATA_ALLOWED_ERR = 6; + const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7; + const unsigned short NOT_FOUND_ERR = 8; + const unsigned short NOT_SUPPORTED_ERR = 9; + const unsigned short INUSE_ATTRIBUTE_ERR = 10; + // Introduced in DOM Level 2: + const unsigned short INVALID_STATE_ERR = 11; + // Introduced in DOM Level 2: + const unsigned short SYNTAX_ERR = 12; + // Introduced in DOM Level 2: + const unsigned short INVALID_MODIFICATION_ERR = 13; + // Introduced in DOM Level 2: + const unsigned short NAMESPACE_ERR = 14; + // Introduced in DOM Level 2: + const unsigned short INVALID_ACCESS_ERR = 15; + // Introduced in DOM Level 3: + const unsigned short VALIDATION_ERR = 16; + // Introduced in DOM Level 3: + const unsigned short TYPE_MISMATCH_ERR = 17; + + readonly attribute unsigned long code; +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDOMImplementation.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDOMImplementation.idl new file mode 100644 index 00000000..17441807 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDOMImplementation.idl @@ -0,0 +1,68 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMDOMImplementation interface provides a number of methods for + * performing operations that are independent of any particular instance + * of the document object model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9074-15b3-11d2-932e-00805f8add32)] +interface nsIDOMDOMImplementation : nsISupports +{ + boolean hasFeature(in DOMString feature, + in DOMString version); + + nsIDOMDocumentType createDocumentType(in DOMString qualifiedName, + in DOMString publicId, + in DOMString systemId) + raises(DOMException); + + nsIDOMDocument createDocument(in DOMString namespaceURI, + in DOMString qualifiedName, + in nsIDOMDocumentType doctype) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocument.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocument.idl new file mode 100644 index 00000000..ff48b212 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocument.idl @@ -0,0 +1,96 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * The nsIDOMDocument interface represents the entire HTML or XML document. + * Conceptually, it is the root of the document tree, and provides the + * primary access to the document's data. + * Since elements, text nodes, comments, processing instructions, etc. + * cannot exist outside the context of a Document, the nsIDOMDocument + * interface also contains the factory methods needed to create these + * objects. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9075-15b3-11d2-932e-00805f8add32)] +interface nsIDOMDocument : nsIDOMNode +{ + readonly attribute nsIDOMDocumentType doctype; + readonly attribute nsIDOMDOMImplementation implementation; + readonly attribute nsIDOMElement documentElement; + nsIDOMElement createElement(in DOMString tagName) + raises(DOMException); + nsIDOMDocumentFragment createDocumentFragment(); + nsIDOMText createTextNode(in DOMString data); + nsIDOMComment createComment(in DOMString data); + nsIDOMCDATASection createCDATASection(in DOMString data) + raises(DOMException); + nsIDOMProcessingInstruction createProcessingInstruction(in DOMString target, + in DOMString data) + raises(DOMException); + nsIDOMAttr createAttribute(in DOMString name) + raises(DOMException); + nsIDOMEntityReference createEntityReference(in DOMString name) + raises(DOMException); + nsIDOMNodeList getElementsByTagName(in DOMString tagname); + + // Introduced in DOM Level 2: + nsIDOMNode importNode(in nsIDOMNode importedNode, + in boolean deep) + raises(DOMException); + // Introduced in DOM Level 2: + nsIDOMElement createElementNS(in DOMString namespaceURI, + in DOMString qualifiedName) + raises(DOMException); + // Introduced in DOM Level 2: + nsIDOMAttr createAttributeNS(in DOMString namespaceURI, + in DOMString qualifiedName) + raises(DOMException); + // Introduced in DOM Level 2: + nsIDOMNodeList getElementsByTagNameNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + nsIDOMElement getElementById(in DOMString elementId); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentEvent.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentEvent.idl new file mode 100644 index 00000000..fd6b5b07 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentEvent.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMDocumentEvent interface is the interface to the event + * factory method on a DOM document object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ + +[scriptable, uuid(46b91d66-28e2-11d4-ab1e-0010830123b4)] +interface nsIDOMDocumentEvent : nsISupports +{ + nsIDOMEvent createEvent(in DOMString eventType) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentFragment.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentFragment.idl new file mode 100644 index 00000000..015210d1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentFragment.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * DocumentFragment is a "lightweight" or "minimal" Document object. + * nsIDOMDocumentFragment is used in situations where the Document + * interface can potentially be a heavyweight interface. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9076-15b3-11d2-932e-00805f8add32)] +interface nsIDOMDocumentFragment : nsIDOMNode +{ +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentRange.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentRange.idl new file mode 100644 index 00000000..efeee386 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentRange.idl @@ -0,0 +1,54 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@netscape.com> (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMDocumentRange interface is an interface to a document + * object that supports ranges in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ + * + * @status FROZEN + */ + +[scriptable, uuid(7b9badc6-c9bc-447a-8670-dbd195aed24b)] +interface nsIDOMDocumentRange : nsISupports { + nsIDOMRange createRange(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentStyle.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentStyle.idl new file mode 100644 index 00000000..7bff2f38 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentStyle.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMDocumentStyle interface is an interface to a document + * object that supports style sheets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(3d9f4973-dd2e-48f5-b5f7-2634e09eadd9)] +interface nsIDOMDocumentStyle : nsISupports +{ + readonly attribute nsIDOMStyleSheetList styleSheets; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentType.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentType.idl new file mode 100644 index 00000000..16c5e6cc --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentType.idl @@ -0,0 +1,63 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * Each Document has a doctype attribute whose value is either null + * or a DocumentType object. + * The nsIDOMDocumentType interface in the DOM Core provides an + * interface to the list of entities that are defined for the document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9077-15b3-11d2-932e-00805f8add32)] +interface nsIDOMDocumentType : nsIDOMNode +{ + readonly attribute DOMString name; + readonly attribute nsIDOMNamedNodeMap entities; + readonly attribute nsIDOMNamedNodeMap notations; + readonly attribute DOMString publicId; + readonly attribute DOMString systemId; + readonly attribute DOMString internalSubset; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentView.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentView.idl new file mode 100644 index 00000000..50579acc --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMDocumentView.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@netscape.com> (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMDocumentView interface is a datatype for a document that + * supports views in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Views + * + * @status FROZEN + */ + +[scriptable, uuid(1ACDB2BA-1DD2-11B2-95BC-9542495D2569)] +interface nsIDOMDocumentView : nsISupports +{ + readonly attribute nsIDOMAbstractView defaultView; +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMElement.idl new file mode 100644 index 00000000..d844f7bb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMElement.idl @@ -0,0 +1,94 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * The nsIDOMElement interface represents an element in an HTML or + * XML document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9078-15b3-11d2-932e-00805f8add32)] +interface nsIDOMElement : nsIDOMNode +{ + readonly attribute DOMString tagName; + DOMString getAttribute(in DOMString name); + void setAttribute(in DOMString name, + in DOMString value) + raises(DOMException); + void removeAttribute(in DOMString name) + raises(DOMException); + nsIDOMAttr getAttributeNode(in DOMString name); + nsIDOMAttr setAttributeNode(in nsIDOMAttr newAttr) + raises(DOMException); + nsIDOMAttr removeAttributeNode(in nsIDOMAttr oldAttr) + raises(DOMException); + nsIDOMNodeList getElementsByTagName(in DOMString name); + // Introduced in DOM Level 2: + DOMString getAttributeNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + void setAttributeNS(in DOMString namespaceURI, + in DOMString qualifiedName, + in DOMString value) + raises(DOMException); + // Introduced in DOM Level 2: + void removeAttributeNS(in DOMString namespaceURI, + in DOMString localName) + raises(DOMException); + // Introduced in DOM Level 2: + nsIDOMAttr getAttributeNodeNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + nsIDOMAttr setAttributeNodeNS(in nsIDOMAttr newAttr) + raises(DOMException); + // Introduced in DOM Level 2: + nsIDOMNodeList getElementsByTagNameNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + boolean hasAttribute(in DOMString name); + // Introduced in DOM Level 2: + boolean hasAttributeNS(in DOMString namespaceURI, + in DOMString localName); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMElementCSSInlineStyle.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMElementCSSInlineStyle.idl new file mode 100644 index 00000000..9a8ba629 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMElementCSSInlineStyle.idl @@ -0,0 +1,55 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@netscape.com> (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMElementCSSInlineStyle interface allows access to the inline + * style information for elements. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(99715845-95fc-4a56-aa53-214b65c26e22)] +interface nsIDOMElementCSSInlineStyle : nsISupports +{ + readonly attribute nsIDOMCSSStyleDeclaration style; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEntity.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEntity.idl new file mode 100644 index 00000000..ab27cdce --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEntity.idl @@ -0,0 +1,58 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * The nsIDOMEntity interface represents an entity, either parsed + * or unparsed, in an XML document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9079-15b3-11d2-932e-00805f8add32)] +interface nsIDOMEntity : nsIDOMNode +{ + readonly attribute DOMString publicId; + readonly attribute DOMString systemId; + readonly attribute DOMString notationName; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEntityReference.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEntityReference.idl new file mode 100644 index 00000000..70f9a104 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEntityReference.idl @@ -0,0 +1,55 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * nsIDOMEntityReference is an interface to a node that represents a + * reference to one of the entities defined in the document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf907a-15b3-11d2-932e-00805f8add32)] +interface nsIDOMEntityReference : nsIDOMNode +{ +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEvent.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEvent.idl new file mode 100644 index 00000000..6c3471a0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEvent.idl @@ -0,0 +1,174 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +interface nsIDOMEventTarget; + +/** + * The nsIDOMEvent interface is the primary datatype for all events in + * the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ + +[scriptable, uuid(a66b7b80-ff46-bd97-0080-5f8ae38add32)] +interface nsIDOMEvent : nsISupports +{ + // PhaseType + /** + * The current event phase is the capturing phase. + */ + const unsigned short CAPTURING_PHASE = 1; + + /** + * The event is currently being evaluated at the target EventTarget. + */ + const unsigned short AT_TARGET = 2; + + /** + * The current event phase is the bubbling phase. + */ + const unsigned short BUBBLING_PHASE = 3; + + /** + * The name of the event (case-insensitive). The name must be an XML + * name. + */ + readonly attribute DOMString type; + + /** + * Used to indicate the EventTarget to which the event was originally + * dispatched. + */ + readonly attribute nsIDOMEventTarget target; + + /** + * Used to indicate the EventTarget whose EventListeners are currently + * being processed. This is particularly useful during capturing and + * bubbling. + */ + readonly attribute nsIDOMEventTarget currentTarget; + + /** + * Used to indicate which phase of event flow is currently being + * evaluated. + */ + readonly attribute unsigned short eventPhase; + + /** + * Used to indicate whether or not an event is a bubbling event. If the + * event can bubble the value is true, else the value is false. + */ + readonly attribute boolean bubbles; + + /** + * Used to indicate whether or not an event can have its default action + * prevented. If the default action can be prevented the value is true, + * else the value is false. + */ + readonly attribute boolean cancelable; + + /** + * Used to specify the time (in milliseconds relative to the epoch) at + * which the event was created. Due to the fact that some systems may + * not provide this information the value of timeStamp may be not + * available for all events. When not available, a value of 0 will be + * returned. Examples of epoch time are the time of the system start or + * 0:0:0 UTC 1st January 1970. + */ + readonly attribute DOMTimeStamp timeStamp; + + /** + * The stopPropagation method is used prevent further propagation of an + * event during event flow. If this method is called by any + * EventListener the event will cease propagating through the tree. The + * event will complete dispatch to all listeners on the current + * EventTarget before event flow stops. This method may be used during + * any stage of event flow. + */ + void stopPropagation(); + + /** + * If an event is cancelable, the preventDefault method is used to + * signify that the event is to be canceled, meaning any default action + * normally taken by the implementation as a result of the event will + * not occur. If, during any stage of event flow, the preventDefault + * method is called the event is canceled. Any default action associated + * with the event will not occur. Calling this method for a + * non-cancelable event has no effect. Once preventDefault has been + * called it will remain in effect throughout the remainder of the + * event's propagation. This method may be used during any stage of + * event flow. + */ + void preventDefault(); + + /** + * The initEvent method is used to initialize the value of an Event + * created through the DocumentEvent interface. This method may only be + * called before the Event has been dispatched via the dispatchEvent + * method, though it may be called multiple times during that phase if + * necessary. If called multiple times the final invocation takes + * precedence. If called from a subclass of Event interface only the + * values specified in the initEvent method are modified, all other + * attributes are left unchanged. + * + * @param eventTypeArg Specifies the event type. This type may be + * any event type currently defined in this + * specification or a new event type.. The string + * must be an XML name. + * Any new event type must not begin with any + * upper, lower, or mixed case version of the + * string "DOM". This prefix is reserved for + * future DOM event sets. It is also strongly + * recommended that third parties adding their + * own events use their own prefix to avoid + * confusion and lessen the probability of + * conflicts with other new events. + * @param canBubbleArg Specifies whether or not the event can bubble. + * @param cancelableArg Specifies whether or not the event's default + * action can be prevented. + */ + void initEvent(in DOMString eventTypeArg, + in boolean canBubbleArg, + in boolean cancelableArg); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventGroup.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventGroup.idl new file mode 100644 index 00000000..e9e7c5d7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventGroup.idl @@ -0,0 +1,54 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMEventTarget interface is the interface implemented by all + * event targets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Events/ + */ + +[scriptable, uuid(33347bee-6620-4841-8152-36091ae80c7e)] +interface nsIDOMEventGroup : nsISupports +{ + // Introduced in DOM Level 3: + boolean isSameEventGroup(in nsIDOMEventGroup other); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventListener.idl new file mode 100644 index 00000000..6f2b1f67 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventListener.idl @@ -0,0 +1,65 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMEventListener interface is a callback interface for + * listening to events in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ + +[scriptable, function, uuid(df31c120-ded6-11d1-bd85-00805f8ae3f4)] +interface nsIDOMEventListener : nsISupports +{ + /** + * This method is called whenever an event occurs of the type for which + * the EventListener interface was registered. + * + * @param evt The Event contains contextual information about the + * event. It also contains the stopPropagation and + * preventDefault methods which are used in determining the + * event's flow and default action. + */ + void handleEvent(in nsIDOMEvent event); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventTarget.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventTarget.idl new file mode 100644 index 00000000..817824cb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMEventTarget.idl @@ -0,0 +1,128 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMEventTarget interface is the interface implemented by all + * event targets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ + +[scriptable, uuid(1c773b30-d1cf-11d2-bd95-00805f8ae3f4)] +interface nsIDOMEventTarget : nsISupports +{ + /** + * This method allows the registration of event listeners on the event target. + * If an EventListener is added to an EventTarget while it is processing an + * event, it will not be triggered by the current actions but may be + * triggered during a later stage of event flow, such as the bubbling phase. + * + * If multiple identical EventListeners are registered on the same + * EventTarget with the same parameters the duplicate instances are + * discarded. They do not cause the EventListener to be called twice + * and since they are discarded they do not need to be removed with the + * removeEventListener method. + * + * @param type The event type for which the user is registering + * @param listener The listener parameter takes an interface + * implemented by the user which contains the methods + * to be called when the event occurs. + * @param useCapture If true, useCapture indicates that the user + * wishes to initiate capture. After initiating + * capture, all events of the specified type will be + * dispatched to the registered EventListener before + * being dispatched to any EventTargets beneath them + * in the tree. Events which are bubbling upward + * through the tree will not trigger an + * EventListener designated to use capture. + */ + void addEventListener(in DOMString type, + in nsIDOMEventListener listener, + in boolean useCapture); + + /** + * This method allows the removal of event listeners from the event + * target. If an EventListener is removed from an EventTarget while it + * is processing an event, it will not be triggered by the current actions. + * EventListeners can never be invoked after being removed. + * Calling removeEventListener with arguments which do not identify any + * currently registered EventListener on the EventTarget has no effect. + * + * @param type Specifies the event type of the EventListener being + * removed. + * @param listener The EventListener parameter indicates the + * EventListener to be removed. + * @param useCapture Specifies whether the EventListener being + * removed was registered as a capturing listener or + * not. If a listener was registered twice, one with + * capture and one without, each must be removed + * separately. Removal of a capturing listener does + * not affect a non-capturing version of the same + * listener, and vice versa. + */ + void removeEventListener(in DOMString type, + in nsIDOMEventListener listener, + in boolean useCapture); + + /** + * This method allows the dispatch of events into the implementations + * event model. Events dispatched in this manner will have the same + * capturing and bubbling behavior as events dispatched directly by the + * implementation. The target of the event is the EventTarget on which + * dispatchEvent is called. + * + * @param evt Specifies the event type, behavior, and contextual + * information to be used in processing the event. + * @return Indicates whether any of the listeners which handled the + * event called preventDefault. If preventDefault was called + * the value is false, else the value is true. + * @throws UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was + * not specified by initializing the event before + * dispatchEvent was called. Specification of the Event's + * type as null or an empty string will also trigger this + * exception. + */ + boolean dispatchEvent(in nsIDOMEvent evt) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAnchorElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAnchorElement.idl new file mode 100644 index 00000000..52322611 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAnchorElement.idl @@ -0,0 +1,69 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLAnchorElement interface is the interface to a [X]HTML + * a element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90aa-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement +{ + attribute DOMString accessKey; + attribute DOMString charset; + attribute DOMString coords; + attribute DOMString href; + attribute DOMString hreflang; + attribute DOMString name; + attribute DOMString rel; + attribute DOMString rev; + attribute DOMString shape; + attribute long tabIndex; + attribute DOMString target; + attribute DOMString type; + void blur(); + void focus(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAppletElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAppletElement.idl new file mode 100644 index 00000000..25e541dd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAppletElement.idl @@ -0,0 +1,69 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLAppletElement interface is the interface to a [X]HTML + * applet element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90ae-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLAppletElement : nsIDOMHTMLElement +{ + attribute DOMString align; + attribute DOMString alt; + attribute DOMString archive; + attribute DOMString code; + attribute DOMString codeBase; + attribute DOMString height; + // Modified in DOM Level 2: + attribute long hspace; + attribute DOMString name; + // Modified in DOM Level 2: + attribute DOMString object; + // Modified in DOM Level 2: + attribute long vspace; + attribute DOMString width; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAreaElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAreaElement.idl new file mode 100644 index 00000000..5ac481fb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLAreaElement.idl @@ -0,0 +1,63 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLAreaElement interface is the interface to a [X]HTML + * area element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b0-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLAreaElement : nsIDOMHTMLElement +{ + attribute DOMString accessKey; + attribute DOMString alt; + attribute DOMString coords; + attribute DOMString href; + attribute boolean noHref; + attribute DOMString shape; + attribute long tabIndex; + attribute DOMString target; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBRElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBRElement.idl new file mode 100644 index 00000000..952c3845 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBRElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLBRElement interface is the interface to a [X]HTML br + * element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a5-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLBRElement : nsIDOMHTMLElement +{ + attribute DOMString clear; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBaseElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBaseElement.idl new file mode 100644 index 00000000..da4477a8 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBaseElement.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLBaseElement interface is the interface to a [X]HTML + * base element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf908b-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLBaseElement : nsIDOMHTMLElement +{ + attribute DOMString href; + attribute DOMString target; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBaseFontElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBaseFontElement.idl new file mode 100644 index 00000000..30997104 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBaseFontElement.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLBaseFontElement interface is the interface to a + * [X]HTML basefont element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a6-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLBaseFontElement : nsIDOMHTMLElement +{ + attribute DOMString color; + attribute DOMString face; + // Modified in DOM Level 2: + attribute long size; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBodyElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBodyElement.idl new file mode 100644 index 00000000..055c8a65 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLBodyElement.idl @@ -0,0 +1,61 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLBodyElement interface is the interface to a [X]HTML + * body element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf908e-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement +{ + attribute DOMString aLink; + attribute DOMString background; + attribute DOMString bgColor; + attribute DOMString link; + attribute DOMString text; + attribute DOMString vLink; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLButtonElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLButtonElement.idl new file mode 100644 index 00000000..13b5cb55 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLButtonElement.idl @@ -0,0 +1,65 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLButtonElement interface is the interface to a [X]HTML + * button element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9095-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLButtonElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLFormElement form; + attribute DOMString accessKey; + attribute boolean disabled; + attribute DOMString name; + attribute long tabIndex; + // The scriptable version of type is writable and lives on + // nsIDOMNSHTMLButtonElement (have to do it this way because this + // interface is frozen and we don't want to break binary compat). + [noscript] readonly attribute DOMString type; + attribute DOMString value; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLCollection.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLCollection.idl new file mode 100644 index 00000000..66b8e78a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLCollection.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMHTMLCollection interface is an interface to a collection + * of [X]HTML elements. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9083-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLCollection : nsISupports +{ + readonly attribute unsigned long length; + + nsIDOMNode item(in unsigned long index); + nsIDOMNode namedItem(in DOMString name); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDListElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDListElement.idl new file mode 100644 index 00000000..2dabc8ae --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDListElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLDListElement interface is the interface to a [X]HTML + * dl element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf909b-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLDListElement : nsIDOMHTMLElement +{ + attribute boolean compact; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDirectoryElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDirectoryElement.idl new file mode 100644 index 00000000..2d208ed4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDirectoryElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLDirectoryElement interface is the interface to a + * [X]HTML dir element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf909c-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLDirectoryElement : nsIDOMHTMLElement +{ + attribute boolean compact; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDivElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDivElement.idl new file mode 100644 index 00000000..4c321eb3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDivElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLDivElement interface is the interface to a [X]HTML + * div element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a0-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLDivElement : nsIDOMHTMLElement +{ + attribute DOMString align; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDocument.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDocument.idl new file mode 100644 index 00000000..b1093fde --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLDocument.idl @@ -0,0 +1,84 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMDocument.idl" + +/** + * The nsIDOMHTMLDocument interface is the interface to a [X]HTML + * document object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9084-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLDocument : nsIDOMDocument +{ + attribute DOMString title; + readonly attribute DOMString referrer; + // domain is readonly per spec, but it's settable in + // nsIDOMNSHTMLDocument + [noscript] readonly attribute DOMString domain; + readonly attribute DOMString URL; + attribute nsIDOMHTMLElement body; + readonly attribute nsIDOMHTMLCollection images; + readonly attribute nsIDOMHTMLCollection applets; + readonly attribute nsIDOMHTMLCollection links; + readonly attribute nsIDOMHTMLCollection forms; + readonly attribute nsIDOMHTMLCollection anchors; + attribute DOMString cookie; + // raises(DOMException) on setting + + // open() is noscript here since the DOM Level 0 version of open() + // returned nsIDOMDocument, and not void. The script version of + // open() is defined in nsIDOMNSHTMLDocument. + [noscript] void open(); + void close(); + + // The methods write() and writeln() must be callable from JS with + // no arguments for backwards compatibility, thus they are marked + // [noscript] here. The JS versions of these methods are defined in + // nsIDOMNSHTMLDocument. + [noscript] void write(in DOMString text); + [noscript] void writeln(in DOMString text); + + nsIDOMNodeList getElementsByName(in DOMString elementName); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLElement.idl new file mode 100644 index 00000000..5f1a4168 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLElement.idl @@ -0,0 +1,61 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMElement.idl" + +/** + * The nsIDOMHTMLElement interface is the primary [X]HTML element + * interface. It represents a single [X]HTML element in the document + * tree. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9085-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLElement : nsIDOMElement +{ + attribute DOMString id; + attribute DOMString title; + attribute DOMString lang; + attribute DOMString dir; + attribute DOMString className; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLEmbedElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLEmbedElement.idl new file mode 100644 index 00000000..18dc9ea9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLEmbedElement.idl @@ -0,0 +1,61 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLEmbedElement interface is the interface to a [X]HTML + * embed element. + * + * Note that this is not a W3C standard interface, it is Mozilla + * proprietary. + * + * @status FROZEN + */ + +[scriptable, uuid(123f90ab-15b3-11d2-456e-00805f8add32)] +interface nsIDOMHTMLEmbedElement : nsIDOMHTMLElement +{ + attribute DOMString align; + attribute DOMString height; + attribute DOMString name; + attribute DOMString src; + attribute DOMString type; + attribute DOMString width; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFieldSetElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFieldSetElement.idl new file mode 100644 index 00000000..a5f114f4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFieldSetElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLFieldSetElement interface is the interface to a + * [X]HTML fieldset element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9097-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLFieldSetElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLFormElement form; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFontElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFontElement.idl new file mode 100644 index 00000000..b5cc7a9c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFontElement.idl @@ -0,0 +1,58 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLFontElement interface is the interface to a [X]HTML + * font element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a7-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLFontElement : nsIDOMHTMLElement +{ + attribute DOMString color; + attribute DOMString face; + attribute DOMString size; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFormElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFormElement.idl new file mode 100644 index 00000000..6e442358 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFormElement.idl @@ -0,0 +1,65 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLFormElement interface is the interface to a [X]HTML + * form element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf908f-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLFormElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLCollection elements; + readonly attribute long length; + attribute DOMString name; + attribute DOMString acceptCharset; + attribute DOMString action; + attribute DOMString enctype; + attribute DOMString method; + attribute DOMString target; + void submit(); + void reset(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFrameElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFrameElement.idl new file mode 100644 index 00000000..67059223 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFrameElement.idl @@ -0,0 +1,65 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLFrameElement interface is the interface to a [X]HTML + * frame element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b9-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement +{ + attribute DOMString frameBorder; + attribute DOMString longDesc; + attribute DOMString marginHeight; + attribute DOMString marginWidth; + attribute DOMString name; + attribute boolean noResize; + attribute DOMString scrolling; + attribute DOMString src; + // Introduced in DOM Level 2: + readonly attribute nsIDOMDocument contentDocument; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFrameSetElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFrameSetElement.idl new file mode 100644 index 00000000..d67d7168 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLFrameSetElement.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLFrameSetElement interface is the interface to a + * [X]HTML frameset element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b8-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLFrameSetElement : nsIDOMHTMLElement +{ + attribute DOMString cols; + attribute DOMString rows; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHRElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHRElement.idl new file mode 100644 index 00000000..ca9ead38 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHRElement.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLHRElement interface is the interface to a [X]HTML hr + * element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a8-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLHRElement : nsIDOMHTMLElement +{ + attribute DOMString align; + attribute boolean noShade; + attribute DOMString size; + attribute DOMString width; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHeadElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHeadElement.idl new file mode 100644 index 00000000..8ca74526 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHeadElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLHeadElement interface is the interface to a [X]HTML + * head element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9087-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLHeadElement : nsIDOMHTMLElement +{ + attribute DOMString profile; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHeadingElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHeadingElement.idl new file mode 100644 index 00000000..463f2faf --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHeadingElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLHeadingElement interface is the interface to a + * [X]HTML h1, h2, h3, ... element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a2-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLHeadingElement : nsIDOMHTMLElement +{ + attribute DOMString align; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHtmlElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHtmlElement.idl new file mode 100644 index 00000000..8e8ed09d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLHtmlElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLHtmlElement interface is the interface to a [X]HTML + * html element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9086-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLHtmlElement : nsIDOMHTMLElement +{ + attribute DOMString version; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLIFrameElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLIFrameElement.idl new file mode 100644 index 00000000..3b8dd181 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLIFrameElement.idl @@ -0,0 +1,67 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLIFrameElement interface is the interface to a [X]HTML + * iframe element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90ba-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement +{ + attribute DOMString align; + attribute DOMString frameBorder; + attribute DOMString height; + attribute DOMString longDesc; + attribute DOMString marginHeight; + attribute DOMString marginWidth; + attribute DOMString name; + attribute DOMString scrolling; + attribute DOMString src; + attribute DOMString width; + // Introduced in DOM Level 2: + readonly attribute nsIDOMDocument contentDocument; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLImageElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLImageElement.idl new file mode 100644 index 00000000..8b2df7bb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLImageElement.idl @@ -0,0 +1,71 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLImageElement interface is the interface to a [X]HTML + * img element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90ab-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLImageElement : nsIDOMHTMLElement +{ + attribute DOMString name; + attribute DOMString align; + attribute DOMString alt; + attribute DOMString border; + // Modified in DOM Level 2: + attribute long height; + // Modified in DOM Level 2: + attribute long hspace; + attribute boolean isMap; + attribute DOMString longDesc; + attribute DOMString src; + attribute DOMString useMap; + // Modified in DOM Level 2: + attribute long vspace; + // Modified in DOM Level 2: + attribute long width; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLInputElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLInputElement.idl new file mode 100644 index 00000000..ce39a9f6 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLInputElement.idl @@ -0,0 +1,79 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLInputElement interface is the interface to a [X]HTML + * input element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9093-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLInputElement : nsIDOMHTMLElement +{ + attribute DOMString defaultValue; + attribute boolean defaultChecked; + readonly attribute nsIDOMHTMLFormElement form; + attribute DOMString accept; + attribute DOMString accessKey; + attribute DOMString align; + attribute DOMString alt; + attribute boolean checked; + attribute boolean disabled; + attribute long maxLength; + attribute DOMString name; + attribute boolean readOnly; + // Modified in DOM Level 2: + attribute unsigned long size; + attribute DOMString src; + attribute long tabIndex; + // Modified in DOM Level 2: + attribute DOMString type; + attribute DOMString useMap; + attribute DOMString value; + void blur(); + void focus(); + void select(); + void click(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLIsIndexElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLIsIndexElement.idl new file mode 100644 index 00000000..0714a992 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLIsIndexElement.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLIsIndexElement interface is the interface to a + * [X]HTML isindex element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf908c-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLIsIndexElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLFormElement form; + attribute DOMString prompt; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLIElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLIElement.idl new file mode 100644 index 00000000..27dd95ed --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLIElement.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLLIElement interface is the interface to a [X]HTML li + * element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf909e-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLLIElement : nsIDOMHTMLElement +{ + attribute DOMString type; + attribute long value; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLabelElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLabelElement.idl new file mode 100644 index 00000000..a8f5572b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLabelElement.idl @@ -0,0 +1,58 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLLabelElement interface is the interface to a [X]HTML + * label element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9096-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLLabelElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLFormElement form; + attribute DOMString accessKey; + attribute DOMString htmlFor; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLegendElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLegendElement.idl new file mode 100644 index 00000000..116f0812 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLegendElement.idl @@ -0,0 +1,58 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLLegendElement interface is the interface to a [X]HTML + * legend element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9098-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLLegendElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLFormElement form; + attribute DOMString accessKey; + attribute DOMString align; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLinkElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLinkElement.idl new file mode 100644 index 00000000..935e4b73 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLLinkElement.idl @@ -0,0 +1,64 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLLinkElement interface is the interface to a [X]HTML + * link element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9088-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLLinkElement : nsIDOMHTMLElement +{ + attribute boolean disabled; + attribute DOMString charset; + attribute DOMString href; + attribute DOMString hreflang; + attribute DOMString media; + attribute DOMString rel; + attribute DOMString rev; + attribute DOMString target; + attribute DOMString type; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMapElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMapElement.idl new file mode 100644 index 00000000..8a9365a3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMapElement.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLMapElement interface is the interface to a [X]HTML + * map element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90af-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLMapElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLCollection areas; + attribute DOMString name; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMenuElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMenuElement.idl new file mode 100644 index 00000000..55af8c02 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMenuElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLMenuElement interface is the interface to a [X]HTML + * menu element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf909d-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLMenuElement : nsIDOMHTMLElement +{ + attribute boolean compact; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMetaElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMetaElement.idl new file mode 100644 index 00000000..e769984d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLMetaElement.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLMetaElement interface is the interface to a [X]HTML + * meta element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf908a-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLMetaElement : nsIDOMHTMLElement +{ + attribute DOMString content; + attribute DOMString httpEquiv; + attribute DOMString name; + attribute DOMString scheme; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLModElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLModElement.idl new file mode 100644 index 00000000..483a54ea --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLModElement.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLModElement interface is the interface to a [X]HTML + * ins and del element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a9-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLModElement : nsIDOMHTMLElement +{ + attribute DOMString cite; + attribute DOMString dateTime; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOListElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOListElement.idl new file mode 100644 index 00000000..5ed6a57d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOListElement.idl @@ -0,0 +1,58 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLOListElement interface is the interface to a [X]HTML + * ol element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf909a-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLOListElement : nsIDOMHTMLElement +{ + attribute boolean compact; + attribute long start; + attribute DOMString type; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLObjectElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLObjectElement.idl new file mode 100644 index 00000000..5f285a36 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLObjectElement.idl @@ -0,0 +1,75 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLObjectElement interface is the interface to a [X]HTML + * object element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90ac-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLFormElement form; + attribute DOMString code; + attribute DOMString align; + attribute DOMString archive; + attribute DOMString border; + attribute DOMString codeBase; + attribute DOMString codeType; + attribute DOMString data; + attribute boolean declare; + attribute DOMString height; + attribute long hspace; + attribute DOMString name; + attribute DOMString standby; + attribute long tabIndex; + attribute DOMString type; + attribute DOMString useMap; + attribute long vspace; + attribute DOMString width; + // Introduced in DOM Level 2: + readonly attribute nsIDOMDocument contentDocument; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptGroupElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptGroupElement.idl new file mode 100644 index 00000000..a8c11433 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptGroupElement.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLOptGroupElement interface is the interface to a + * [X]HTML optgroup element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9091-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLOptGroupElement : nsIDOMHTMLElement +{ + attribute boolean disabled; + attribute DOMString label; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptionElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptionElement.idl new file mode 100644 index 00000000..66d0789c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptionElement.idl @@ -0,0 +1,65 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLOptionElement interface is the interface to a [X]HTML + * option element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9092-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement +{ + readonly attribute nsIDOMHTMLFormElement form; + // Modified in DOM Level 2: + attribute boolean defaultSelected; + readonly attribute DOMString text; + // Modified in DOM Level 2: + readonly attribute long index; + attribute boolean disabled; + attribute DOMString label; + attribute boolean selected; + attribute DOMString value; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptionsCollection.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptionsCollection.idl new file mode 100644 index 00000000..cdce3996 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLOptionsCollection.idl @@ -0,0 +1,60 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2003 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@netscape.com> + * + * 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLOptionsCollection interface is the interface to a + * collection of [X]HTML option elements. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +// Introduced in DOM Level 2: +[scriptable, uuid(bce0213c-f70f-488f-b93f-688acca55d63)] +interface nsIDOMHTMLOptionsCollection : nsISupports +{ + attribute unsigned long length; + // raises(DOMException) on setting + + nsIDOMNode item(in unsigned long index); + nsIDOMNode namedItem(in DOMString name); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLParagraphElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLParagraphElement.idl new file mode 100644 index 00000000..4acc1703 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLParagraphElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLParagraphElement interface is the interface to a + * [X]HTML p element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a1-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLParagraphElement : nsIDOMHTMLElement +{ + attribute DOMString align; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLParamElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLParamElement.idl new file mode 100644 index 00000000..a6cb3371 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLParamElement.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLParamElement interface is the interface to a [X]HTML + * param element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90ad-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLParamElement : nsIDOMHTMLElement +{ + attribute DOMString name; + attribute DOMString type; + attribute DOMString value; + attribute DOMString valueType; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLPreElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLPreElement.idl new file mode 100644 index 00000000..69231573 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLPreElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLPreElement interface is the interface to a [X]HTML + * pre element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a4-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLPreElement : nsIDOMHTMLElement +{ + attribute long width; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLQuoteElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLQuoteElement.idl new file mode 100644 index 00000000..eda43047 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLQuoteElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLQuoteElement interface is the interface to a [X]HTML + * q element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90a3-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLQuoteElement : nsIDOMHTMLElement +{ + attribute DOMString cite; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLScriptElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLScriptElement.idl new file mode 100644 index 00000000..443e2d56 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLScriptElement.idl @@ -0,0 +1,62 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLScriptElement interface is the interface to a [X]HTML + * script element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b1-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement +{ + attribute DOMString text; + attribute DOMString htmlFor; + attribute DOMString event; + attribute DOMString charset; + attribute boolean defer; + attribute DOMString src; + attribute DOMString type; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLSelectElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLSelectElement.idl new file mode 100644 index 00000000..4847da26 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLSelectElement.idl @@ -0,0 +1,77 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" +#include "nsIDOMHTMLOptionsCollection.idl" + +/** + * The nsIDOMHTMLSelectElement interface is the interface to a [X]HTML + * select element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9090-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement +{ + readonly attribute DOMString type; + attribute long selectedIndex; + attribute DOMString value; + // Modified in DOM Level 2: + attribute unsigned long length; + // raises(DOMException) on setting + + readonly attribute nsIDOMHTMLFormElement form; + // Modified in DOM Level 2: + readonly attribute nsIDOMHTMLOptionsCollection options; + attribute boolean disabled; + attribute boolean multiple; + attribute DOMString name; + attribute long size; + attribute long tabIndex; + void add(in nsIDOMHTMLElement element, + in nsIDOMHTMLElement before) + raises(DOMException); + void remove(in long index); + void blur(); + void focus(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLStyleElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLStyleElement.idl new file mode 100644 index 00000000..9a32296a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLStyleElement.idl @@ -0,0 +1,58 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLStyleElement interface is the interface to a [X]HTML + * style element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf908d-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement +{ + attribute boolean disabled; + attribute DOMString media; + attribute DOMString type; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableCaptionElem.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableCaptionElem.idl new file mode 100644 index 00000000..039b8fa4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableCaptionElem.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLTableCaptionElement interface is the interface to a + * [X]HTML caption element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b3-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLTableCaptionElement : nsIDOMHTMLElement +{ + attribute DOMString align; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableCellElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableCellElement.idl new file mode 100644 index 00000000..00610da5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableCellElement.idl @@ -0,0 +1,70 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLTableCellElement interface is the interface to a + * [X]HTML td element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b7-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLTableCellElement : nsIDOMHTMLElement +{ + readonly attribute long cellIndex; + attribute DOMString abbr; + attribute DOMString align; + attribute DOMString axis; + attribute DOMString bgColor; + attribute DOMString ch; + attribute DOMString chOff; + attribute long colSpan; + attribute DOMString headers; + attribute DOMString height; + attribute boolean noWrap; + attribute long rowSpan; + attribute DOMString scope; + attribute DOMString vAlign; + attribute DOMString width; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableColElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableColElement.idl new file mode 100644 index 00000000..e63e8403 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableColElement.idl @@ -0,0 +1,61 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLTableColElement interface is the interface to a + * [X]HTML col element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b4-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLTableColElement : nsIDOMHTMLElement +{ + attribute DOMString align; + attribute DOMString ch; + attribute DOMString chOff; + attribute long span; + attribute DOMString vAlign; + attribute DOMString width; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableElement.idl new file mode 100644 index 00000000..9791e932 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableElement.idl @@ -0,0 +1,90 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLTableElement interface is the interface to a [X]HTML + * table element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b2-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLTableElement : nsIDOMHTMLElement +{ + // Modified in DOM Level 2: + attribute nsIDOMHTMLTableCaptionElement caption; + // raises(DOMException) on setting + + // Modified in DOM Level 2: + attribute nsIDOMHTMLTableSectionElement tHead; + // raises(DOMException) on setting + + // Modified in DOM Level 2: + attribute nsIDOMHTMLTableSectionElement tFoot; + // raises(DOMException) on setting + + readonly attribute nsIDOMHTMLCollection rows; + readonly attribute nsIDOMHTMLCollection tBodies; + attribute DOMString align; + attribute DOMString bgColor; + attribute DOMString border; + attribute DOMString cellPadding; + attribute DOMString cellSpacing; + attribute DOMString frame; + attribute DOMString rules; + attribute DOMString summary; + attribute DOMString width; + nsIDOMHTMLElement createTHead(); + void deleteTHead(); + nsIDOMHTMLElement createTFoot(); + void deleteTFoot(); + nsIDOMHTMLElement createCaption(); + void deleteCaption(); + // Modified in DOM Level 2: + nsIDOMHTMLElement insertRow(in long index) + raises(DOMException); + // Modified in DOM Level 2: + void deleteRow(in long index) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableRowElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableRowElement.idl new file mode 100644 index 00000000..318fa6b5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableRowElement.idl @@ -0,0 +1,72 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLTableRowElement interface is the interface to a + * [X]HTML tr element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b6-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement +{ + // Modified in DOM Level 2: + readonly attribute long rowIndex; + // Modified in DOM Level 2: + readonly attribute long sectionRowIndex; + // Modified in DOM Level 2: + readonly attribute nsIDOMHTMLCollection cells; + attribute DOMString align; + attribute DOMString bgColor; + attribute DOMString ch; + attribute DOMString chOff; + attribute DOMString vAlign; + // Modified in DOM Level 2: + nsIDOMHTMLElement insertCell(in long index) + raises(DOMException); + // Modified in DOM Level 2: + void deleteCell(in long index) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableSectionElem.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableSectionElem.idl new file mode 100644 index 00000000..56c016fb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTableSectionElem.idl @@ -0,0 +1,66 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLTableSectionElement interface is the interface to a + * [X]HTML thead, tbody, and tfoot element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90b5-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLTableSectionElement : nsIDOMHTMLElement +{ + attribute DOMString align; + attribute DOMString ch; + attribute DOMString chOff; + attribute DOMString vAlign; + readonly attribute nsIDOMHTMLCollection rows; + // Modified in DOM Level 2: + nsIDOMHTMLElement insertRow(in long index) + raises(DOMException); + // Modified in DOM Level 2: + void deleteRow(in long index) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTextAreaElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTextAreaElement.idl new file mode 100644 index 00000000..597975af --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTextAreaElement.idl @@ -0,0 +1,70 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLTextAreaElement interface is the interface to a + * [X]HTML textarea element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9094-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement +{ + // Modified in DOM Level 2: + attribute DOMString defaultValue; + readonly attribute nsIDOMHTMLFormElement form; + attribute DOMString accessKey; + attribute long cols; + attribute boolean disabled; + attribute DOMString name; + attribute boolean readOnly; + attribute long rows; + attribute long tabIndex; + readonly attribute DOMString type; + attribute DOMString value; + void blur(); + void focus(); + void select(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTitleElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTitleElement.idl new file mode 100644 index 00000000..e082ecce --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLTitleElement.idl @@ -0,0 +1,56 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLTitleElement interface is the interface to a [X]HTML + * title element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9089-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLTitleElement : nsIDOMHTMLElement +{ + attribute DOMString text; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLUListElement.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLUListElement.idl new file mode 100644 index 00000000..37fc005b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMHTMLUListElement.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMHTMLElement.idl" + +/** + * The nsIDOMHTMLUListElement interface is the interface to a [X]HTML + * ul element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9099-15b3-11d2-932e-00805f8add32)] +interface nsIDOMHTMLUListElement : nsIDOMHTMLElement +{ + attribute boolean compact; + attribute DOMString type; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMMediaList.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMMediaList.idl new file mode 100644 index 00000000..044192ad --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMMediaList.idl @@ -0,0 +1,64 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMMediaList interface is a datatype for a list of media + * types in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(9b0c2ed7-111c-4824-adf9-ef0da6dad371)] +interface nsIDOMMediaList : nsISupports +{ + attribute DOMString mediaText; + // raises(DOMException) on setting + + readonly attribute unsigned long length; + DOMString item(in unsigned long index); + void deleteMedium(in DOMString oldMedium) + raises(DOMException); + void appendMedium(in DOMString newMedium) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMMouseEvent.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMMouseEvent.idl new file mode 100644 index 00000000..4b9089ed --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMMouseEvent.idl @@ -0,0 +1,84 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMUIEvent.idl" + +/** + * The nsIDOMMouseEvent interface is the datatype for all mouse events + * in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ + +[scriptable, uuid(ff751edc-8b02-aae7-0010-8301838a3123)] +interface nsIDOMMouseEvent : nsIDOMUIEvent +{ + readonly attribute long screenX; + readonly attribute long screenY; + + readonly attribute long clientX; + readonly attribute long clientY; + + readonly attribute boolean ctrlKey; + readonly attribute boolean shiftKey; + readonly attribute boolean altKey; + readonly attribute boolean metaKey; + + readonly attribute unsigned short button; + readonly attribute nsIDOMEventTarget relatedTarget; + + void initMouseEvent(in DOMString typeArg, + in boolean canBubbleArg, + in boolean cancelableArg, + in nsIDOMAbstractView viewArg, + in long detailArg, + in long screenXArg, + in long screenYArg, + in long clientXArg, + in long clientYArg, + in boolean ctrlKeyArg, + in boolean altKeyArg, + in boolean shiftKeyArg, + in boolean metaKeyArg, + in unsigned short buttonArg, + in nsIDOMEventTarget relatedTargetArg); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNSDocumentStyle.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNSDocumentStyle.idl new file mode 100644 index 00000000..7e4414e5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNSDocumentStyle.idl @@ -0,0 +1,60 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 nsIDOMNSDocumentStyle interface definition. + * + * The Initial Developer of the Original Code is + * Boris Zbarsky <bzbarsky@mit.edu> + * Portions created by the Initial Developer are Copyright (C) 2003 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" +#include "nsIDOMDocumentStyle.idl" + +/** + * The nsIDOMNSDocumentStyle interface is an extension to the + * nsIDOMDocumentStyle interface. This interface exposes more ways to interact + * with style sheets in the Document Object Model. This interface is currently + * very much experimental. + */ + +[scriptable, uuid(4ecdf254-a21e-47b0-8d72-55da8208299f)] +interface nsIDOMNSDocumentStyle : nsIDOMDocumentStyle +{ + /** + * This attribute indicates the preferredStylesheetSet as set by the + * author. It is determined from the order of stylesheet declarations and the + * Default-Style HTTP headers. See [[HTML4]]. If there is no preferred + * stylesheet set, this attribute returns the empty string. The case of this + * attribute must exactly match the case given by the author where the + * preferred stylesheet is specified or implied. + */ + readonly attribute DOMString preferredStylesheetSet; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNamedNodeMap.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNamedNodeMap.idl new file mode 100644 index 00000000..9f0a9998 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNamedNodeMap.idl @@ -0,0 +1,72 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * Objects implementing the nsIDOMNamedNodeMap interface are used to + * represent collections of nodes that can be accessed by name. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf907b-15b3-11d2-932e-00805f8add32)] +interface nsIDOMNamedNodeMap : nsISupports +{ + nsIDOMNode getNamedItem(in DOMString name); + nsIDOMNode setNamedItem(in nsIDOMNode arg) + raises(DOMException); + nsIDOMNode removeNamedItem(in DOMString name) + raises(DOMException); + nsIDOMNode item(in unsigned long index); + readonly attribute unsigned long length; + // Introduced in DOM Level 2: + nsIDOMNode getNamedItemNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + nsIDOMNode setNamedItemNS(in nsIDOMNode arg) + raises(DOMException); + // Introduced in DOM Level 2: + nsIDOMNode removeNamedItemNS(in DOMString namespaceURI, + in DOMString localName) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNode.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNode.idl new file mode 100644 index 00000000..88383598 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNode.idl @@ -0,0 +1,110 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMNode interface is the primary datatype for the entire + * Document Object Model. + * It represents a single node in the document tree. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf907c-15b3-11d2-932e-00805f8add32)] +interface nsIDOMNode : nsISupports +{ + const unsigned short ELEMENT_NODE = 1; + const unsigned short ATTRIBUTE_NODE = 2; + const unsigned short TEXT_NODE = 3; + const unsigned short CDATA_SECTION_NODE = 4; + const unsigned short ENTITY_REFERENCE_NODE = 5; + const unsigned short ENTITY_NODE = 6; + const unsigned short PROCESSING_INSTRUCTION_NODE = 7; + const unsigned short COMMENT_NODE = 8; + const unsigned short DOCUMENT_NODE = 9; + const unsigned short DOCUMENT_TYPE_NODE = 10; + const unsigned short DOCUMENT_FRAGMENT_NODE = 11; + const unsigned short NOTATION_NODE = 12; + + readonly attribute DOMString nodeName; + attribute DOMString nodeValue; + // raises(DOMException) on setting + // raises(DOMException) on retrieval + readonly attribute unsigned short nodeType; + readonly attribute nsIDOMNode parentNode; + readonly attribute nsIDOMNodeList childNodes; + readonly attribute nsIDOMNode firstChild; + readonly attribute nsIDOMNode lastChild; + readonly attribute nsIDOMNode previousSibling; + readonly attribute nsIDOMNode nextSibling; + readonly attribute nsIDOMNamedNodeMap attributes; + // Modified in DOM Level 2: + readonly attribute nsIDOMDocument ownerDocument; + nsIDOMNode insertBefore(in nsIDOMNode newChild, + in nsIDOMNode refChild) + raises(DOMException); + nsIDOMNode replaceChild(in nsIDOMNode newChild, + in nsIDOMNode oldChild) + raises(DOMException); + nsIDOMNode removeChild(in nsIDOMNode oldChild) + raises(DOMException); + nsIDOMNode appendChild(in nsIDOMNode newChild) + raises(DOMException); + boolean hasChildNodes(); + nsIDOMNode cloneNode(in boolean deep); + // Modified in DOM Level 2: + void normalize(); + // Introduced in DOM Level 2: + boolean isSupported(in DOMString feature, + in DOMString version); + // Introduced in DOM Level 2: + readonly attribute DOMString namespaceURI; + // Introduced in DOM Level 2: + attribute DOMString prefix; + // raises(DOMException) on setting + + // Introduced in DOM Level 2: + readonly attribute DOMString localName; + // Introduced in DOM Level 2: + boolean hasAttributes(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNodeList.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNodeList.idl new file mode 100644 index 00000000..a6ffebfb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNodeList.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMNodeList interface provides the abstraction of an ordered + * collection of nodes, without defining or constraining how this collection + * is implemented. + * The items in the list are accessible via an integral index, starting from 0. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf907d-15b3-11d2-932e-00805f8add32)] +interface nsIDOMNodeList : nsISupports +{ + nsIDOMNode item(in unsigned long index); + readonly attribute unsigned long length; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNotation.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNotation.idl new file mode 100644 index 00000000..464a422d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMNotation.idl @@ -0,0 +1,58 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * The nsIDOMNotation interface represents a notation declared in the DTD. + * A notation either declares, by name, the format of an unparsed entity, + * or is used for formal declaration of processing instruction targets. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf907e-15b3-11d2-932e-00805f8add32)] +interface nsIDOMNotation : nsIDOMNode +{ + readonly attribute DOMString publicId; + readonly attribute DOMString systemId; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMProcessingInstruction.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMProcessingInstruction.idl new file mode 100644 index 00000000..4bb41bc1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMProcessingInstruction.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMNode.idl" + +/** + * The nsIDOMProcessingInstruction interface represents a + * "processing instruction", used in XML as a way to keep processor-specific + * information in the text of the document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf907f-15b3-11d2-932e-00805f8add32)] +interface nsIDOMProcessingInstruction : nsIDOMNode +{ + readonly attribute DOMString target; + attribute DOMString data; + // raises(DOMException) on setting +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMRange.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMRange.idl new file mode 100644 index 00000000..3b3d9fda --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMRange.idl @@ -0,0 +1,116 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMRange interface is an interface to a DOM range object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90ce-15b3-11d2-932e-00805f8add32)] +interface nsIDOMRange : nsISupports +{ + readonly attribute nsIDOMNode startContainer; + // raises(DOMException) on retrieval + + readonly attribute long startOffset; + // raises(DOMException) on retrieval + + readonly attribute nsIDOMNode endContainer; + // raises(DOMException) on retrieval + + readonly attribute long endOffset; + // raises(DOMException) on retrieval + + readonly attribute boolean collapsed; + // raises(DOMException) on retrieval + + readonly attribute nsIDOMNode commonAncestorContainer; + // raises(DOMException) on retrieval + + void setStart(in nsIDOMNode refNode, in long offset) + raises(RangeException, DOMException); + void setEnd(in nsIDOMNode refNode, in long offset) + raises(RangeException, DOMException); + void setStartBefore(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void setStartAfter(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void setEndBefore(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void setEndAfter(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void collapse(in boolean toStart) + raises(DOMException); + void selectNode(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void selectNodeContents(in nsIDOMNode refNode) + raises(RangeException, DOMException); + + // CompareHow + const unsigned short START_TO_START = 0; + const unsigned short START_TO_END = 1; + const unsigned short END_TO_END = 2; + const unsigned short END_TO_START = 3; + + short compareBoundaryPoints(in unsigned short how, + in nsIDOMRange sourceRange) + raises(DOMException); + void deleteContents() + raises(DOMException); + nsIDOMDocumentFragment extractContents() + raises(DOMException); + nsIDOMDocumentFragment cloneContents() + raises(DOMException); + void insertNode(in nsIDOMNode newNode) + raises(DOMException, RangeException); + void surroundContents(in nsIDOMNode newParent) + raises(DOMException, RangeException); + nsIDOMRange cloneRange() + raises(DOMException); + DOMString toString() + raises(DOMException); + void detach() + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMStyleSheet.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMStyleSheet.idl new file mode 100644 index 00000000..da2adedb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMStyleSheet.idl @@ -0,0 +1,62 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMStyleSheet interface is a datatype for a style sheet in + * the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9080-15b3-11d2-932e-00805f8add32)] +interface nsIDOMStyleSheet : nsISupports +{ + readonly attribute DOMString type; + attribute boolean disabled; + readonly attribute nsIDOMNode ownerNode; + readonly attribute nsIDOMStyleSheet parentStyleSheet; + readonly attribute DOMString href; + readonly attribute DOMString title; + readonly attribute nsIDOMMediaList media; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMStyleSheetList.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMStyleSheetList.idl new file mode 100644 index 00000000..61228bfd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMStyleSheetList.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMStyleSheetList interface is a datatype for a style sheet + * list in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9081-15b3-11d2-932e-00805f8add32)] +interface nsIDOMStyleSheetList : nsISupports +{ + readonly attribute unsigned long length; + nsIDOMStyleSheet item(in unsigned long index); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMText.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMText.idl new file mode 100644 index 00000000..0d4f6816 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMText.idl @@ -0,0 +1,57 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMCharacterData.idl" + +/** + * The nsIDOMText interface inherits from nsIDOMCharacterData and represents + * the textual content (termed character data in XML) of an Element or Attr. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf9082-15b3-11d2-932e-00805f8add32)] +interface nsIDOMText : nsIDOMCharacterData +{ + nsIDOMText splitText(in unsigned long offset) + raises(DOMException); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMUIEvent.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMUIEvent.idl new file mode 100644 index 00000000..f7ed4279 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMUIEvent.idl @@ -0,0 +1,62 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Tom Pixley <joki@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMEvent.idl" + +/** + * The nsIDOMUIEvent interface is the datatype for all UI events in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf90c3-15b3-11d2-932e-00805f8add32)] +interface nsIDOMUIEvent : nsIDOMEvent +{ + readonly attribute nsIDOMAbstractView view; + readonly attribute long detail; + void initUIEvent(in DOMString typeArg, + in boolean canBubbleArg, + in boolean cancelableArg, + in nsIDOMAbstractView viewArg, + in long detailArg); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindow.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindow.idl new file mode 100644 index 00000000..1cbfd7e5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindow.idl @@ -0,0 +1,155 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +interface nsISelection; + +/** + * The nsIDOMWindow interface is the primary interface for a DOM + * window object. It represents a single window object that may + * contain child windows if the document in the window contains a + * HTML frameset document or if the document contains iframe elements. + * + * This interface is not officially defined by any standard bodies, it + * originates from the defacto DOM Level 0 standard. + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf906b-15b3-11d2-932e-00805f8add32)] +interface nsIDOMWindow : nsISupports +{ + /** + * Accessor for the document in this window. + */ + readonly attribute nsIDOMDocument document; + + /** + * Accessor for this window's parent window, or the window itself if + * there is no parent, or if the parent is of different type + * (i.e. this does not cross chrome-content boundaries). + */ + readonly attribute nsIDOMWindow parent; + + /** + * Accessor for the root of this hierarchy of windows. This root may + * be the window itself if there is no parent, or if the parent is + * of different type (i.e. this does not cross chrome-content + * boundaries). + * + * This property is "replaceable" in JavaScript */ + readonly attribute nsIDOMWindow top; + + /** + * Accessor for the object that controls whether or not scrollbars + * are shown in this window. + * + * This attribute is "replaceable" in JavaScript + */ + readonly attribute nsIDOMBarProp scrollbars; + + /** + * Accessor for the child windows in this window. + */ + [noscript] readonly attribute nsIDOMWindowCollection frames; + + /** + * Set/Get the name of this window. + * + * This attribute is "replaceable" in JavaScript + */ + attribute DOMString name; + /** + * Set/Get the document scale factor as a multiplier on the default + * size. When setting this attribute, a NS_ERROR_NOT_IMPLEMENTED + * error may be returned by implementations not supporting + * zoom. Implementations not supporting zoom should return 1.0 all + * the time for the Get operation. 1.0 is equals normal size, + * i.e. no zoom. + */ + [noscript] attribute float textZoom; + + /** + * Accessor for the current x scroll position in this window in + * pixels. + * + * This attribute is "replaceable" in JavaScript + */ + readonly attribute long scrollX; + + /** + * Accessor for the current y scroll position in this window in + * pixels. + * + * This attribute is "replaceable" in JavaScript + */ + readonly attribute long scrollY; + + /** + * Method for scrolling this window to an absolute pixel offset. + */ + void scrollTo(in long xScroll, in long yScroll); + + /** + * Method for scrolling this window to a pixel offset relative to + * the current scroll position. + */ + void scrollBy(in long xScrollDif, in long yScrollDif); + + /** + * Method for accessing this window's selection object. + */ + nsISelection getSelection(); + + /** + * Method for scrolling this window by a number of lines. + */ + void scrollByLines(in long numLines); + + /** + * Method for scrolling this window by a number of pages. + */ + void scrollByPages(in long numPages); + + /** + * Method for sizing this window to the content in the window. + */ + void sizeToContent(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindow2.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindow2.idl new file mode 100644 index 00000000..6824bab0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindow2.idl @@ -0,0 +1,49 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Marco Pesenti Gritti <marco@gnome.org> + * Portions created by the Initial Developer are Copyright (C) 2004 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIDOMWindow.idl" + +[scriptable, uuid(65455132-b96a-40ec-adea-52fa22b1028c)] +interface nsIDOMWindow2 : nsIDOMWindow +{ + /** + * Get the window root for this window. This is useful for hooking + * up event listeners to this window and every other window nested + * in the window root. + */ + [noscript] readonly attribute nsIDOMEventTarget windowRoot; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindowCollection.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindowCollection.idl new file mode 100644 index 00000000..e12b26c7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindowCollection.idl @@ -0,0 +1,66 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Vidur Apparao <vidur@netscape.com> (original author) + * Johnny Stenback <jst@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "domstubs.idl" + +/** + * The nsIDOMWindowCollection interface is an interface for a + * collection of DOM window objects. + * + * @status FROZEN + */ + +[scriptable, uuid(a6cf906f-15b3-11d2-932e-00805f8add32)] +interface nsIDOMWindowCollection : nsISupports +{ + /** + * Accessor for the number of windows in this collection. + */ + readonly attribute unsigned long length; + + /** + * Method for accessing an item in this collection by index. + */ + nsIDOMWindow item(in unsigned long index); + + /** + * Method for accessing an item in this collection by window name. + */ + nsIDOMWindow namedItem(in DOMString name); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindowUtils.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindowUtils.idl new file mode 100644 index 00000000..41f6178d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDOMWindowUtils.idl @@ -0,0 +1,74 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Mozilla.org + * Portions created by the Initial Developer are Copyright (C) 2004 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/** + * nsIDOMWindowUtils is intended for giving privileged script access to + * additional properties and methods of nsIDOMWindow unavailable to + * content script. Access this interface by calling getInterface on a DOMWindow. + */ + +[scriptable, uuid(8a157a4f-a81e-489f-baf2-bc8970d60472)] +interface nsIDOMWindowUtils : nsISupports { + + /** + * Image animation mode of the window. When this attribute's value + * is changed, the implementation should set all images in the window + * to the given value. That is, when set to kDontAnimMode, all images + * will stop animating. The attribute's value must be one of the + * animationMode values from imgIContainer. + * @note Images may individually override the window's setting after + * the window's mode is set. Therefore images given different modes + * since the last setting of the window's mode may behave + * out of line with the window's overall mode. + * @note The attribute's value is the window's overall mode. It may + * for example continue to report kDontAnimMode after all images + * have subsequently been individually animated. + * @note Only images immediately in this window are affected; + * this is not recursive to subwindows. + * @see imgIContainer + */ + attribute unsigned short imageAnimationMode; + + /** + * Function to get metadata associated with the window's current document + * @param aName the name of the metadata. This should be all lowercase. + * @return the value of the metadata, or the empty string if it's not set + */ + AString getDocumentMetadata(in AString aName); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDebug.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDebug.idl new file mode 100644 index 00000000..73b3912a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDebug.idl @@ -0,0 +1,67 @@ +/* ***** 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 XPCOM + * + * The Initial Developer of the Original Code is Doug Turner <dougt@meer.net> + * + * Portions created by the Initial Developer are Copyright (C) 2003 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +/** + * nsIDebug is an interface between XPCOM Glue and XPCOM. Users should access + * the nsIDebug interface through the static class nsDebug. + * @see nsDebug.h + * + * @status UNDER_REVIEW + * + */ + +[scriptable, uuid(3bf0c3d7-3bd9-4cf2-a971-33572c503e1e)] +interface nsIDebug : nsISupports +{ + void assertion(in string aStr, + in string aExpr, + in string aFile, + in long aLine); + + void warning(in string aStr, + in string aFile, + in long aLine); + + void break(in string aFile, + in long aLine); + + void abort(in string aFile, + in long aLine); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIDirectoryService.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDirectoryService.idl new file mode 100644 index 00000000..c18a7d08 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIDirectoryService.idl @@ -0,0 +1,139 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIFile.idl" + +/** + * nsIDirectoryServiceProvider + * + * Used by Directory Service to get file locations. + * + * @status FROZEN + */ + +[scriptable, uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c)] +interface nsIDirectoryServiceProvider: nsISupports +{ + /** + * getFile + * + * Directory Service calls this when it gets the first request for + * a prop or on every request if the prop is not persistent. + * + * @param prop The symbolic name of the file. + * @param persistent TRUE - The returned file will be cached by Directory + * Service. Subsequent requests for this prop will + * bypass the provider and use the cache. + * FALSE - The provider will be asked for this prop + * each time it is requested. + * + * @return The file represented by the property. + * + */ + nsIFile getFile(in string prop, out PRBool persistent); +}; + +/** + * nsIDirectoryServiceProvider2 + * + * An extension of nsIDirectoryServiceProvider which allows + * multiple files to be returned for the given key. + * + * @status FROZEN + */ + +[scriptable, uuid(2f977d4b-5485-11d4-87e2-0010a4e75ef2)] +interface nsIDirectoryServiceProvider2: nsIDirectoryServiceProvider +{ + /** + * getFiles + * + * Directory Service calls this when it gets a request for + * a prop and the requested type is nsISimpleEnumerator. + * + * @param prop The symbolic name of the file list. + * + * @return An enumerator for a list of file locations. + * The elements in the enumeration are nsIFile + * @returnCode NS_SUCCESS_AGGREGATE_RESULT if this result should be + * aggregated with other "lower" providers. + */ + nsISimpleEnumerator getFiles(in string prop); +}; + +/** + * nsIDirectoryService + * + * @status FROZEN + */ + +[scriptable, uuid(57a66a60-d43a-11d3-8cc2-00609792278c)] +interface nsIDirectoryService: nsISupports +{ + /** + * init + * + * Must be called. Used internally by XPCOM initialization. + * + */ + void init(); + + /** + * registerProvider + * + * Register a provider with the service. + * + * @param prov The service will keep a strong reference + * to this object. It will be released when + * the service is released. + * + */ + void registerProvider(in nsIDirectoryServiceProvider prov); + + /** + * unregisterProvider + * + * Unregister a provider with the service. + * + * @param prov + * + */ + void unregisterProvider(in nsIDirectoryServiceProvider prov); +}; + + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIEmbeddingSiteWindow.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIEmbeddingSiteWindow.idl new file mode 100644 index 00000000..25bc7e54 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIEmbeddingSiteWindow.idl @@ -0,0 +1,155 @@ +/* -*- 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Adam Lock <adamlock@netscape.com> + * + * 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" + +/* THIS IS A PUBLIC EMBEDDING API */ + +/** + * The nsIEmbeddingSiteWindow is implemented by the embedder to provide + * Gecko with the means to call up to the host to resize the window, + * hide or show it and set/get its title. + * + * @status FROZEN + */ +[scriptable, uuid(3E5432CD-9568-4bd1-8CBE-D50ABA110743)] +interface nsIEmbeddingSiteWindow : nsISupports +{ + /** + * Flag indicates that position of the top left corner of the outer area + * is required/specified. + * + * @see setDimensions + * @see getDimensions + */ + const unsigned long DIM_FLAGS_POSITION = 1; + + /** + * Flag indicates that the size of the inner area is required/specified. + * + * @note The inner and outer flags are mutually exclusive and it is + * invalid to combine them. + * + * @see setDimensions + * @see getDimensions + * @see DIM_FLAGS_SIZE_OUTER + */ + const unsigned long DIM_FLAGS_SIZE_INNER = 2; + + /** + * Flag indicates that the size of the outer area is required/specified. + * + * @see setDimensions + * @see getDimensions + * @see DIM_FLAGS_SIZE_INNER + */ + const unsigned long DIM_FLAGS_SIZE_OUTER = 4; + + /** + * Sets the dimensions for the window; the position & size. The + * flags to indicate what the caller wants to set and whether the size + * refers to the inner or outer area. The inner area refers to just + * the embedded area, wheras the outer area can also include any + * surrounding chrome, window frame, title bar, and so on. + * + * @param flags Combination of position, inner and outer size flags. + * @param x Left hand corner of the outer area. + * @param y Top corner of the outer area. + * @param cx Width of the inner or outer area. + * @param cy Height of the inner or outer area. + * + * @return <code>NS_OK</code> if operation was performed correctly; + * <code>NS_ERROR_UNEXPECTED</code> if window could not be + * destroyed; + * <code>NS_ERROR_INVALID_ARG</code> for bad flag combination + * or illegal dimensions. + * + * @see getDimensions + * @see DIM_FLAGS_POSITION + * @see DIM_FLAGS_SIZE_OUTER + * @see DIM_FLAGS_SIZE_INNER + */ + void setDimensions(in unsigned long flags, in long x, in long y, in long cx, in long cy); + + /** + * Gets the dimensions of the window. The caller may pass + * <CODE>nsnull</CODE> for any value it is uninterested in receiving. + * + * @param flags Combination of position, inner and outer size flag . + * @param x Left hand corner of the outer area; or <CODE>nsnull</CODE>. + * @param y Top corner of the outer area; or <CODE>nsnull</CODE>. + * @param cx Width of the inner or outer area; or <CODE>nsnull</CODE>. + * @param cy Height of the inner or outer area; or <CODE>nsnull</CODE>. + * + * @see setDimensions + * @see DIM_FLAGS_POSITION + * @see DIM_FLAGS_SIZE_OUTER + * @see DIM_FLAGS_SIZE_INNER + */ + void getDimensions(in unsigned long flags, out long x, out long y, out long cx, out long cy); + + /** + * Give the window focus. + */ + void setFocus(); + + /** + * Visibility of the window. + */ + attribute boolean visibility; + + /** + * Title of the window. + */ + attribute wstring title; + + /** + * Native window for the site's window. The implementor should copy the + * native window object into the address supplied by the caller. The + * type of the native window that the address refers to is platform + * and OS specific as follows: + * + * <ul> + * <li>On Win32 it is an <CODE>HWND</CODE>.</li> + * <li>On MacOS this is a <CODE>WindowPtr</CODE>.</li> + * <li>On GTK this is a <CODE>GtkWidget*</CODE>.</li> + * </ul> + */ + [noscript] readonly attribute voidPtr siteWindow; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIFactory.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIFactory.idl new file mode 100644 index 00000000..bda0b43a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIFactory.idl @@ -0,0 +1,79 @@ +/* -*- Mode: IDL; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/** + * A class factory allows the creation of nsISupports derived + * components without specifying a concrete base class. + * + * @status FROZEN + */ + +[scriptable, object, uuid(00000001-0000-0000-c000-000000000046)] +interface nsIFactory : nsISupports { + /** + * 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, + [retval, iid_is(iid)] out nsQIResult result); + + /** + * 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); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIFile.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIFile.idl new file mode 100644 index 00000000..7057253b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIFile.idl @@ -0,0 +1,343 @@ +/* -*- 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Doug Turner <dougt@netscape.com> + * Christopher Blizzard <blizzard@mozilla.org> + * Darin Fisher <darin@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsISimpleEnumerator; + +/** + * This is the only correct cross-platform way to specify a file. + * Strings are not such a way. If you grew up on windows or unix, you + * may think they are. Welcome to reality. + * + * All methods with string parameters have two forms. The preferred + * form operates on UCS-2 encoded characters strings. An alternate + * form operates on characters strings encoded in the "native" charset. + * + * A string containing characters encoded in the native charset cannot + * be safely passed to javascript via xpconnect. Therefore, the "native + * methods" are not scriptable. + * + * @status FROZEN + */ +[scriptable, uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)] +interface nsIFile : nsISupports +{ + /** + * Create Types + * + * NORMAL_FILE_TYPE - A normal file. + * DIRECTORY_TYPE - A directory/folder. + */ + const unsigned long NORMAL_FILE_TYPE = 0; + const unsigned long DIRECTORY_TYPE = 1; + + /** + * append[Native] + * + * This function is used for constructing a descendent of the + * current nsIFile. + * + * @param node + * A string which is intended to be a child node of the nsIFile. + * For the |appendNative| method, the node must be in the native + * filesystem charset. + */ + void append(in AString node); + [noscript] void appendNative(in ACString node); + + /** + * Normalize the pathName (e.g. removing .. and . components on Unix). + */ + void normalize(); + + /** + * create + * + * This function will create a new file or directory in the + * file system. Any nodes that have not been created or + * resolved, will be. If the file or directory already + * exists create() will return NS_ERROR_FILE_ALREADY_EXISTS. + * + * @param type + * This specifies the type of file system object + * to be made. The only two types at this time + * are file and directory which are defined above. + * If the type is unrecongnized, we will return an + * error (NS_ERROR_FILE_UNKNOWN_TYPE). + * + * @param permissions + * The unix style octal permissions. This may + * be ignored on systems that do not need to do + * permissions. + */ + void create(in unsigned long type, in unsigned long permissions); + + /** + * Accessor to the leaf name of the file itself. + * For the |nativeLeafName| method, the nativeLeafName must + * be in the native filesystem charset. + */ + attribute AString leafName; + [noscript] attribute ACString nativeLeafName; + + /** + * copyTo[Native] + * + * This will copy this file to the specified newParentDir. + * If a newName is specified, the file will be renamed. + * If 'this' is not created we will return an error + * (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST). + * + * copyTo may fail if the file already exists in the destination + * directory. + * + * copyTo will NOT resolve aliases/shortcuts during the copy. + * + * @param newParentDir + * This param is the destination directory. If the + * newParentDir is null, copyTo() will use the parent + * directory of this file. If the newParentDir is not + * empty and is not a directory, an error will be + * returned (NS_ERROR_FILE_DESTINATION_NOT_DIR). For the + * |CopyToNative| method, the newName must be in the + * native filesystem charset. + * + * @param newName + * This param allows you to specify a new name for + * the file to be copied. This param may be empty, in + * which case the current leaf name will be used. + */ + void copyTo(in nsIFile newParentDir, in AString newName); + [noscript] void CopyToNative(in nsIFile newParentDir, in ACString newName); + + /** + * copyToFollowingLinks[Native] + * + * This function is identical to copyTo with the exception that, + * as the name implies, it follows symbolic links. The XP_UNIX + * implementation always follow symbolic links when copying. For + * the |CopyToFollowingLinks| method, the newName must be in the + * native filesystem charset. + */ + void copyToFollowingLinks(in nsIFile newParentDir, in AString newName); + [noscript] void copyToFollowingLinksNative(in nsIFile newParentDir, in ACString newName); + + /** + * moveTo[Native] + * + * A method to move this file or directory to newParentDir. + * If a newName is specified, the file or directory will be renamed. + * If 'this' is not created we will return an error + * (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST). + * If 'this' is a file, and the destination file already exists, moveTo + * will replace the old file. + * + * moveTo will NOT resolve aliases/shortcuts during the copy. + * moveTo will do the right thing and allow copies across volumes. + * moveTo will return an error (NS_ERROR_FILE_DIR_NOT_EMPTY) if 'this' is + * a directory and the destination directory is not empty. + * moveTo will return an error (NS_ERROR_FILE_ACCESS_DENIED) if 'this' is + * a directory and the destination directory is not writable. + * + * @param newParentDir + * This param is the destination directory. If the + * newParentDir is empty, moveTo() will rename the file + * within its current directory. If the newParentDir is + * not empty and does not name a directory, an error will + * be returned (NS_ERROR_FILE_DESTINATION_NOT_DIR). For + * the |moveToNative| method, the newName must be in the + * native filesystem charset. + * + * @param newName + * This param allows you to specify a new name for + * the file to be moved. This param may be empty, in + * which case the current leaf name will be used. + */ + void moveTo(in nsIFile newParentDir, in AString newName); + [noscript] void moveToNative(in nsIFile newParentDir, in ACString newName); + + /** + * This will try to delete this file. The 'recursive' flag + * must be PR_TRUE to delete directories which are not empty. + * + * This will not resolve any symlinks. + */ + void remove(in boolean recursive); + + /** + * Attributes of nsIFile. + */ + + attribute unsigned long permissions; + attribute unsigned long permissionsOfLink; + + /** + * File Times are to be in milliseconds from + * midnight (00:00:00), January 1, 1970 Greenwich Mean + * Time (GMT). + */ + attribute PRInt64 lastModifiedTime; + attribute PRInt64 lastModifiedTimeOfLink; + + /** + * WARNING! On the Mac, getting/setting the file size with nsIFile + * only deals with the size of the data fork. If you need to + * know the size of the combined data and resource forks use the + * GetFileSizeWithResFork() method defined on nsILocalFileMac. + */ + attribute PRInt64 fileSize; + readonly attribute PRInt64 fileSizeOfLink; + + /** + * target & path + * + * Accessor to the string path. The native version of these + * strings are not guaranteed to be a usable path to pass to + * NSPR or the C stdlib. There are problems that affect + * platforms on which a path does not fully specify a file + * because two volumes can have the same name (e.g., XP_MAC). + * This is solved by holding "private", native data in the + * nsIFile implementation. This native data is lost when + * you convert to a string. + * + * DO NOT PASS TO USE WITH NSPR OR STDLIB! + * + * target + * Find out what the symlink points at. Will give error + * (NS_ERROR_FILE_INVALID_PATH) if not a symlink. + * + * path + * Find out what the nsIFile points at. + * + * Note that the ACString attributes are returned in the + * native filesystem charset. + * + */ + readonly attribute AString target; + [noscript] readonly attribute ACString nativeTarget; + readonly attribute AString path; + [noscript] readonly attribute ACString nativePath; + + boolean exists(); + boolean isWritable(); + boolean isReadable(); + boolean isExecutable(); + boolean isHidden(); + boolean isDirectory(); + boolean isFile(); + boolean isSymlink(); + /** + * Not a regular file, not a directory, not a symlink. + */ + boolean isSpecial(); + + /** + * createUnique + * + * This function will create a new file or directory in the + * file system. Any nodes that have not been created or + * resolved, will be. If this file already exists, we try + * variations on the leaf name "suggestedName" until we find + * one that did not already exist. + * + * If the search for nonexistent files takes too long + * (thousands of the variants already exist), we give up and + * return NS_ERROR_FILE_TOO_BIG. + * + * @param type + * This specifies the type of file system object + * to be made. The only two types at this time + * are file and directory which are defined above. + * If the type is unrecongnized, we will return an + * error (NS_ERROR_FILE_UNKNOWN_TYPE). + * + * @param permissions + * The unix style octal permissions. This may + * be ignored on systems that do not need to do + * permissions. + */ + void createUnique(in unsigned long type, in unsigned long permissions); + + /** + * clone() + * + * This function will allocate and initialize a nsIFile object to the + * exact location of the |this| nsIFile. + * + * @param file + * A nsIFile which this object will be initialize + * with. + * + */ + nsIFile clone(); + + /** + * Will determine if the inFile equals this. + */ + boolean equals(in nsIFile inFile); + + /** + * Will determine if inFile is a descendant of this file + * If |recur| is true, look in subdirectories too + */ + boolean contains(in nsIFile inFile, in boolean recur); + + /** + * Parent will be null when this is at the top of the volume. + */ + readonly attribute nsIFile parent; + + /** + * Returns an enumeration of the elements in a directory. Each + * element in the enumeration is an nsIFile. + * + * @return NS_ERROR_FILE_NOT_DIRECTORY if the current nsIFile does + * not specify a directory. + */ + readonly attribute nsISimpleEnumerator directoryEntries; +}; + +%{C++ +#ifdef MOZILLA_INTERNAL_API +#include "nsDirectoryServiceUtils.h" +#endif +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIFileURL.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIFileURL.idl new file mode 100644 index 00000000..1cf2774b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIFileURL.idl @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Darin Fisher <darin@netscape.com> (extracted from nsIFileChannel.idl) + * + * 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 "nsIURL.idl" + +interface nsIFile; + +/** + * nsIFileURL provides access to the underlying nsIFile object corresponding to + * an URL. The URL scheme need not be file:, since other local protocols may + * map URLs to files (e.g., resource:). + * + * @status FROZEN + */ +[scriptable, uuid(d26b2e2e-1dd1-11b2-88f3-8545a7ba7949)] +interface nsIFileURL : nsIURL +{ + /** + * Get/Set nsIFile corresponding to this URL. + * + * - Getter returns a reference to an immutable object. Callers must clone + * before attempting to modify the returned nsIFile object. NOTE: this + * constraint might not be enforced at runtime, so beware!! + * + * - Setter clones the nsIFile object (allowing the caller to safely modify + * the nsIFile object after setting it on this interface). + */ + attribute nsIFile file; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIGlobalHistory.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIGlobalHistory.idl new file mode 100644 index 00000000..02f1eb8f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIGlobalHistory.idl @@ -0,0 +1,75 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +/** + * + * The interface to global history. + * + * @status FROZEN & DEPRECATED. This interface is still accepted, but new + * implementations should use nsIGlobalHistory2. + * @version 1.0 + */ + +#include "nsISupports.idl" + +[scriptable, uuid(9491C383-E3C4-11d2-BDBE-0050040A9B44)] +interface nsIGlobalHistory : nsISupports +{ + /** + * addPage + * Add a page to the history + * + * @param aURL the url to the page + */ + + void addPage(in string aURL); + + /** + * isVisited + * Checks to see if the given page is in history + * + * @return true if a page has been passed into addPage(). + * @param aURL the url to the page + */ + boolean isVisited(in string aURL); +}; + +%{ C++ +#define NS_GLOBALHISTORY_CONTRACTID \ + "@mozilla.org/browser/global-history;1" +%} + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIHistoryEntry.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIHistoryEntry.idl new file mode 100644 index 00000000..41f6c5e0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIHistoryEntry.idl @@ -0,0 +1,93 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Radha Kulkarni <radha@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +/** + * An interface to individual entries in session history. Each + * document or frame will have a nsIHistoryEntry associated with + * it. nsIHistoryEntry provides access to information like URI, + * title and frame traversal status for that document. + * This interface is accessible from javascript. + * + * @status FROZEN + */ +#include "nsISupports.idl" + +interface nsIURI; + +[scriptable, uuid(A41661D4-1417-11D5-9882-00C04FA02F40)] +interface nsIHistoryEntry : nsISupports +{ + + /** + * A readonly property that returns the URI + * of the current entry. The object returned is + * of type nsIURI + */ + readonly attribute nsIURI URI; + + /** + * A readonly property that returns the title + * of the current entry. The object returned + * is a encoded string + */ + readonly attribute wstring title; + + /** + * A readonly property that returns a boolean + * flag which indicates if the entry was created as a + * result of a subframe navigation. This flag will be + * 'false' when a frameset page is visited for + * the first time. This flag will be 'true' for all + * history entries created as a result of a subframe + * navigation. + */ + readonly attribute boolean isSubFrame; + +}; + + +%{ C++ +// {A41661D5-1417-11D5-9882-00C04FA02F40} +#define NS_HISTORYENTRY_CID \ +{0xa41661d5, 0x1417, 0x11d5, {0x98, 0x82, 0x0, 0xc0, 0x4f, 0xa0, 0x2f, 0x40}} + +#define NS_HISTORYENTRY_CONTRACTID \ + "@mozilla.org/browser/history-entry;1" + +%} + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIHttpChannel.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIHttpChannel.idl new file mode 100644 index 00000000..b96dbee7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIHttpChannel.idl @@ -0,0 +1,296 @@ +/* -*- 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 Mozilla. + * + * The Initial Developer of the Original Code is + * Netscape Communications. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Gagan Saksena <gagan@netscape.com> (original author) + * Darin Fisher <darin@netscape.com> + * + * 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 "nsIChannel.idl" + +interface nsIHttpHeaderVisitor; + +/** + * nsIHttpChannel + * + * This interface allows for the modification of HTTP request parameters and + * the inspection of the resulting HTTP response status and headers when they + * become available. + * + * @status FROZEN + */ +[scriptable, uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260)] +interface nsIHttpChannel : nsIChannel +{ + /************************************************************************** + * REQUEST CONFIGURATION + * + * Modifying request parameters after asyncOpen has been called is an error. + */ + + /** + * Set/get the HTTP request method (default is "GET"). Setter is case + * insensitive; getter returns an uppercase string. + * + * This attribute may only be set before the channel is opened. + * + * NOTE: The data for a "POST" or "PUT" request can be configured via + * nsIUploadChannel; however, after setting the upload data, it may be + * necessary to set the request method explicitly. The documentation + * for nsIUploadChannel has further details. + * + * @throws NS_ERROR_IN_PROGRESS if set after the channel has been opened. + */ + attribute ACString requestMethod; + + /** + * Get/set the HTTP referrer URI. This is the address (URI) of the + * resource from which this channel's URI was obtained (see RFC2616 section + * 14.36). + * + * This attribute may only be set before the channel is opened. + * + * NOTE: The channel may silently refuse to set the Referer header if the + * URI does not pass certain security checks (e.g., a "https://" URL will + * never be sent as the referrer for a plaintext HTTP request). The + * implementation is not required to throw an exception when the referrer + * URI is rejected. + * + * @throws NS_ERROR_IN_PROGRESS if set after the channel has been opened. + */ + attribute nsIURI referrer; + + /** + * Get the value of a particular request header. + * + * @param aHeader + * The case-insensitive name of the request header to query (e.g., + * "Cache-Control"). + * + * @return the value of the request header. + * @throws NS_ERROR_NOT_AVAILABLE if the header is not set. + */ + ACString getRequestHeader(in ACString aHeader); + + /** + * Set the value of a particular request header. + * + * This method allows, for example, the cookies module to add "Cookie" + * headers to the outgoing HTTP request. + * + * This method may only be called before the channel is opened. + * + * @param aHeader + * The case-insensitive name of the request header to set (e.g., + * "Cookie"). + * @param aValue + * The request header value to set (e.g., "X=1"). + * @param aMerge + * If true, the new header value will be merged with any existing + * values for the specified header. This flag is ignored if the + * specified header does not support merging (e.g., the "Content- + * Type" header can only have one value). The list of headers for + * which this flag is ignored is an implementation detail. If this + * flag is false, then the header value will be replaced with the + * contents of |aValue|. + * + * If aValue is empty and aMerge is false, the header will be cleared. + * + * @throws NS_ERROR_IN_PROGRESS if called after the channel has been + * opened. + */ + void setRequestHeader(in ACString aHeader, + in ACString aValue, + in boolean aMerge); + + /** + * Call this method to visit all request headers. Calling setRequestHeader + * while visiting request headers has undefined behavior. Don't do it! + * + * @param aVisitor + * the header visitor instance. + */ + void visitRequestHeaders(in nsIHttpHeaderVisitor aVisitor); + + /** + * This attribute is a hint to the channel to indicate whether or not + * the underlying HTTP transaction should be allowed to be pipelined + * with other transactions. This should be set to FALSE, for example, + * if the application knows that the corresponding document is likely + * to be very large. + * + * This attribute is true by default, though other factors may prevent + * pipelining. + * + * This attribute may only be set before the channel is opened. + * + * @throws NS_ERROR_FAILURE if set after the channel has been opened. + */ + attribute boolean allowPipelining; + + /** + * This attribute specifies the number of redirects this channel is allowed + * to make. If zero, the channel will fail to redirect and will generate + * a NS_ERROR_REDIRECT_LOOP failure status. + * + * NOTE: An HTTP redirect results in a new channel being created. If the + * new channel supports nsIHttpChannel, then it will be assigned a value + * to its |redirectionLimit| attribute one less than the value of the + * redirected channel's |redirectionLimit| attribute. The initial value + * for this attribute may be a configurable preference (depending on the + * implementation). + */ + attribute unsigned long redirectionLimit; + + + /************************************************************************** + * RESPONSE INFO + * + * Accessing response info before the onStartRequest event is an error. + */ + + /** + * Get the HTTP response code (e.g., 200). + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + readonly attribute unsigned long responseStatus; + + /** + * Get the HTTP response status text (e.g., "OK"). + * + * NOTE: This returns the raw (possibly 8-bit) text from the server. There + * are no assumptions made about the charset of the returned text. You + * have been warned! + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + readonly attribute ACString responseStatusText; + + /** + * Returns true if the HTTP response code indicates success. The value of + * nsIRequest::status will be NS_OK even when processing a 404 response + * because a 404 response may include a message body that (in some cases) + * should be shown to the user. + * + * Use this attribute to distinguish server error pages from normal pages, + * instead of comparing the response status manually against the set of + * valid response codes, if that is required by your application. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + readonly attribute boolean requestSucceeded; + + /** + * Get the value of a particular response header. + * + * @param aHeader + * The case-insensitive name of the response header to query (e.g., + * "Set-Cookie"). + * + * @return the value of the response header. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest) or if the header is + * not set in the response. + */ + ACString getResponseHeader(in ACString header); + + /** + * Set the value of a particular response header. + * + * This method allows, for example, the HTML content sink to inform the HTTP + * channel about HTTP-EQUIV headers found in HTML <META> tags. + * + * @param aHeader + * The case-insensitive name of the response header to set (e.g., + * "Cache-control"). + * @param aValue + * The response header value to set (e.g., "no-cache"). + * @param aMerge + * If true, the new header value will be merged with any existing + * values for the specified header. This flag is ignored if the + * specified header does not support merging (e.g., the "Content- + * Type" header can only have one value). The list of headers for + * which this flag is ignored is an implementation detail. If this + * flag is false, then the header value will be replaced with the + * contents of |aValue|. + * + * If aValue is empty and aMerge is false, the header will be cleared. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + * @throws NS_ERROR_ILLEGAL_VALUE if changing the value of this response + * header is not allowed. + */ + void setResponseHeader(in ACString header, + in ACString value, + in boolean merge); + + /** + * Call this method to visit all response headers. Calling + * setResponseHeader while visiting response headers has undefined + * behavior. Don't do it! + * + * @param aVisitor + * the header visitor instance. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + void visitResponseHeaders(in nsIHttpHeaderVisitor aVisitor); + + /** + * Returns true if the server sent a "Cache-Control: no-store" response + * header. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + boolean isNoStoreResponse(); + + /** + * Returns true if the server sent the equivalent of a "Cache-control: + * no-cache" response header. Equivalent response headers include: + * "Pragma: no-cache", "Expires: 0", and "Expires" with a date value + * in the past relative to the value of the "Date" header. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + boolean isNoCacheResponse(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIHttpHeaderVisitor.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIHttpHeaderVisitor.idl new file mode 100644 index 00000000..1e1b56e3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIHttpHeaderVisitor.idl @@ -0,0 +1,61 @@ +/* -*- 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 Mozilla. + * + * The Initial Developer of the Original Code is + * Netscape Communications. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Darin Fisher <darin@netscape.com> (original author) + * + * 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" + +/** + * Implement this interface to visit http headers. + * + * @status FROZEN + */ +[scriptable, uuid(0cf40717-d7c1-4a94-8c1e-d6c9734101bb)] +interface nsIHttpHeaderVisitor : nsISupports +{ + /** + * Called by the nsIHttpChannel implementation when visiting request and + * response headers. + * + * @param aHeader + * the header being visited. + * @param aValue + * the header value (possibly a comma delimited list). + * + * @throw any exception to terminate enumeration + */ + void visitHeader(in ACString aHeader, in ACString aValue); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIIOService.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIIOService.idl new file mode 100644 index 00000000..8b9298da --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIIOService.idl @@ -0,0 +1,146 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +interface nsIProtocolHandler; +interface nsIChannel; +interface nsIURI; +interface nsIFile; + +/** + * nsIIOService provides a set of network utility functions. This interface + * duplicates many of the nsIProtocolHandler methods in a protocol handler + * independent way (e.g., NewURI inspects the scheme in order to delegate + * creation of the new URI to the appropriate protocol handler). nsIIOService + * also provides a set of URL parsing utility functions. These are provided + * as a convenience to the programmer and in some cases to improve performance + * by eliminating intermediate data structures and interfaces. + * + * @status FROZEN + */ +[scriptable, uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e)] +interface nsIIOService : nsISupports +{ + /** + * Returns a protocol handler for a given URI scheme. + * + * @param aScheme the URI scheme + * @return reference to corresponding nsIProtocolHandler + */ + nsIProtocolHandler getProtocolHandler(in string aScheme); + + /** + * Returns the protocol flags for a given scheme. + * + * @param aScheme the URI scheme + * @return value of corresponding nsIProtocolHandler::protocolFlags + */ + unsigned long getProtocolFlags(in string aScheme); + + /** + * This method constructs a new URI by determining the scheme of the + * URI spec, and then delegating the construction of the URI to the + * protocol handler for that scheme. QueryInterface can be used on + * the resulting URI object to obtain a more specific type of URI. + * + * @see nsIProtocolHandler::newURI + */ + nsIURI newURI(in AUTF8String aSpec, + in string aOriginCharset, + in nsIURI aBaseURI); + + /** + * This method constructs a new URI from a nsIFile. + * + * @param aFile specifies the file path + * @return reference to a new nsIURI object + */ + nsIURI newFileURI(in nsIFile aFile); + + /** + * Creates a channel for a given URI. + * + * @param aURI nsIURI from which to make a channel + * @return reference to the new nsIChannel object + */ + nsIChannel newChannelFromURI(in nsIURI aURI); + + /** + * Equivalent to newChannelFromURI(newURI(...)) + */ + nsIChannel newChannel(in AUTF8String aSpec, + in string aOriginCharset, + in nsIURI aBaseURI); + + /** + * Returns true if networking is in "offline" mode. When in offline mode, + * attempts to access the network will fail (although this is not + * necessarily corrolated with whether there is actually a network + * available -- that's hard to detect without causing the dialer to + * come up). + */ + attribute boolean offline; + + /** + * Checks if a port number is banned. This involves consulting a list of + * unsafe ports, corresponding to network services that may be easily + * exploitable. If the given port is considered unsafe, then the protocol + * handler (corresponding to aScheme) will be asked whether it wishes to + * override the IO service's decision to block the port. This gives the + * protocol handler ultimate control over its own security policy while + * ensuring reasonable, default protection. + * + * @see nsIProtocolHandler::allowPort + */ + boolean allowPort(in long aPort, in string aScheme); + + /** + * Utility to extract the scheme from a URL string, consistently and + * according to spec (see RFC 2396). + * + * NOTE: Most URL parsing is done via nsIURI, and in fact the scheme + * can also be extracted from a URL string via nsIURI. This method + * is provided purely as an optimization. + * + * @param aSpec the URL string to parse + * @return URL scheme + * + * @throws NS_ERROR_MALFORMED_URI if URL string is not of the right form. + */ + ACString extractScheme(in AUTF8String urlString); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIInputStream.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIInputStream.idl new file mode 100644 index 00000000..827f6363 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIInputStream.idl @@ -0,0 +1,139 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Warren Harris <warren@netscape.com> + * Darin Fisher <darin@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIInputStream; + +%{C++ +/** + * The signature of the writer function passed to ReadSegments. This + * is the "consumer" of data that gets read from the stream's buffer. + * + * @param aInStream stream being read + * @param aClosure opaque parameter passed to ReadSegments + * @param aFromSegment pointer to memory owned by the input stream + * @param aToOffset amount already read (since ReadSegments was called) + * @param aCount length of fromSegment + * @param aWriteCount number of bytes read + * + * Implementers should return the following: + * + * @return NS_OK and (*aWriteCount > 0) if consumed some data + * @return <any-error> if not interested in consuming any data + * + * Errors are never passed to the caller of ReadSegments. + * + * NOTE: returning NS_OK and (*aWriteCount = 0) has undefined behavior. + * + * @status FROZEN + */ +typedef NS_CALLBACK(nsWriteSegmentFun)(nsIInputStream *aInStream, + void *aClosure, + const char *aFromSegment, + PRUint32 aToOffset, + PRUint32 aCount, + PRUint32 *aWriteCount); +%} + +native nsWriteSegmentFun(nsWriteSegmentFun); + +/** + * nsIInputStream + * + * @status FROZEN + */ +[scriptable, uuid(fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a)] +interface nsIInputStream : nsISupports +{ + /** + * Close the stream. + */ + void close(); + + /** + * @return number of bytes currently available in the stream + */ + unsigned long available(); + + /** + * 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 <other-error> on failure + */ + [noscript] unsigned long read(in charPtr aBuf, in unsigned long aCount); + + /** + * 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 <other-error> 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); + + /** + * @return true if stream is non-blocking + */ + boolean isNonBlocking(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIInterfaceRequestor.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIInterfaceRequestor.idl new file mode 100644 index 00000000..31388643 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIInterfaceRequestor.idl @@ -0,0 +1,72 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Travis Bogard <travis@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/** + * The nsIInterfaceRequestor interface defines a generic interface for + * requesting interfaces that a given object might provide access to. + * This is very similar to QueryInterface found in nsISupports. + * The main difference is that interfaces returned from GetInterface() + * are not required to provide a way back to the object implementing this + * interface. The semantics of QI() dictate that given an interface A that + * you QI() on to get to interface B, you must be able to QI on B to get back + * to A. This interface however allows you to obtain an interface C from A + * that may or most likely will not have the ability to get back to A. + * + * @status FROZEN + */ + +[scriptable, uuid(033A1470-8B2A-11d3-AF88-00A024FFC08C)] +interface nsIInterfaceRequestor : 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); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsILoadGroup.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsILoadGroup.idl new file mode 100644 index 00000000..9efba4ba --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsILoadGroup.idl @@ -0,0 +1,105 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 "nsIRequest.idl" + +interface nsISimpleEnumerator; +interface nsIRequestObserver; +interface nsIInterfaceRequestor; + +/** + * A load group maintains a collection of nsIRequest objects. + * + * @status FROZEN + */ +[scriptable, uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc)] +interface nsILoadGroup : 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; + + /** + * 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; + + /** + * 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); + + /** + * 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); + + /** + * Returns the requests contained directly in this group. + * Enumerator element type: nsIRequest. + */ + readonly attribute nsISimpleEnumerator requests; + + /** + * Returns the count of "active" requests (ie. requests without the + * LOAD_BACKGROUND bit set). + */ + readonly attribute unsigned long activeCount; + + /** + * Notification callbacks for the load group. + */ + attribute nsIInterfaceRequestor notificationCallbacks; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsILocalFile.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsILocalFile.idl new file mode 100644 index 00000000..8d7a1dda --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsILocalFile.idl @@ -0,0 +1,180 @@ +/* -*- Mode: C++; tab-width: 2; 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Doug Turner <dougt@netscape.com> + * Darin Fisher <darin@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIFile.idl" + +%{C++ +#include "prio.h" +#include "prlink.h" +#include <stdio.h> +%} + +[ptr] native PRFileDescStar(PRFileDesc); +[ptr] native PRLibraryStar(PRLibrary); +[ptr] native FILE(FILE); + +/** + * This interface adds methods to nsIFile that are particular to a file + * that is accessible via the local file system. + * + * It follows the same string conventions as nsIFile. + * + * @status FROZEN + */ +[scriptable, uuid(aa610f20-a889-11d3-8c81-000064657374)] +interface nsILocalFile : nsIFile +{ + /** + * initWith[Native]Path + * + * This function will initialize the nsILocalFile object. Any + * internal state information will be reset. + * + * NOTE: This function has a known bug on the macintosh and + * other OSes which do not represent file locations as paths. + * If you do use this function, be very aware of this problem! + * + * @param filePath + * A string which specifies a full file path to a + * location. Relative paths will be treated as an + * error (NS_ERROR_FILE_UNRECOGNIZED_PATH). For + * initWithNativePath, the filePath must be in the native + * filesystem charset. + */ + void initWithPath(in AString filePath); + [noscript] void initWithNativePath(in ACString filePath); + + /** + * initWithFile + * + * Initialize this object with another file + * + * @param aFile + * the file this becomes equivalent to + */ + void initWithFile(in nsILocalFile aFile); + + /** + * followLinks + * + * This attribute will determine if the nsLocalFile will auto + * resolve symbolic links. By default, this value will be false + * on all non unix systems. On unix, this attribute is effectively + * a noop. + */ + attribute PRBool followLinks; + + [noscript] PRFileDescStar openNSPRFileDesc(in long flags, in long mode); + [noscript] FILE openANSIFileDesc(in string mode); + + [noscript] PRLibraryStar load(); + + readonly attribute PRInt64 diskSpaceAvailable; + + /** + * appendRelative[Native]Path + * + * Append a relative path to the current path of the nsILocalFile object. + * + * @param relativeFilePath + * relativeFilePath is a native relative path. For security reasons, + * this cannot contain .. or cannot start with a directory separator. + * For the |appendRelativeNativePath| method, the relativeFilePath + * must be in the native filesystem charset. + */ + void appendRelativePath(in AString relativeFilePath); + [noscript] void appendRelativeNativePath(in ACString relativeFilePath); + + /** + * Accessor to a null terminated string which will specify + * the file in a persistent manner for disk storage. + * + * The character set of this attribute is undefined. DO NOT TRY TO + * INTERPRET IT AS HUMAN READABLE TEXT! + */ + attribute ACString persistentDescriptor; + + /** + * reveal + * + * Ask the operating system to open the folder which contains + * this file or folder. This routine only works on platforms which + * support the ability to open a folder... + */ + void reveal(); + + /** + * launch + * + * Ask the operating system to attempt to open the file. + * this really just simulates "double clicking" the file on your platform. + * This routine only works on platforms which support this functionality. + */ + void launch(); + + /** + * getRelativeDescriptor + * + * Returns a relative file path in an opaque, XP format. It is therefore + * not a native path. + * + * The character set of the string returned from this function is + * undefined. DO NOT TRY TO INTERPRET IT AS HUMAN READABLE TEXT! + * + * @param fromFile + * the file from which the descriptor is relative. + * There is no defined result if this param is null. + */ + ACString getRelativeDescriptor(in nsILocalFile fromFile); + + /** + * setRelativeDescriptor + * + * Initializes the file to the location relative to fromFile using + * a string returned by getRelativeDescriptor. + * + * @param fromFile + * the file to which the descriptor is relative + * @param relative + * the relative descriptor obtained from getRelativeDescriptor + */ + void setRelativeDescriptor(in nsILocalFile fromFile, in ACString relativeDesc); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIMemory.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIMemory.idl new file mode 100644 index 00000000..315a8c22 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIMemory.idl @@ -0,0 +1,130 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/** + * + * nsIMemory: interface to allocate and deallocate memory. Also provides + * for notifications in low-memory situations. + * + * The frozen exported symbols NS_Alloc, NS_Realloc, and NS_Free + * provide a more efficient way to access XPCOM memory allocation. Using + * those symbols is preferred to using the methods on this interface. + * + * A client that wishes to be notified of low memory situations (for + * example, because the client maintains a large memory cache that + * could be released when memory is tight) should register with the + * observer service (see nsIObserverService) using the topic + * "memory-pressure". There are three specific types of notications + * that can occur. These types will be passed as the |aData| + * parameter of the of the "memory-pressure" notification: + * + * "low-memory" + * This will be passed as the extra data when the pressure + * observer is being asked to flush for low-memory conditions. + * + * "heap-minimize" + * This will be passed as the extra data when the pressure + * observer is being asked to flush because of a heap minimize + * call. + * + * "alloc-failure" + * This will be passed as the extra data when the pressure + * observer has been asked to flush because a malloc() or + * realloc() has failed. + * + * @status FROZEN + */ + +[scriptable, uuid(59e7e77a-38e4-11d4-8cf5-0060b0fc14a3)] +interface nsIMemory : 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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(); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIModule.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIModule.idl new file mode 100644 index 00000000..a71b9b13 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIModule.idl @@ -0,0 +1,115 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIFile; +interface nsIComponentManager; + +/** + * The nsIModule interface. + * @status FROZEN + */ + +[scriptable, uuid(7392D032-5371-11d3-994E-00805FD26FEE)] +interface nsIModule : nsISupports +{ + /** + * Object Instance Creation + * + * Obtains a Class Object from a nsIModule for a given CID and IID pair. + * This class object can either be query to a nsIFactory or a may be + * query to a nsIClassInfo. + * + * @param aCompMgr : The global component manager + * @param aClass : ClassID of object instance requested + * @param aIID : IID of interface requested + * + */ + void getClassObject(in nsIComponentManager aCompMgr, + in nsCIDRef aClass, + in nsIIDRef aIID, + [retval, iid_is(aIID)] out nsQIResult aResult); + + + /** + * One time registration callback + * + * When the nsIModule is discovered, this method will be + * called so that any setup registration can be preformed. + * + * @param aCompMgr : The global component manager + * @param aLocation : The location of the nsIModule on disk + * @param aLoaderStr: Opaque loader specific string + * @param aType : Loader Type being used to load this module + */ + void registerSelf(in nsIComponentManager aCompMgr, + in nsIFile aLocation, + in string aLoaderStr, + in string aType); + /** + * One time unregistration callback + * + * When the nsIModule is being unregistered, this method will be + * called so that any unregistration can be preformed + * + * @param aCompMgr : The global component manager + * @param aLocation : The location of the nsIModule on disk + * @param aLoaderStr : Opaque loader specific string + * + */ + void unregisterSelf(in nsIComponentManager aCompMgr, + in nsIFile aLocation, + in string aLoaderStr); + + /** + * Module load management + * + * @param aCompMgr : The global component manager + * + * @return indicates to the caller if the module can be unloaded. + * Returning PR_TRUE isn't a guarantee that the module will be + * unloaded. It constitues only willingness of the module to be + * unloaded. It is very important to ensure that no outstanding + * references to the module's code/data exist before returning + * PR_TRUE. + * Returning PR_FALSE guaratees that the module wont be unloaded. + */ + boolean canUnload(in nsIComponentManager aCompMgr); +}; + + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIObserver.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIObserver.idl new file mode 100644 index 00000000..d2240f2e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIObserver.idl @@ -0,0 +1,72 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/** + * This interface is implemented by an object that wants + * to observe an event corresponding to a topic. + * + * @status FROZEN + */ + +[scriptable, uuid(DB242E01-E4D9-11d2-9DDE-000064657374)] +interface nsIObserver : nsISupports { + + /** + * Observe will be called when there is a notification for the + * topic |aTopic|. This assumes that the object implementing + * this interface has been registered with an observer service + * such as the nsIObserverService. + * + * If you expect multiple topics/subjects, the impl is + * responsible for filtering. + * + * You should not modify, add, remove, or enumerate + * notifications in the implemention of observe. + * + * @param aSubject : Notification specific interface pointer. + * @param aTopic : The notification topic or subject. + * @param aData : Notification specific wide string. + * subject event. + */ + void observe( in nsISupports aSubject, + in string aTopic, + in wstring aData ); + +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIObserverService.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIObserverService.idl new file mode 100644 index 00000000..059a903a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIObserverService.idl @@ -0,0 +1,111 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIObserver; +interface nsISimpleEnumerator; + +/** + * nsIObserverService + * + * Service allows a client listener (nsIObserver) to register and unregister for + * notifications of specific string referenced topic. Service also provides a + * way to notify registered listeners and a way to enumerate registered client + * listeners. + * + * @status FROZEN + */ + +[scriptable, uuid(D07F5192-E3D1-11d2-8ACD-00105A1B8860)] +interface nsIObserverService : nsISupports +{ + + /** + * AddObserver + * + * Registers a given listener for a notifications regarding the specified + * topic. + * + * @param anObserve : The interface pointer which will receive notifications. + * @param aTopic : The notification topic or subject. + * @param ownsWeak : If set to false, the nsIObserverService will hold a + * strong reference to |anObserver|. If set to true and + * |anObserver| supports the nsIWeakReference interface, + * a weak reference will be held. Otherwise an error will be + * returned. + */ + void addObserver( in nsIObserver anObserver, in string aTopic, in boolean ownsWeak); + + /** + * removeObserver + * + * Unregisters a given listener from notifications regarding the specified + * topic. + * + * @param anObserver : The interface pointer which will stop recieving + * notifications. + * @param aTopic : The notification topic or subject. + */ + void removeObserver( in nsIObserver anObserver, in string aTopic ); + + /** + * notifyObservers + * + * Notifies all registered listeners of the given topic. + * + * @param aSubject : Notification specific interface pointer. + * @param aTopic : The notification topic or subject. + * @param someData : Notification specific wide string. + */ + void notifyObservers( in nsISupports aSubject, + in string aTopic, + in wstring someData ); + + /** + * enumerateObservers + * + * Returns an enumeration of all registered listeners. + * + * @param aTopic : The notification topic or subject. + */ + nsISimpleEnumerator enumerateObservers( in string aTopic ); + + +}; + + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIOutputStream.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIOutputStream.idl new file mode 100644 index 00000000..ec5035c6 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIOutputStream.idl @@ -0,0 +1,167 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Warren Harris <warren@netscape.com> + * Darin Fisher <darin@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIOutputStream; +interface nsIInputStream; + +%{C++ +/** + * The signature for the reader function passed to WriteSegments. This + * is the "provider" of data that gets written into the stream's buffer. + * + * @param aOutStream stream being written to + * @param aClosure opaque parameter passed to WriteSegments + * @param aToSegment pointer to memory owned by the output stream + * @param aFromOffset amount already written (since WriteSegments was called) + * @param aCount length of toSegment + * @param aReadCount number of bytes written + * + * Implementers should return the following: + * + * @return NS_OK and (*aReadCount > 0) if successfully provided some data + * @return NS_OK and (*aReadCount = 0) or + * @return <any-error> if not interested in providing any data + * + * Errors are never passed to the caller of WriteSegments. + * + * @status FROZEN + */ +typedef NS_CALLBACK(nsReadSegmentFun)(nsIOutputStream *aOutStream, + void *aClosure, + char *aToSegment, + PRUint32 aFromOffset, + PRUint32 aCount, + PRUint32 *aReadCount); +%} + +native nsReadSegmentFun(nsReadSegmentFun); + +/** + * nsIOutputStream + * + * @status FROZEN + */ +[scriptable, uuid(0d0acd2a-61b4-11d4-9877-00c04fa0cf4a)] +interface nsIOutputStream : 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(); + + /** + * Flush the stream. + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if unable to flush without blocking + * the calling thread (non-blocking mode only) + */ + void flush(); + + /** + * 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 <other-error> on failure + */ + unsigned long write(in string aBuf, in unsigned long aCount); + + /** + * 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 <other-error> 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); + + /** + * 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 <other-error> 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); + + /** + * @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(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefBranch.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefBranch.idl new file mode 100644 index 00000000..b609117f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefBranch.idl @@ -0,0 +1,353 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Mozilla Communicator client code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Alec Flett <alecf@netscape.com> + * Brian Nesse <bnesse@netscape.com> + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#include "nsISupports.idl" + +/** + * The nsIPrefBranch interface is used to manipulate the preferences data. This + * object may be obtained from the preferences service (nsIPrefService) and + * used to get and set default and/or user preferences across the application. + * + * This object is created with a "root" value which describes the base point in + * the preferences "tree" from which this "branch" stems. Preferences are + * accessed off of this root by using just the final portion of the preference. + * For example, if this object is created with the root "browser.startup.", + * the preferences "browser.startup.page", "browser.startup.homepage", + * and "browser.startup.homepage_override" can be accessed by simply passing + * "page", "homepage", or "homepage_override" to the various Get/Set methods. + * + * @see nsIPrefService + * + * @status FROZEN + */ + +[scriptable, uuid(56c35506-f14b-11d3-99d3-ddbfac2ccf65)] +interface nsIPrefBranch : nsISupports +{ + + /** + * Values describing the basic preference types. + * + * @see getPrefType + */ + const long PREF_INVALID = 0; + const long PREF_STRING = 32; + const long PREF_INT = 64; + const long PREF_BOOL = 128; + + /** + * Called to get the root on which this branch is based, such as + * "browser.startup." + */ + readonly attribute string root; + + /** + * Called to determine the type of a specific preference. + * + * @param aPrefName The preference to get the type of. + * + * @return long A value representing the type of the preference. This + * value will be PREF_STRING, PREF_INT, or PREF_BOOL. + */ + long getPrefType(in string aPrefName); + + /** + * Called to get the state of an individual boolean preference. + * + * @param aPrefName The boolean preference to get the state of. + * + * @return boolean The value of the requested boolean preference. + * + * @see setBoolPref + */ + boolean getBoolPref(in string aPrefName); + + /** + * Called to set the state of an individual boolean preference. + * + * @param aPrefName The boolean preference to set the state of. + * @param aValue The boolean value to set the preference to. + * + * @return NS_OK The value was successfully set. + * @return Other The value was not set or is the wrong type. + * + * @see getBoolPref + */ + void setBoolPref(in string aPrefName, in long aValue); + + /** + * Called to get the state of an individual string preference. + * + * @param aPrefName The string preference to retrieve. + * + * @return string The value of the requested string preference. + * + * @see setCharPref + */ + string getCharPref(in string aPrefName); + + /** + * Called to set the state of an individual string preference. + * + * @param aPrefName The string preference to set. + * @param aValue The string value to set the preference to. + * + * @return NS_OK The value was successfully set. + * @return Other The value was not set or is the wrong type. + * + * @see getCharPref + */ + void setCharPref(in string aPrefName, in string aValue); + + /** + * Called to get the state of an individual integer preference. + * + * @param aPrefName The integer preference to get the value of. + * + * @return long The value of the requested integer preference. + * + * @see setIntPref + */ + long getIntPref(in string aPrefName); + + /** + * Called to set the state of an individual integer preference. + * + * @param aPrefName The integer preference to set the value of. + * @param aValue The integer value to set the preference to. + * + * @return NS_OK The value was successfully set. + * @return Other The value was not set or is the wrong type. + * + * @see getIntPref + */ + void setIntPref(in string aPrefName, in long aValue); + + /** + * Called to get the state of an individual complex preference. A complex + * preference is a preference which represents an XPCOM object that can not + * be easily represented using a standard boolean, integer or string value. + * + * @param aPrefName The complex preference to get the value of. + * @param aType The XPCOM interface that this complex preference + * represents. Interfaces currently supported are: + * - nsILocalFile + * - nsISupportsString (UniChar) + * - nsIPrefLocalizedString (Localized UniChar) + * - nsIFileSpec (deprecated - to be removed eventually) + * @param aValue The XPCOM object into which to the complex preference + * value should be retrieved. + * + * @return NS_OK The value was successfully retrieved. + * @return Other The value does not exist or is the wrong type. + * + * @see setComplexValue + */ + void getComplexValue(in string aPrefName, in nsIIDRef aType, + [iid_is(aType), retval] out nsQIResult aValue); + + /** + * Called to set the state of an individual complex preference. A complex + * preference is a preference which represents an XPCOM object that can not + * be easily represented using a standard boolean, integer or string value. + * + * @param aPrefName The complex preference to set the value of. + * @param aType The XPCOM interface that this complex preference + * represents. Interfaces currently supported are: + * - nsILocalFile + * - nsISupportsString (UniChar) + * - nsIPrefLocalizedString (Localized UniChar) + * - nsIFileSpec (deprecated - to be removed eventually) + * @param aValue The XPCOM object from which to set the complex preference + * value. + * + * @return NS_OK The value was successfully set. + * @return Other The value was not set or is the wrong type. + * + * @see getComplexValue + */ + void setComplexValue(in string aPrefName, in nsIIDRef aType, in nsISupports aValue); + + /** + * Called to clear a user set value from a specific preference. This will, in + * effect, reset the value to the default value. If no default value exists + * the preference will cease to exist. + * + * @param aPrefName The preference to be cleared. + * + * @note + * This method does nothing if this object is a default branch. + * + * @return NS_OK The user preference was successfully cleared. + * @return Other The preference does not exist or have a user set value. + */ + void clearUserPref(in string aPrefName); + + /** + * Called to lock a specific preference. Locking a preference will cause the + * preference service to always return the default value regardless of + * whether there is a user set value or not. + * + * @param aPrefName The preference to be locked. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the default branch. + * + * @return NS_OK The preference was successfully locked. + * @return Other The preference does not exist or an error occurred. + * + * @see unlockPref + */ + void lockPref(in string aPrefName); + + /** + * Called to check if a specific preference has a user value associated to + * it. + * + * @param aPrefName The preference to be tested. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the user branch. + * + * @return boolean true The preference has a user set value. + * false The preference only has a default value. + */ + boolean prefHasUserValue(in string aPrefName); + + /** + * Called to check if a specific preference is locked. If a preference is + * locked calling its Get method will always return the default value. + * + * @param aPrefName The preference to be tested. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the default branch. + * + * @return boolean true The preference is locked. + * false The preference is not locked. + * + * @see lockPref + * @see unlockPref + */ + boolean prefIsLocked(in string aPrefName); + + /** + * Called to unlock a specific preference. Unlocking a previously locked + * preference allows the preference service to once again return the user set + * value of the preference. + * + * @param aPrefName The preference to be unlocked. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the default branch. + * + * @return NS_OK The preference was successfully unlocked. + * @return Other The preference does not exist or an error occurred. + * + * @see lockPref + */ + void unlockPref(in string aPrefName); + + + /** + * Called to remove all of the preferences referenced by this branch. + * + * @param aStartingAt The point on the branch at which to start the deleting + * preferences. Pass in "" to remove all preferences + * referenced by this branch. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on both. + * + * @return NS_OK The preference(s) were successfully removed. + * @return Other The preference(s) do not exist or an error occurred. + */ + void deleteBranch(in string aStartingAt); + + /** + * Returns an array of strings representing the child preferences of the + * root of this branch. + * + * @param aStartingAt The point on the branch at which to start enumerating + * the child preferences. Pass in "" to enumerate all + * preferences referenced by this branch. + * @param aCount Receives the number of elements in the array. + * @param aChildArray Receives the array of child preferences. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on both. + * + * @return NS_OK The preference list was successfully retrieved. + * @return Other The preference(s) do not exist or an error occurred. + */ + void getChildList(in string aStartingAt, out unsigned long aCount, + [array, size_is(aCount), retval] out string aChildArray); + + /** + * Called to reset all of the preferences referenced by this branch to their + * default values. + * + * @param aStartingAt The point on the branch at which to start the resetting + * preferences to their default values. Pass in "" to + * reset all preferences referenced by this branch. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the user branch. + * + * @return NS_OK The preference(s) were successfully reset. + * @return Other The preference(s) do not exist or an error occurred. + */ + void resetBranch(in string aStartingAt); + +}; + + +%{C++ + +#define NS_PREFBRANCH_CONTRACTID "@mozilla.org/preferencesbranch;1" +#define NS_PREFBRANCH_CLASSNAME "Preferences Branch" + +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefBranch2.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefBranch2.idl new file mode 100644 index 00000000..55470b88 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefBranch2.idl @@ -0,0 +1,114 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Mozilla Communicator client code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Alec Flett <alecf@netscape.com> + * Brian Nesse <bnesse@netscape.com> + * Benjamin Smedberg <benjamin@smedbergs.us> + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#include "nsIPrefBranch.idl" + +interface nsIObserver; + +/** + * nsIPrefBranch2 allows clients to observe changes to pref values. + * + * @status FROZEN + * @see nsIPrefBranch + */ +[scriptable, uuid(74567534-eb94-4b1c-8f45-389643bfc555)] +interface nsIPrefBranch2 : nsIPrefBranch +{ + /** + * Add a preference change observer. On preference changes, the following + * arguments will be passed to the nsIObserver.observe() method: + * aSubject - The nsIPrefBranch object (this) + * aTopic - The string defined by NS_PREFBRANCH_PREFCHANGE_TOPIC_ID + * aData - The preference which has changed + * + * @param aDomain The preference on which to listen for changes. This can + * be the name of an entire branch to observe. + * e.g. Holding the "root" prefbranch and calling + * addObserver("foo.bar.", ...) will observe changes to + * foo.bar.baz and foo.bar.bzip + * @param aObserver The object to be notified if the preference changes. + * @param aHoldWeak true Hold a weak reference to |aObserver|. The object + * must implement the nsISupportsWeakReference + * interface or this will fail. + * false Hold a strong reference to |aObserver|. + * + * @note + * Registering as a preference observer can open an object to potential + * cyclical references which will cause memory leaks. These cycles generally + * occur because an object both registers itself as an observer (causing the + * branch to hold a reference to the observer) and holds a reference to the + * branch object for the purpose of getting/setting preference values. There + * are 3 approaches which have been implemented in an attempt to avoid these + * situations. + * 1) The nsPrefBranch object supports nsISupportsWeakReference. Any consumer + * may hold a weak reference to it instead of a strong one. + * 2) The nsPrefBranch object listens for xpcom-shutdown and frees all of the + * objects currently in its observer list. This insures that long lived + * objects (services for example) will be freed correctly. + * 3) The observer can request to be held as a weak reference when it is + * registered. This insures that shorter lived objects (say one tied to an + * open window) will not fall into the cyclical reference trap. + * + * @see nsIObserver + * @see removeObserver + */ + void addObserver(in string aDomain, in nsIObserver aObserver, + in boolean aHoldWeak); + + /** + * Remove a preference change observer. + * + * @param aDomain The preference which is being observed for changes. + * @param aObserver An observer previously registered with addObserver(). + * + * @see nsIObserver + * @see addObserver + */ + void removeObserver(in string aDomain, in nsIObserver aObserver); +}; + +%{C++ + +/** + * Notification sent when a preference changes. + */ +#define NS_PREFBRANCH_PREFCHANGE_TOPIC_ID "nsPref:changed" + +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefLocalizedString.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefLocalizedString.idl new file mode 100644 index 00000000..3ae485b5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefLocalizedString.idl @@ -0,0 +1,104 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Mozilla Communicator client code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Alec Flett <alecf@netscape.com> + * Brian Nesse <bnesse@netscape.com> + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#include "nsISupports.idl" + +/** + * The nsIPrefLocalizedString interface is simply a wrapper interface for + * nsISupportsString so the preferences service can have a unique identifier + * to distinguish between requests for normal wide strings (nsISupportsString) + * and "localized" wide strings, which get their default values from properites + * files. + * + * @see nsIPrefBranch + * @see nsISupportsString + * + * @status FROZEN + */ + +[scriptable, uuid(ae419e24-1dd1-11b2-b39a-d3e5e7073802)] +interface nsIPrefLocalizedString : nsISupports +{ + /** + * Provides access to string data stored in this property. + * + * @return NS_OK The operation succeeded. + * @return Other An error occured. + */ + attribute wstring data; + + /** + * Used to retrieve the contents of this object into a wide string. + * + * @return wstring The string containing the data stored within this object. + */ + wstring toString(); + + /** + * Used to set the contents of this object. + * + * @param length The length of the string. This value should not include + * space for the null terminator, nor should it account for the + * size of a character. It should only be the number of + * characters for which there is space in the string. + * @param data The string data to be stored. + * + * @note + * This makes a copy of the string argument passed in. + * + * @return NS_OK The data was successfully stored. + */ + void setDataWithLength(in unsigned long length, + [size_is(length)] in wstring data); +}; + +%{C++ + +#define NS_PREFLOCALIZEDSTRING_CID \ + { /* {064d9cee-1dd2-11b2-83e3-d25ab0193c26} */ \ + 0x064d9cee, \ + 0x1dd2, \ + 0x11b2, \ + { 0x83, 0xe3, 0xd2, 0x5a, 0xb0, 0x19, 0x3c, 0x26 } \ + } + +#define NS_PREFLOCALIZEDSTRING_CONTRACTID "@mozilla.org/pref-localizedstring;1" +#define NS_PREFLOCALIZEDSTRING_CLASSNAME "Pref LocalizedString" + +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefService.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefService.idl new file mode 100644 index 00000000..49cdf992 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPrefService.idl @@ -0,0 +1,182 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Mozilla Communicator client code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Alec Flett <alecf@netscape.com> + * Brian Nesse <bnesse@netscape.com> + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#include "nsISupports.idl" +#include "nsIPrefBranch.idl" + +interface nsIFile; + +/** + * The nsIPrefService interface is the main entry point into the back end + * preferences management library. The preference service is directly + * responsible for the management of the preferences files and also facilitates + * access to the preference branch object which allows the direct manipulation + * of the preferences themselves. + * + * @see nsIPrefBranch + * + * @status FROZEN + */ + +[scriptable, uuid(decb9cc7-c08f-4ea5-be91-a8fc637ce2d2)] +interface nsIPrefService : nsISupports +{ + /** + * Called to read in the preferences specified in a user preference file. + * + * @param aFile The file to be read. + * + * @note + * If nsnull is passed in for the aFile parameter the default preferences + * file(s) [prefs.js, user.js] will be read and processed. + * + * @return NS_OK File was read and processed. + * @return Other File failed to read or contained invalid data. + * + * @see savePrefFile + * @see nsIFile + */ + void readUserPrefs(in nsIFile aFile); + + /** + * Called to completely flush and re-initialize the preferences system. + * + * @return NS_OK The preference service was re-initialized correctly. + * @return Other The preference service failed to restart correctly. + */ + void resetPrefs(); + + /** + * Called to reset all preferences with user set values back to the + * application default values. + * + * @return NS_OK Always. + */ + void resetUserPrefs(); + + /** + * Called to write current preferences state to a file. + * + * @param aFile The file to be written. + * + * @note + * If nsnull is passed in for the aFile parameter the preference data is + * written out to the current preferences file (usually prefs.js.) + * + * @return NS_OK File was written. + * @return Other File failed to write. + * + * @see readUserPrefs + * @see nsIFile + */ + void savePrefFile(in nsIFile aFile); + + + /** + * Call to get a Preferences "Branch" which accesses user preference data. + * Using a Set method on this object will always create or set a user + * preference value. When using a Get method a user set value will be + * returned if one exists, otherwise a default value will be returned. + * + * @param aPrefRoot The preference "root" on which to base this "branch". + * For example, if the root "browser.startup." is used, the + * branch will be able to easily access the preferences + * "browser.startup.page", "browser.startup.homepage", or + * "browser.startup.homepage_override" by simply requesting + * "page", "homepage", or "homepage_override". nsnull or "" + * may be used to access to the entire preference "tree". + * + * @return nsIPrefBranch The object representing the requested branch. + * + * @see getDefaultBranch + */ + nsIPrefBranch getBranch(in string aPrefRoot); + + /** + * Call to get a Preferences "Branch" which accesses only the default + * preference data. Using a Set method on this object will always create or + * set a default preference value. When using a Get method a default value + * will always be returned. + * + * @param aPrefRoot The preference "root" on which to base this "branch". + * For example, if the root "browser.startup." is used, the + * branch will be able to easily access the preferences + * "browser.startup.page", "browser.startup.homepage", or + * "browser.startup.homepage_override" by simply requesting + * "page", "homepage", or "homepage_override". nsnull or "" + * may be used to access to the entire preference "tree". + * + * @note + * Few consumers will want to create default branch objects. Many of the + * branch methods do nothing on a default branch because the operations only + * make sense when applied to user set preferences. + * + * @return nsIPrefBranch The object representing the requested default branch. + * + * @see getBranch + */ + nsIPrefBranch getDefaultBranch(in string aPrefRoot); + +}; + +%{C++ + +#define NS_PREFSERVICE_CID \ + { /* {1cd91b88-1dd2-11b2-92e1-ed22ed298000} */ \ + 0x1cd91b88, \ + 0x1dd2, \ + 0x11b2, \ + { 0x92, 0xe1, 0xed, 0x22, 0xed, 0x29, 0x80, 0x00 } \ + } + +#define NS_PREFSERVICE_CONTRACTID "@mozilla.org/preferences-service;1" +#define NS_PREFSERVICE_CLASSNAME "Preferences Server" + +/** + * Notification sent before reading the default user preferences files. + */ +#define NS_PREFSERVICE_READ_TOPIC_ID "prefservice:before-read-userprefs" + +/** + * Notification sent when resetPrefs has been called, but before the actual + * reset process occurs. + */ +#define NS_PREFSERVICE_RESET_TOPIC_ID "prefservice:before-reset" + +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIProfile.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProfile.idl new file mode 100644 index 00000000..e1259d75 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProfile.idl @@ -0,0 +1,87 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 "nsIFile.idl" + +%{C++ + +#define NS_PROFILE_CID \ + { /* {02b0625b-e7f3-11d2-9f5a-006008a6efe9} */ \ + 0x02b0625b, \ + 0xe7f3, \ + 0x11d2, \ + { 0x9f, 0x5a, 0x00, 0x60, 0x08, 0xa6, 0xef, 0xe9 } \ + } + +#define NS_PROFILE_CONTRACTID \ + "@mozilla.org/profile/manager;1" + +#define NS_PROFILE_STARTUP_CATEGORY \ + "profile-startup-category" +%} + +/** + * nsIProfile + * + * @status FROZEN + * @version 1.0 + */ + +[scriptable, uuid(02b0625a-e7f3-11d2-9f5a-006008a6efe9)] +interface nsIProfile : nsISupports { + + readonly attribute long profileCount; + void getProfileList(out unsigned long length, [retval, array, size_is(length)] out wstring profileNames); + boolean profileExists(in wstring profileName); + + attribute wstring currentProfile; + + const unsigned long SHUTDOWN_PERSIST = 0x00000001; + const unsigned long SHUTDOWN_CLEANSE = 0x00000002; + + void shutDownCurrentProfile(in unsigned long shutDownType); + + void createNewProfile(in wstring profileName, + in wstring nativeProfileDir, + in wstring langcode, + in boolean useExistingDir); + + void renameProfile(in wstring oldName, in wstring newName); + void deleteProfile(in wstring name, in boolean canDeleteFiles); + void cloneProfile(in wstring profileName); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIProfileChangeStatus.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProfileChangeStatus.idl new file mode 100644 index 00000000..dc0850e8 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProfileChangeStatus.idl @@ -0,0 +1,142 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * ccarlen@netscape.com + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +%{C++ + + /** + * nsIObserver topics for profile changing. Profile changing happens in phases + * in the order given below. An observer may register separately for each phase + * of the process depending on its needs. The subject passed to the observer's + * Observe() method can be QI'd to an nsIProfileChangeStatus. + * + * "profile-approve-change" + * Called before a profile change is attempted. Typically, + * the application level observer will ask the user if + * he/she wants to stop all network activity, close all open + * windows, etc. If the user says NO, the observer should + * call the subject's vetoChange(). If any observer does + * this, the profile will not be changed. + * + * "profile-change-teardown" + * All async activity must be stopped in this phase. Typically, + * the application level observer will close all open windows. + * This is the last phase in which the subject's vetoChange() + * method may still be called. + * The next notification will be either + * profile-change-teardown-veto or profile-before-change. + * + * "profile-change-teardown-veto" + * This notification will only be sent, if the profile change + * was vetoed during the profile-change-teardown phase. + * This allows components to bring back required resources, + * that were tore down on profile-change-teardown. + * + * "profile-before-change" + * Called before the profile has changed. Use this notification + * to prepare for the profile going away. If a component is + * holding any state which needs to be flushed to a profile-relative + * location, it should be done here. + * + * "profile-do-change" + * Called after the profile has changed. Do the work to + * respond to having a new profile. Any change which + * affects others must be done in this phase. + * + * "profile-after-change" + * Called after the profile has changed. Use this notification + * to make changes that are dependent on what some other listener + * did during its profile-do-change. For example, to respond to + * new preferences. + * + * "profile-initial-state" + * Called after all phases of a change have completed. Typically + * in this phase, an application level observer will open a new window. + * + * Contexts for profile changes. These are passed as the someData param to the + * observer's Observe() method. + + * "startup" + * Going from no profile to a profile. + * + * The following topics happen in this context: + * profile-do-change + * profile-after-change + * + * "shutdown-persist" + * The user is logging out and whatever data the observer stores + * for the current profile should be released from memory and + * saved to disk. + * + * "shutdown-cleanse" + * The user is logging out and whatever data the observer stores + * for the current profile should be released from memory and + * deleted from disk. + * + * The following topics happen in both shutdown contexts: + * profile-approve-change + * profile-change-teardown + * profile-before-change + * + * "switch" + * Going from one profile to another. + * + * All of the above topics happen in a profile switch. + * + */ +%} + + +[scriptable, uuid(2f977d43-5485-11d4-87e2-0010a4e75ef2)] +interface nsIProfileChangeStatus : nsISupports { + + void vetoChange(); + + /** + * Called by a profile change observer when a fatal error + * occurred during the attempt to switch the profile. + * + * The profile should be considered in an unsafe condition, + * and the profile manager should inform the user and + * exit immediately. + * + */ + void changeFailed(); + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIProgrammingLanguage.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProgrammingLanguage.idl new file mode 100644 index 00000000..2fe6fb58 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProgrammingLanguage.idl @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 8; 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * John Bandhauer <jband@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +%{C++ +#ifdef XP_OS2 // OS2 has UNKNOWN problems :) +#undef UNKNOWN +#endif +%} + +/** + * Enumeration of Programming Languages + * @status FROZEN + */ + +[scriptable, uuid(ea604e90-40ba-11d5-90bb-0010a4e73d9a)] +interface nsIProgrammingLanguage : nsISupports +{ + /** + * Identifiers for programming languages. + */ + const PRUint32 UNKNOWN = 0; + const PRUint32 CPLUSPLUS = 1; + const PRUint32 JAVASCRIPT = 2; + const PRUint32 PYTHON = 3; + const PRUint32 PERL = 4; + const PRUint32 JAVA = 5; + const PRUint32 ZX81_BASIC = 6; // it could happen :) + const PRUint32 JAVASCRIPT2 = 7; + // This list can grow indefinitely. Just don't ever change an existing item. + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIPromptService.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPromptService.idl new file mode 100644 index 00000000..cc2da4c3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIPromptService.idl @@ -0,0 +1,380 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +interface nsIDOMWindow; + +/** + * This is the interface to the embeddable prompt service; the service that + * implements nsIPrompt. Its interface is designed to be just nsIPrompt, each + * method modified to take a parent window parameter. + * + * Accesskeys can be attached to buttons and checkboxes by inserting an & + * before the accesskey character in the checkbox message or button title. For + * a real &, use && instead. (A "button title" generally refers to the text + * label of a button.) + * + * One note: in all cases, the parent window parameter can be null. However, + * these windows are all intended to have parents. So when no parent is + * specified, the implementation should try hard to find a suitable foster + * parent. + * + * Implementations are free to choose how they present the various button + * types. For example, while prompts that give the user a choice between OK + * and Cancel are required to return a boolean value indicating whether or not + * the user accepted the prompt (pressed OK) or rejected the prompt (pressed + * Cancel), the implementation of this interface could very well speak the + * prompt to the user instead of rendering any visual user-interface. The + * standard button types are merely idioms used to convey the nature of the + * choice the user is to make. + * + * Because implementations of this interface may loosely interpret the various + * button types, it is advised that text messages passed to these prompts do + * not refer to the button types by name. For example, it is inadvisable to + * tell the user to "Press OK to proceed." Instead, such a prompt might be + * rewritten to ask the user: "Would you like to proceed?" + * + * @status FROZEN + */ +[scriptable, uuid(1630C61A-325E-49ca-8759-A31B16C47AA5)] +interface nsIPromptService : nsISupports +{ + /** + * Puts up an alert dialog with an OK button. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + */ + void alert(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText); + + /** + * Puts up an alert dialog with an OK button and a labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aCheckMsg + * Text to appear with the checkbox. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + */ + void alertCheck(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText, + in wstring aCheckMsg, + inout boolean aCheckState); + + /** + * Puts up a dialog with OK and Cancel buttons. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * + * @return true for OK, false for Cancel + */ + boolean confirm(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText); + + /** + * Puts up a dialog with OK and Cancel buttons and a labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aCheckMsg + * Text to appear with the checkbox. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return true for OK, false for Cancel + */ + boolean confirmCheck(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText, + in wstring aCheckMsg, + inout boolean aCheckState); + + /** + * Button Flags + * + * The following flags are combined to form the aButtonFlags parameter passed + * to confirmEx. See confirmEx for more information on how the flags may be + * combined. + */ + + /** + * Button Position Flags + */ + const unsigned long BUTTON_POS_0 = 1; + const unsigned long BUTTON_POS_1 = 1 << 8; + const unsigned long BUTTON_POS_2 = 1 << 16; + + /** + * Button Title Flags (used to set the labels of buttons in the prompt) + */ + const unsigned long BUTTON_TITLE_OK = 1; + const unsigned long BUTTON_TITLE_CANCEL = 2; + const unsigned long BUTTON_TITLE_YES = 3; + const unsigned long BUTTON_TITLE_NO = 4; + const unsigned long BUTTON_TITLE_SAVE = 5; + const unsigned long BUTTON_TITLE_DONT_SAVE = 6; + const unsigned long BUTTON_TITLE_REVERT = 7; + const unsigned long BUTTON_TITLE_IS_STRING = 127; + + /** + * Button Default Flags (used to select which button is the default one) + */ + const unsigned long BUTTON_POS_0_DEFAULT = 0; + const unsigned long BUTTON_POS_1_DEFAULT = 1 << 24; + const unsigned long BUTTON_POS_2_DEFAULT = 1 << 25; + + /** + * Causes the buttons to be initially disabled. They are enabled after a + * timeout expires. The implementation may interpret this loosely as the + * intent is to ensure that the user does not click through a security dialog + * too quickly. Strictly speaking, the implementation could choose to ignore + * this flag. + */ + const unsigned long BUTTON_DELAY_ENABLE = 1 << 26; + + /** + * Selects the standard set of OK/Cancel buttons. + */ + const unsigned long STD_OK_CANCEL_BUTTONS = (BUTTON_TITLE_OK * BUTTON_POS_0) + + (BUTTON_TITLE_CANCEL * BUTTON_POS_1); + + /** + * Selects the standard set of Yes/No buttons. + */ + const unsigned long STD_YES_NO_BUTTONS = (BUTTON_TITLE_YES * BUTTON_POS_0) + + (BUTTON_TITLE_NO * BUTTON_POS_1); + + + /** + * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aButtonFlags + * A combination of Button Flags. + * @param aButton0Title + * Used when button 0 uses TITLE_IS_STRING + * @param aButton1Title + * Used when button 1 uses TITLE_IS_STRING + * @param aButton2Title + * Used when button 2 uses TITLE_IS_STRING + * @param aCheckMsg + * Text to appear with the checkbox. Null if no checkbox. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return index of the button pressed. + * + * Buttons are numbered 0 - 2. The implementation can decide whether the + * sequence goes from right to left or left to right. Button 0 is the + * default button unless one of the Button Default Flags is specified. + * + * A button may use a predefined title, specified by one of the Button Title + * Flags values. Each title value can be multiplied by a position value to + * assign the title to a particular button. If BUTTON_TITLE_IS_STRING is + * used for a button, the string parameter for that button will be used. If + * the value for a button position is zero, the button will not be shown. + * + * In general, aButtonFlags is constructed per the following example: + * + * aButtonFlags = (BUTTON_POS_0) * (BUTTON_TITLE_AAA) + + * (BUTTON_POS_1) * (BUTTON_TITLE_BBB) + + * BUTTON_POS_1_DEFAULT; + * + * where "AAA" and "BBB" correspond to one of the button titles. + */ + PRInt32 confirmEx(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText, + in unsigned long aButtonFlags, + in wstring aButton0Title, + in wstring aButton1Title, + in wstring aButton2Title, + in wstring aCheckMsg, + inout boolean aCheckState); + + /** + * Puts up a dialog with an edit field and an optional, labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aValue + * Contains the default value for the dialog field when this method + * is called (null value is ok). Upon return, if the user pressed + * OK, then this parameter contains a newly allocated string value. + * Otherwise, the parameter's value is unmodified. + * @param aCheckMsg + * Text to appear with the checkbox. If null, check box will not be shown. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return true for OK, false for Cancel. + */ + boolean prompt(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText, + inout wstring aValue, + in wstring aCheckMsg, + inout boolean aCheckState); + + /** + * Puts up a dialog with an edit field, a password field, and an optional, + * labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aUsername + * Contains the default value for the username field when this method + * is called (null value is ok). Upon return, if the user pressed OK, + * then this parameter contains a newly allocated string value. + * Otherwise, the parameter's value is unmodified. + * @param aPassword + * Contains the default value for the password field when this method + * is called (null value is ok). Upon return, if the user pressed OK, + * then this parameter contains a newly allocated string value. + * Otherwise, the parameter's value is unmodified. + * @param aCheckMsg + * Text to appear with the checkbox. If null, check box will not be shown. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return true for OK, false for Cancel. + */ + boolean promptUsernameAndPassword(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText, + inout wstring aUsername, + inout wstring aPassword, + in wstring aCheckMsg, + inout boolean aCheckState); + + /** + * Puts up a dialog with a password field and an optional, labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aPassword + * Contains the default value for the password field when this method + * is called (null value is ok). Upon return, if the user pressed OK, + * then this parameter contains a newly allocated string value. + * Otherwise, the parameter's value is unmodified. + * @param aCheckMsg + * Text to appear with the checkbox. If null, check box will not be shown. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return true for OK, false for Cancel. + */ + boolean promptPassword(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText, + inout wstring aPassword, + in wstring aCheckMsg, + inout boolean aCheckState); + + /** + * Puts up a dialog box which has a list box of strings from which the user + * may make a single selection. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aCount + * The length of the aSelectList array parameter. + * @param aSelectList + * The list of strings to display. + * @param aOutSelection + * Contains the index of the selected item in the list when this + * method returns true. + * + * @return true for OK, false for Cancel. + */ + boolean select(in nsIDOMWindow aParent, + in wstring aDialogTitle, + in wstring aText, + in PRUint32 aCount, + [array, size_is(aCount)] in wstring aSelectList, + out long aOutSelection); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIProperties.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProperties.idl new file mode 100644 index 00000000..32a2a057 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProperties.idl @@ -0,0 +1,79 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/* + * Simple mapping service interface. + * @status FROZEN + */ + +[scriptable, uuid(78650582-4e93-4b60-8e85-26ebd3eb14ca)] +interface nsIProperties : nsISupports +{ + /** + * Gets a property with a given name. + * + * @return NS_ERROR_FAILURE if a property with that name doesn't exist. + * @return NS_ERROR_NO_INTERFACE if the found property fails to QI to the + * given iid. + */ + void get(in string prop, in nsIIDRef iid, + [iid_is(iid),retval] out nsQIResult result); + + /** + * Sets a property with a given name to a given value. + */ + void set(in string prop, in nsISupports value); + + /** + * Returns true if the property with the given name exists. + */ + boolean has(in string prop); + + /** + * Undefines a property. + * @return NS_ERROR_FAILURE if a property with that name doesn't + * already exist. + */ + void undefine(in string prop); + + /** + * Returns an array of the keys. + */ + void getKeys(out PRUint32 count, [array, size_is(count), retval] out string keys); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIProtocolHandler.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProtocolHandler.idl new file mode 100644 index 00000000..da6612c5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIProtocolHandler.idl @@ -0,0 +1,167 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +interface nsIURI; +interface nsIChannel; + +/** + * nsIProtocolHandler + * + * @status FROZEN + */ +[scriptable, uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40)] +interface nsIProtocolHandler : nsISupports +{ + /** + * The scheme of this protocol (e.g., "file"). + */ + readonly attribute ACString scheme; + + /** + * The default port is the port that this protocol normally uses. + * If a port does not make sense for the protocol (e.g., "about:") + * then -1 will be returned. + */ + readonly attribute long defaultPort; + + /** + * Returns the protocol specific flags (see flag definitions below). + */ + readonly attribute unsigned long protocolFlags; + + /** + * Makes a URI object that is suitable for loading by this protocol, + * where the URI string is given as an UTF-8 string. The caller may + * provide the charset from which the URI string originated, so that + * the URI string can be translated back to that charset (if necessary) + * before communicating with, for example, the origin server of the URI + * string. (Many servers do not support UTF-8 IRIs at the present time, + * so we must be careful about tracking the native charset of the origin + * server.) + * + * @param aSpec - the URI string in UTF-8 encoding. depending + * on the protocol implementation, unicode character + * sequences may or may not be %xx escaped. + * @param aOriginCharset - the charset of the document from which this URI + * string originated. this corresponds to the + * charset that should be used when communicating + * this URI to an origin server, for example. if + * null, then UTF-8 encoding is assumed (i.e., + * no charset transformation from aSpec). + * @param aBaseURI - if null, aSpec must specify an absolute URI. + * otherwise, aSpec may be resolved relative + * to aBaseURI, depending on the protocol. + * If the protocol has no concept of relative + * URI aBaseURI will simply be ignored. + */ + nsIURI newURI(in AUTF8String aSpec, + in string aOriginCharset, + in nsIURI aBaseURI); + + /** + * Constructs a new channel from the given URI for this protocol handler. + */ + nsIChannel newChannel(in nsIURI aURI); + + /** + * Allows a protocol to override blacklisted ports. + * + * This method will be called when there is an attempt to connect to a port + * that is blacklisted. For example, for most protocols, port 25 (Simple Mail + * Transfer) is banned. When a URI containing this "known-to-do-bad-things" + * port number is encountered, this function will be called to ask if the + * protocol handler wants to override the ban. + */ + boolean allowPort(in long port, in string scheme); + + + /************************************************************************** + * Constants for the protocol flags (the first is the default mask, the + * others are deviations): + * + * NOTE: Implementation must ignore any flags they do not understand. + */ + + /** + * standard full URI with authority component and concept of relative + * URIs (http, ftp, ...) + */ + const unsigned long URI_STD = 0; + + /** + * no concept of relative URIs (about, javascript, finger, ...) + */ + const unsigned long URI_NORELATIVE = (1<<0); + + /** + * no authority component (file, ...) + */ + const unsigned long URI_NOAUTH = (1<<1); + + /** + * This protocol handler can be proxied via a proxy (socks or http) + * (e.g., irc, smtp, http, etc.). If the protocol supports transparent + * proxying, the handler should implement nsIProxiedProtocolHandler. + * + * If it supports only HTTP proxying, then it need not support + * nsIProxiedProtocolHandler, but should instead set the ALLOWS_PROXY_HTTP + * flag (see below). + * + * @see nsIProxiedProtocolHandler + */ + const unsigned long ALLOWS_PROXY = (1<<2); + + /** + * This protocol handler can be proxied using a http proxy (e.g., http, + * ftp, etc.). nsIIOService::newChannelFromURI will feed URIs from this + * protocol handler to the HTTP protocol handler instead. This flag is + * ignored if ALLOWS_PROXY is not set. + */ + const unsigned long ALLOWS_PROXY_HTTP = (1<<3); +}; + +%{C++ +/** + * Protocol handlers are registered with XPCOM under the following CONTRACTID prefix: + */ +#define NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "@mozilla.org/network/protocol;1?name=" +/** + * For example, "@mozilla.org/network/protocol;1?name=http" + */ +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIRequest.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIRequest.idl new file mode 100644 index 00000000..88d4438c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIRequest.idl @@ -0,0 +1,198 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +interface nsILoadGroup; + +typedef unsigned long nsLoadFlags; + +/** + * nsIRequest + * + * @status FROZEN + */ +[scriptable, uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe)] +interface nsIRequest : nsISupports +{ + /** + * The name of the request. Often this is the URI of the request. + */ + readonly attribute AUTF8String name; + + /** + * @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(); + + /** + * The error status associated with the request. + */ + readonly attribute nsresult status; + + /** + * 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); + + /** + * 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(); + + /** + * 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(); + + /** + * 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; + + /** + * 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; + + /************************************************************************** + * Listed below are the various load flags which may be or'd together. + */ + + /** + * No special load flags: + */ + const unsigned long LOAD_NORMAL = 0; + + /** + * Don't deliver status notifications to the nsIProgressEventSink, or keep + * this load from completing the nsILoadGroup it may belong to. + */ + const unsigned long LOAD_BACKGROUND = 1 << 0; + + /************************************************************************** + * The following flags control the flow of data into the cache. + */ + + /** + * This flag prevents caching of any kind. It does not, however, prevent + * cached content from being used to satisfy this request. + */ + const unsigned long INHIBIT_CACHING = 1 << 7; + + /** + * This flag prevents caching on disk (or other persistent media), which + * may be needed to preserve privacy. For HTTPS, this flag is set auto- + * matically. + */ + const unsigned long INHIBIT_PERSISTENT_CACHING = 1 << 8; + + /************************************************************************** + * The following flags control what happens when the cache contains data + * that could perhaps satisfy this request. They are listed in descending + * order of precidence. + */ + + /** + * Force an end-to-end download of content data from the origin server. + * This flag is used for a shift-reload. + */ + const unsigned long LOAD_BYPASS_CACHE = 1 << 9; + + /** + * Load from the cache, bypassing protocol specific validation logic. This + * flag is used when browsing via history. It is not recommended for normal + * browsing as it may likely violate reasonable assumptions made by the + * server and confuse users. + */ + const unsigned long LOAD_FROM_CACHE = 1 << 10; + + /** + * The following flags control the frequency of cached content validation + * when neither LOAD_BYPASS_CACHE or LOAD_FROM_CACHE are set. By default, + * cached content is automatically validated if necessary before reuse. + * + * VALIDATE_ALWAYS forces validation of any cached content independent of + * its expiration time. + * + * VALIDATE_NEVER disables validation of expired content. + * + * VALIDATE_ONCE_PER_SESSION disables validation of expired content, + * provided it has already been validated (at least once) since the start + * of this session. + * + * NOTE TO IMPLEMENTORS: + * These flags are intended for normal browsing, and they should therefore + * not apply to content that must be validated before each use. Consider, + * for example, a HTTP response with a "Cache-control: no-cache" header. + * According to RFC2616, this response must be validated before it can + * be taken from a cache. Breaking this requirement could result in + * incorrect and potentially undesirable side-effects. + */ + const unsigned long VALIDATE_ALWAYS = 1 << 11; + const unsigned long VALIDATE_NEVER = 1 << 12; + const unsigned long VALIDATE_ONCE_PER_SESSION = 1 << 13; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIRequestObserver.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIRequestObserver.idl new file mode 100644 index 00000000..414a8e65 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIRequestObserver.idl @@ -0,0 +1,75 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +interface nsIRequest; + +/** + * nsIRequestObserver + * + * @status FROZEN + */ +[scriptable, uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)] +interface nsIRequestObserver : nsISupports +{ + /** + * 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); + + /** + * 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); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsISHistory.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsISHistory.idl new file mode 100644 index 00000000..c67fba0d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsISHistory.idl @@ -0,0 +1,174 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Radha Kulkarni (radha@netscape.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIHistoryEntry; +interface nsISHistoryListener; +interface nsISimpleEnumerator; +/** + * An interface to the primary properties of the Session History + * component. In an embedded browser environment, the nsIWebBrowser + * object creates an instance of session history for each open window. + * A handle to the session history object can be obtained from + * nsIWebNavigation. In a non-embedded situation, the owner of the + * session history component must create a instance of it and set + * it in the nsIWebNavigation object. + * This interface is accessible from javascript. + * + * @status FROZEN + */ + + +%{C++ +#define NS_SHISTORY_CID \ +{0x7294fe9c, 0x14d8, 0x11d5, {0x98, 0x82, 0x00, 0xC0, 0x4f, 0xa0, 0x2f, 0x40}} + +#define NS_SHISTORY_CONTRACTID "@mozilla.org/browser/shistory;1" +%} + +[scriptable, uuid(7294FE9B-14D8-11D5-9882-00C04FA02F40)] +interface nsISHistory: nsISupports +{ + /** + * A readonly property of the interface that returns + * the number of toplevel documents currently available + * in session history. + */ + readonly attribute long count; + + /** + * A readonly property of the interface that returns + * the index of the current document in session history. + */ + readonly attribute long index; + + /** + * A read/write property of the interface, used to Get/Set + * the maximum number of toplevel documents, session history + * can hold for each instance. + */ + attribute long maxLength; + + /** + * Called to obtain handle to the history entry at a + * given index. + * + * @param index The index value whose entry is requested. + * @param modifyIndex A boolean flag that indicates if the current + * index of session history should be modified + * to the parameter index. + * + * @return <code>NS_OK</code> history entry for + * the index is obtained successfully. + * <code>NS_ERROR_FAILURE</code> Error in obtaining + * history entry for the given index. + */ + nsIHistoryEntry getEntryAtIndex(in long index, in boolean modifyIndex); + + + /** + * Called to purge older documents from history. + * Documents can be removed from session history for various + * reasons. For example to control memory usage of the browser, to + * prevent users from loading documents from history, to erase evidence of + * prior page loads etc... + * + * @param numEntries The number of toplevel documents to be + * purged from history. During purge operation, + * the latest documents are maintained and older + * 'numEntries' documents are removed from history. + * @throws <code>NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA</code> Purge was vetod. + * @throws <code>NS_ERROR_FAILURE</code> numEntries is + * invalid or out of bounds with the size of history. + * + */ + void PurgeHistory(in long numEntries); + + /** + * Called to register a listener for the session history component. + * Listeners are notified when pages are loaded or purged from history. + * + * @param aListener Listener object to be notified for all + * page loads that initiate in session history. + * + * @note A listener object must implement + * nsISHistoryListener and nsSupportsWeakReference + * + * @see nsISHistoryListener + * @see nsSupportsWeakReference + */ + void addSHistoryListener(in nsISHistoryListener aListener); + + /** + * Called to remove a listener for the session history component. + * Listeners are notified when pages are loaded from history. + * + * @param aListener Listener object to be removed from + * session history. + * + * @note A listener object must implement + * nsISHistoryListener and nsSupportsWeakReference + * @see nsISHistoryListener + * @see nsSupportsWeakReference + */ + void removeSHistoryListener(in nsISHistoryListener aListener); + + /** + * Called to obtain a enumerator for all the documents stored in + * session history. The enumerator object thus returned by this method + * can be traversed using nsISimpleEnumerator. + * + * @note To access individual history entries of the enumerator, perform the + * following steps: + * 1) Call nsISHistory->GetSHistoryEnumerator() to obtain handle + * the nsISimpleEnumerator object. + * 2) Use nsISimpleEnumerator->GetNext() on the object returned + * by step #1 to obtain handle to the next object in the list. + * The object returned by this step is of type nsISupports. + * 3) Perform a QueryInterface on the object returned by step #2 + * to nsIHistoryEntry. + * 4) Use nsIHistoryEntry to access properties of each history entry. + * + * @see nsISimpleEnumerator + * @see nsIHistoryEntry + * @see QueryInterface() + * @see do_QueryInterface() + */ + readonly attribute nsISimpleEnumerator SHistoryEnumerator; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsISHistoryListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsISHistoryListener.idl new file mode 100644 index 00000000..bc6fdc85 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsISHistoryListener.idl @@ -0,0 +1,179 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIURI; + + +/** + * nsISHistoryListener defines the interface for an object that wishes + * to receive notifications about activities in History. A history + * listener will be notified when pages are added, removed and loaded + * from session history. A listener to session history can be registered + * using the interface nsISHistory. + * + * @status FROZEN + */ +%{C++ +#define NS_SHISTORYLISTENER_CONTRACTID "@mozilla.org/browser/shistorylistener;1" +%} + +// interface nsISHistoryListener + +[scriptable, uuid(3b07f591-e8e1-11d4-9882-00c04fa02f40)] +interface nsISHistoryListener : nsISupports +{ + + /** + * called to notify a listener when a new document is + * added to session history. New documents are added to + * session history by docshell when new pages are loaded + * in a frame or content area. + * + * @param aNewURI The uri of the document to be added to session history + * + * @return <CODE>NS_OK</CODE> notification sent out successfully + */ + void OnHistoryNewEntry(in nsIURI aNewURI); + + /** + * called to notify a listener when the user presses the 'back' button + * of the browser OR when the user attempts to go back one page + * in history thro' other means, from javascript or using nsIWebNavigation + * + * @param aBackURI The uri of the previous page which is to be + * loaded. + * + * @return aReturn A boolean flag returned by the listener to + * indicate if the back operation is to be aborted + * or continued. If the listener returns 'true', it indicates + * that the back operation can be continued. If the listener + * returns 'false', then the back operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * + */ + boolean OnHistoryGoBack(in nsIURI aBackURI); + + /** + * called to notify a listener when the user presses the 'forward' button + * of the browser OR when the user attempts to go forward one page + * in history thro' other means, from javascript or using nsIWebNavigation + * + * @param aForwardURI The uri of the next page which is to be + * loaded. + * + * @return aReturn A boolean flag returned by the listener to + * indicate if the forward operation is to be aborted + * or continued. If the listener returns 'true', it indicates + * that the forward operation can be continued. If the listener + * returns 'false', then the forward operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * + */ + boolean OnHistoryGoForward(in nsIURI aForwardURI); + + /** + * called to notify a listener when the user presses the 'reload' button + * of the browser OR when the user attempts to reload the current document + * through other means, like from javascript or using nsIWebNavigation + * + * @param aReloadURI The uri of the current document to be reloaded. + * @param aReloadFlags Flags that indicate how the document is to be + * refreshed. For example, from cache or bypassing + * cache and/or Proxy server. + * @return aReturn A boolean flag returned by the listener to indicate + * if the reload operation is to be aborted or continued. + * If the listener returns 'true', it indicates that the + * reload operation can be continued. If the listener + * returns 'false', then the reload operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * @see nsIWebNavigation + * + */ + boolean OnHistoryReload(in nsIURI aReloadURI, in unsigned long aReloadFlags); + + /** + * called to notify a listener when the user visits a page using the 'Go' menu + * of the browser OR when the user attempts to go to a page at a particular index + * through other means, like from javascript or using nsIWebNavigation + * + * @param aIndex The index in history of the document to be loaded. + * @param aGotoURI The uri of the document to be loaded. + * + * @return aReturn A boolean flag returned by the listener to + * indicate if the GotoIndex operation is to be aborted + * or continued. If the listener returns 'true', it indicates + * that the GotoIndex operation can be continued. If the listener + * returns 'false', then the GotoIndex operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * + */ + boolean OnHistoryGotoIndex(in long aIndex, in nsIURI aGotoURI); + + /** + * called to notify a listener when documents are removed from session + * history. Documents can be removed from session history for various + * reasons. For example to control the memory usage of the browser, to + * prevent users from loading documents from history, to erase evidence of + * prior page loads etc... To purge documents from session history call + * nsISHistory::PurgeHistory() + * + * @param aNumEntries The number of documents to be removed from session history. + * + * @return aReturn A boolean flag returned by the listener to + * indicate if the purge operation is to be aborted + * or continued. If the listener returns 'true', it indicates + * that the purge operation can be continued. If the listener + * returns 'false', then the purge operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * + * @note While purging history, the older documents are removed + * and newly loaded documents are kept. For example if there + * are 5 documents in history, and nsISHistory::PurgeHistory(3) + * is called, then, document 1, 2 and 3 are removed from history + * and most recently loaded document 4 and 5 are kept. + * + */ + boolean OnHistoryPurge(in long aNumEntries); +};
\ No newline at end of file diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIScriptableInputStream.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIScriptableInputStream.idl new file mode 100644 index 00000000..9a21b1d0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIScriptableInputStream.idl @@ -0,0 +1,73 @@ +/* -*- Mode: IDL; 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIInputStream; + +/** + * nsIScriptableInputStream provides scriptable access to the nsIInputStream. + * + * @status FROZEN + */ +[scriptable, uuid(a2a32f90-9b90-11d3-a189-0050041caf44)] +interface nsIScriptableInputStream : nsISupports +{ + /** + * Closes the stream. + */ + void close(); + + /** Wrap the given nsIInputStream with this nsIScriptableInputStream. + * @param aInputStream [in] parameter providing the stream to wrap + */ + void init(in nsIInputStream aInputStream); + + /** Return the number of bytes currently available in the stream + * @param _retval [out] parameter to hold the number of bytes + * if an error occurs, the parameter will be undefined + * @return error status + */ + unsigned long available(); + + /** Read data from the stream. + * @param aCount [in] the maximum number of bytes to read + * @param _retval [out] the data + */ + string read(in unsigned long aCount); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsISecurityWarningDialogs.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsISecurityWarningDialogs.idl new file mode 100644 index 00000000..e493911e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsISecurityWarningDialogs.idl @@ -0,0 +1,124 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Terry Hayes <thayes@netscape.com> + * + * 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" + +interface nsIInterfaceRequestor; + +/** + * Functions that display warnings for transitions between secure + * and insecure pages, posts to insecure servers etc. + * + * @status FROZEN + */ +[scriptable, uuid(1c399d06-1dd2-11b2-bc58-c87cbcacdb78)] +interface nsISecurityWarningDialogs : nsISupports +{ + /** + * Inform the user that a transition + * from an insecure page + * to a secure page + * is happening. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to continue + */ + boolean confirmEnteringSecure(in nsIInterfaceRequestor ctx); + + /** + * Inform the user that a transition + * from an insecure page + * or from a secure page + * to a weak security page + * is happening. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to continue + */ + boolean confirmEnteringWeak(in nsIInterfaceRequestor ctx); + + /** + * Inform the user that a transition + * from a secure page + * to an insecure page + * is happening. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to continue + */ + boolean confirmLeavingSecure(in nsIInterfaceRequestor ctx); + + /** + * Inform the user the currently displayed page + * contains some secure and some insecure page components. + * + * @param ctx A user interface context. + * + * @return true if the user decides to show insecure objects. + */ + boolean confirmMixedMode(in nsIInterfaceRequestor ctx); + + /** + * Inform the user that information is being submitted + * to an insecure page. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to submit. + */ + boolean confirmPostToInsecure(in nsIInterfaceRequestor ctx); + + /** + * Inform the user: Although the currently displayed + * page was loaded using a secure connection, and the UI probably + * currently indicates a secure page, + * that information is being submitted to an insecure page. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to submit. + */ + boolean confirmPostToInsecureFromSecure(in nsIInterfaceRequestor ctx); +}; + +%{C++ +#define NS_SECURITYWARNINGDIALOGS_CONTRACTID "@mozilla.org/nsSecurityWarningDialogs;1" +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsISelection.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsISelection.idl new file mode 100644 index 00000000..7a4c1614 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsISelection.idl @@ -0,0 +1,170 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/* THIS IS A PUBLIC INTERFACE */ + +interface nsIDOMNode; +interface nsIDOMRange; + +/** + * Interface for manipulating and querying the current selected range + * of nodes within the document. + * + * @status FROZEN + * @version 1.0 + */ + +[scriptable, uuid(B2C7ED59-8634-4352-9E37-5484C8B6E4E1)] +interface nsISelection : nsISupports +{ + /** + * The node representing one end of the selection. + */ + readonly attribute nsIDOMNode anchorNode; + + /** + * The offset within the (text) node where the selection begins. + */ + readonly attribute long anchorOffset; + + /** + * The node with keyboard focus. + */ + readonly attribute nsIDOMNode focusNode; + + /** + * The offset within the (text) node where focus starts. + */ + readonly attribute long focusOffset; + + /** + * Indicates if the selection is collapsed or not. + */ + readonly attribute boolean isCollapsed; + + /** + * Returns the number of ranges in the selection. + */ + readonly attribute long rangeCount; + + /** + * Returns the range at the specified index. + */ + nsIDOMRange getRangeAt(in long index); + + /** + * Collapses the selection to a single point, at the specified offset + * in the given DOM node. When the selection is collapsed, and the content + * is focused and editable, the caret will blink there. + * @param parentNode The given dom node where the selection will be set + * @param offset Where in given dom node to place the selection (the offset into the given node) + */ + void collapse(in nsIDOMNode parentNode, in long offset); + + + /** + * Extends the selection by moving the focus to the specified node and offset, + * preserving the anchor postion. The new selection end result will always + * be from the anchor to the new focus, regardless of direction. + * @param parentNode The node where the selection will be extended to + * @param offset Where in node to place the offset in the new focused node + */ + void extend(in nsIDOMNode parentNode, in long offset); + + /** + * Collapses the whole selection to a single point at the start + * of the current selection (irrespective of direction). If content + * is focused and editable, the caret will blink there. + */ + void collapseToStart(); + + /** + * Collapses the whole selection to a single point at the end + * of the current selection (irrespective of direction). If content + * is focused and editable, the caret will blink there. + */ + void collapseToEnd(); + + /** + * The value of entirelyContained determines the detail of the search to determine if + * the selection contains the node. If entirelyContained is set to PR_TRUE, t + * or false if + * @param node The node where the selection will be extended to + * @param entirelyContained Whether + */ + boolean containsNode(in nsIDOMNode node, in boolean entirelyContained); + + /** + * Adds all children of the specified node to the selection. + * @param parentNode the parent of the children to be added to the selection. + */ + void selectAllChildren(in nsIDOMNode parentNode); + + /** + * Adds a range to the current selection. + */ + void addRange(in nsIDOMRange range); + + /** + * Removes a range from the current selection. + */ + void removeRange(in nsIDOMRange range); + + /** + * Removes all ranges from the current selection. + */ + void removeAllRanges(); + + /** + * Deletes this selection from document the nodes belong to. + */ + void deleteFromDocument(); + + /** + * Modifies the cursor Bidi level after a change in keyboard direction + * @param langRTL is PR_TRUE if the new language is right-to-left or + * PR_FALSE if the new language is left-to-right. + */ + void selectionLanguageChange(in boolean langRTL); + + /** + * Returns the whole selection into a plain text string. + */ + wstring toString(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIServiceManager.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIServiceManager.idl new file mode 100644 index 00000000..13aaba7c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIServiceManager.idl @@ -0,0 +1,113 @@ +/* ***** 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 XPCOM. + * + * The Initial Developer of the Original Code is Netscape Communications. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +/** + * The nsIServiceManager manager interface provides a means to obtain + * global services in an application. The service manager depends on the + * repository to find and instantiate factories to obtain services. + * + * Users of the service manager must first obtain a pointer to the global + * service manager by calling NS_GetServiceManager. After that, + * they can request specific services by calling GetService. When they are + * finished they can NS_RELEASE() the service as usual. + * + * A user of a service may keep references to particular services indefinitely + * and only must call Release when it shuts down. + * + * @status FROZEN + */ + +[scriptable, uuid(8bb35ed9-e332-462d-9155-4a002ab5c958)] +interface nsIServiceManager : nsISupports +{ + /** + * 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); + + void getServiceByContractID(in string aContractID, + in nsIIDRef aIID, + [iid_is(aIID),retval] out nsQIResult result); + + /** + * 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); + boolean isServiceInstantiatedByContractID(in string aContractID, in nsIIDRef aIID); +}; + + +%{C++ +#define NS_ERROR_SERVICE_NOT_AVAILABLE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 22) +/** + * @status DEPRECATED + */ +#define NS_ERROR_SERVICE_NOT_FOUND NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 22) +/** + * @status DEPRECATED + */ +#define NS_ERROR_SERVICE_IN_USE NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 23) + +// Observing xpcom autoregistration. Topics will be 'start' and 'stop'. +#define NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID "xpcom-autoregistration" + +#ifdef MOZILLA_INTERNAL_API +#include "nsXPCOM.h" +#include "nsServiceManagerUtils.h" +#include "nsIServiceManagerObsolete.h" +#endif +%} + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsISimpleEnumerator.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsISimpleEnumerator.idl new file mode 100644 index 00000000..3f0efbf5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsISimpleEnumerator.idl @@ -0,0 +1,81 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +/** + * Used to enumerate over elements defined by its implementor. + * Although hasMoreElements() can be called independently of getNext(), + * getNext() must be pre-ceeded by a call to hasMoreElements(). There is + * no way to "reset" an enumerator, once you obtain one. + * + * @status FROZEN + * @version 1.0 + */ + +[scriptable, uuid(D1899240-F9D2-11D2-BDD6-000064657374)] +interface nsISimpleEnumerator : 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(); + + /** + * 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(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIStreamListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIStreamListener.idl new file mode 100644 index 00000000..7c1cac80 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIStreamListener.idl @@ -0,0 +1,71 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 "nsIRequestObserver.idl" + +interface nsIInputStream; + +/** + * nsIStreamListener + * + * @status FROZEN + */ +[scriptable, uuid(1a637020-1482-11d3-9333-00104ba0fd40)] +interface nsIStreamListener : 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 + * + * NOTE: The aInputStream parameter must implement readSegments. + * + * 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); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsISupports.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsISupports.idl new file mode 100644 index 00000000..b1127b4c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsISupports.idl @@ -0,0 +1,77 @@ +/* -*- Mode: IDL; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +/** + * The mother of all xpcom interfaces. + * @status FROZEN + */ + +/* In order to get both the right typelib and the right header we force +* the 'real' output from xpidl to be commented out in the generated header +* and includes a copy of the original nsISupports.h. This is all just to deal +* with the Mac specific ": public __comobject" thing. +*/ + +#include "nsrootidl.idl" + +%{C++ +/* + * Start commenting out the C++ versions of the below in the output header + */ +#if 0 +%} + +[scriptable, uuid(00000000-0000-0000-c000-000000000046)] +interface nsISupports { + void QueryInterface(in nsIIDRef uuid, + [iid_is(uuid),retval] out nsQIResult result); + [noscript, notxpcom] nsrefcnt AddRef(); + [noscript, notxpcom] nsrefcnt Release(); +}; + +%{C++ +/* + * End commenting out the C++ versions of the above in the output header + */ +#endif +%} + + +%{C++ +#include "nsISupportsBase.h" +#include "nsISupportsUtils.h" +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsISupportsPrimitives.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsISupportsPrimitives.idl new file mode 100644 index 00000000..680e5599 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsISupportsPrimitives.idl @@ -0,0 +1,304 @@ +/* -*- Mode: IDL; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Dan Rosen <dr@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +/* nsISupports wrappers for single primitive pieces of data. */ + +#include "nsISupports.idl" + +/** + * Primitive base interface. + * + * These first three are pointer types and do data copying + * using the nsIMemory. Be careful! + * + * @status FROZEN + */ + +[scriptable, uuid(d0d4b136-1dd1-11b2-9371-f0727ef827c0)] +interface nsISupportsPrimitive : nsISupports +{ + const unsigned short TYPE_ID = 1; + const unsigned short TYPE_CSTRING = 2; + const unsigned short TYPE_STRING = 3; + const unsigned short TYPE_PRBOOL = 4; + const unsigned short TYPE_PRUINT8 = 5; + const unsigned short TYPE_PRUINT16 = 6; + const unsigned short TYPE_PRUINT32 = 7; + const unsigned short TYPE_PRUINT64 = 8; + const unsigned short TYPE_PRTIME = 9; + const unsigned short TYPE_CHAR = 10; + const unsigned short TYPE_PRINT16 = 11; + const unsigned short TYPE_PRINT32 = 12; + const unsigned short TYPE_PRINT64 = 13; + const unsigned short TYPE_FLOAT = 14; + const unsigned short TYPE_DOUBLE = 15; + const unsigned short TYPE_VOID = 16; + const unsigned short TYPE_INTERFACE_POINTER = 17; + + readonly attribute unsigned short type; +}; + +/** + * Scriptable storage for nsID structures + * + * @status FROZEN + */ + +[scriptable, uuid(d18290a0-4a1c-11d3-9890-006008962422)] +interface nsISupportsID : nsISupportsPrimitive +{ + attribute nsIDPtr data; + string toString(); +}; + +/** + * Scriptable storage for ASCII strings + * + * @status FROZEN + */ + +[scriptable, uuid(d65ff270-4a1c-11d3-9890-006008962422)] +interface nsISupportsCString : nsISupportsPrimitive +{ + attribute ACString data; + string toString(); +}; + +/** + * Scriptable storage for Unicode strings + * + * @status FROZEN + */ + +[scriptable, uuid(d79dc970-4a1c-11d3-9890-006008962422)] +interface nsISupportsString : nsISupportsPrimitive +{ + attribute AString data; + wstring toString(); +}; + +/** + * The rest are truly primitive and are passed by value + */ + +/** + * Scriptable storage for booleans + * + * @status FROZEN + */ + +[scriptable, uuid(ddc3b490-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRBool : nsISupportsPrimitive +{ + attribute PRBool data; + string toString(); +}; + +/** + * Scriptable storage for 8-bit integers + * + * @status FROZEN + */ + +[scriptable, uuid(dec2e4e0-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRUint8 : nsISupportsPrimitive +{ + attribute PRUint8 data; + string toString(); +}; + +/** + * Scriptable storage for unsigned 16-bit integers + * + * @status FROZEN + */ + +[scriptable, uuid(dfacb090-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRUint16 : nsISupportsPrimitive +{ + attribute PRUint16 data; + string toString(); +}; + +/** + * Scriptable storage for unsigned 32-bit integers + * + * @status FROZEN + */ + +[scriptable, uuid(e01dc470-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRUint32 : nsISupportsPrimitive +{ + attribute PRUint32 data; + string toString(); +}; + +/** + * Scriptable storage for 64-bit integers + * + * @status FROZEN + */ + +[scriptable, uuid(e13567c0-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRUint64 : nsISupportsPrimitive +{ + attribute PRUint64 data; + string toString(); +}; + +/** + * Scriptable storage for NSPR date/time values + * + * @status FROZEN + */ + +[scriptable, uuid(e2563630-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRTime : nsISupportsPrimitive +{ + attribute PRTime data; + string toString(); +}; + +/** + * Scriptable storage for single character values + * (often used to store an ASCII character) + * + * @status FROZEN + */ + +[scriptable, uuid(e2b05e40-4a1c-11d3-9890-006008962422)] +interface nsISupportsChar : nsISupportsPrimitive +{ + attribute char data; + string toString(); +}; + +/** + * Scriptable storage for 16-bit integers + * + * @status FROZEN + */ + +[scriptable, uuid(e30d94b0-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRInt16 : nsISupportsPrimitive +{ + attribute PRInt16 data; + string toString(); +}; + +/** + * Scriptable storage for 32-bit integers + * + * @status FROZEN + */ + +[scriptable, uuid(e36c5250-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRInt32 : nsISupportsPrimitive +{ + attribute PRInt32 data; + string toString(); +}; + +/** + * Scriptable storage for 64-bit integers + * + * @status FROZEN + */ + +[scriptable, uuid(e3cb0ff0-4a1c-11d3-9890-006008962422)] +interface nsISupportsPRInt64 : nsISupportsPrimitive +{ + attribute PRInt64 data; + string toString(); +}; + +/** + * Scriptable storage for floating point numbers + * + * @status FROZEN + */ + +[scriptable, uuid(abeaa390-4ac0-11d3-baea-00805f8a5dd7)] +interface nsISupportsFloat : nsISupportsPrimitive +{ + attribute float data; + string toString(); +}; + +/** + * Scriptable storage for doubles + * + * @status FROZEN + */ + +[scriptable, uuid(b32523a0-4ac0-11d3-baea-00805f8a5dd7)] +interface nsISupportsDouble : nsISupportsPrimitive +{ + attribute double data; + string toString(); +}; + +/** + * Scriptable storage for generic pointers + * + * @status FROZEN + */ + +[scriptable, uuid(464484f0-568d-11d3-baf8-00805f8a5dd7)] +interface nsISupportsVoid : nsISupportsPrimitive +{ + [noscript] attribute voidPtr data; + string toString(); +}; + +/** + * Scriptable storage for other XPCOM objects + * + * @status FROZEN + */ + +[scriptable, uuid(995ea724-1dd1-11b2-9211-c21bdd3e7ed0)] +interface nsISupportsInterfacePointer : nsISupportsPrimitive +{ + attribute nsISupports data; + attribute nsIDPtr dataIID; + + string toString(); +}; + + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsITooltipListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsITooltipListener.idl new file mode 100644 index 00000000..42cbeb7a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsITooltipListener.idl @@ -0,0 +1,78 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Mike Pinkerton <pinkerton@netscape.com> + * Adam Lock <adamlock@netscape.com> + * + * 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" + +/** + * An optional interface for embedding clients wishing to receive + * notifications for when a tooltip should be displayed or removed. + * The embedder implements this interface on the web browser chrome + * object associated with the window that notifications are required + * for. + * + * @see nsITooltipTextProvider + * + * @status FROZEN + */ +[scriptable, uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916)] +interface nsITooltipListener : nsISupports +{ + /** + * Called when a tooltip should be displayed. + * + * @param aXCoords The tooltip left edge X coordinate. + * @param aYCoords The tooltip top edge Y coordinate. + * @param aTipText The text to display in the tooltip, typically obtained + * from the TITLE attribute of the node (or containing parent) + * over which the pointer has been positioned. + * + * @note + * Coordinates are specified in pixels, relative to the top-left + * corner of the browser area. + * + * @return <code>NS_OK</code> if the tooltip was displayed. + */ + void onShowTooltip(in long aXCoords, in long aYCoords, in wstring aTipText); + + /** + * Called when the tooltip should be hidden, either because the pointer + * has moved or the tooltip has timed out. + */ + void onHideTooltip(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsITooltipTextProvider.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsITooltipTextProvider.idl new file mode 100644 index 00000000..211fddfd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsITooltipTextProvider.idl @@ -0,0 +1,78 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Adam Lock <adamlock@netscape.com> + * + * 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" + +interface nsIDOMNode; + +/** + * An interface implemented by a tooltip text provider service. This + * service is called to discover what tooltip text is associated + * with the node that the pointer is positioned over. + * + * Embedders may implement and register their own tooltip text provider + * service if they wish to provide different tooltip text. + * + * The default service returns the text stored in the TITLE + * attribute of the node or a containing parent. + * + * @note + * The tooltip text provider service is registered with the contract + * defined in NS_TOOLTIPTEXTPROVIDER_CONTRACTID. + * + * @see nsITooltipListener + * @see nsIComponentManager + * @see nsIDOMNode + * + * @status FROZEN + */ +[scriptable, uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee)] +interface nsITooltipTextProvider : nsISupports +{ + /** + * Called to obtain the tooltip text for a node. + * + * @arg aNode The node to obtain the text from. + * @arg aText The tooltip text. + * + * @return <CODE>PR_TRUE</CODE> if tooltip text is associated + * with the node and was returned in the aText argument; + * <CODE>PR_FALSE</CODE> otherwise. + */ + boolean getNodeText(in nsIDOMNode aNode, out wstring aText); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsITraceRefcnt.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsITraceRefcnt.idl new file mode 100644 index 00000000..536861a0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsITraceRefcnt.idl @@ -0,0 +1,72 @@ +/* ***** 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 XPCOM + * + * The Initial Developer of the Original Code is Doug Turner <dougt@meer.net> + * + * Portions created by the Initial Developer are Copyright (C) 2003 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +/** + * nsITraceRefcnt is an interface between XPCOM Glue and XPCOM. Users should + * access the nsITraceRefcnt interface through the static class nsTraceRefcnt. + * @see nsTraceRefcnt.h + * + * @status UNDER_REVIEW + */ + +[uuid(273dc92f-0fe6-4545-96a9-21be77828039)] +interface nsITraceRefcnt : nsISupports +{ + void logAddRef(in voidPtr aPtr, + in nsrefcnt aNewRefcnt, + in string aTypeName, + in unsigned long aInstanceSize); + + void logRelease(in voidPtr aPtr, + in nsrefcnt aNewRefcnt, + in string aTypeName); + + void logCtor(in voidPtr aPtr, + in string aTypeName, + in unsigned long aInstanceSize); + + void logDtor(in voidPtr aPtr, + in string aTypeName, + in unsigned long aInstanceSize); + + + void logAddCOMPtr(in voidPtr aPtr, in nsISupports aObject); + + void logReleaseCOMPtr(in voidPtr aPtr, in nsISupports aObject); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIURI.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIURI.idl new file mode 100644 index 00000000..6767a6f9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIURI.idl @@ -0,0 +1,232 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Gagan Saksena <gagan@netscape.com> (original author) + * Darin Fisher <darin@netscape.com> + * + * 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" + +/** + * URIs are essentially structured names for things -- anything. This interface + * provides accessors to set and query the most basic components of an URI. + * Subclasses, including nsIURL, impose greater structure on the URI. + * + * This interface follows Tim Berners-Lee's URI spec (RFC2396) [1], where the + * basic URI components are defined as such: + * + * ftp://username:password@hostname:portnumber/pathname + * \ / \ / \ / \ /\ / + * - --------------- ------ -------- ------- + * | | | | | + * | | | | Path + * | | | Port + * | | Host / + * | UserPass / + * Scheme / + * \ / + * -------------------------------- + * | + * PrePath + * + * The definition of the URI components has been extended to allow for + * internationalized domain names [2] and the more generic IRI structure [3]. + * + * [1] http://www.ietf.org/rfc/rfc2396.txt + * [2] http://www.ietf.org/internet-drafts/draft-ietf-idn-idna-06.txt + * [3] http://www.ietf.org/internet-drafts/draft-masinter-url-i18n-08.txt + */ + +%{C++ +#undef GetPort // XXX Windows! +#undef SetPort // XXX Windows! +%} + +/** + * nsIURI - interface for an uniform resource identifier w/ i18n support. + * + * AUTF8String attributes may contain unescaped UTF-8 characters. + * Consumers should be careful to escape the UTF-8 strings as necessary, but + * should always try to "display" the UTF-8 version as provided by this + * interface. + * + * AUTF8String attributes may also contain escaped characters. + * + * Unescaping URI segments is unadvised unless there is intimate + * knowledge of the underlying charset or there is no plan to display (or + * otherwise enforce a charset on) the resulting URI substring. + * + * @status FROZEN + */ +[scriptable, uuid(07a22cc0-0ce5-11d3-9331-00104ba0fd40)] +interface nsIURI : nsISupports +{ + /************************************************************************ + * The URI is broken down into the following principal components: + */ + + /** + * Returns a string representation of the URI. Setting the spec causes + * the new spec to be parsed, initializing the URI. + * + * Some characters may be escaped. + */ + attribute AUTF8String spec; + + /** + * The prePath (eg. scheme://user:password@host:port) returns the string + * before the path. This is useful for authentication or managing sessions. + * + * Some characters may be escaped. + */ + readonly attribute AUTF8String prePath; + + /** + * The Scheme is the protocol to which this URI refers. The scheme is + * restricted to the US-ASCII charset per RFC2396. + */ + attribute ACString scheme; + + /** + * The username:password (or username only if value doesn't contain a ':') + * + * Some characters may be escaped. + */ + attribute AUTF8String userPass; + + /** + * The optional username and password, assuming the preHost consists of + * username:password. + * + * Some characters may be escaped. + */ + attribute AUTF8String username; + attribute AUTF8String password; + + /** + * The host:port (or simply the host, if port == -1). + * + * Characters are NOT escaped. + */ + attribute AUTF8String hostPort; + + /** + * The host is the internet domain name to which this URI refers. It could + * be an IPv4 (or IPv6) address literal. If supported, it could be a + * non-ASCII internationalized domain name. + * + * Characters are NOT escaped. + */ + attribute AUTF8String host; + + /** + * A port value of -1 corresponds to the protocol's default port (eg. -1 + * implies port 80 for http URIs). + */ + attribute long port; + + /** + * The path, typically including at least a leading '/' (but may also be + * empty, depending on the protocol). + * + * Some characters may be escaped. + */ + attribute AUTF8String path; + + + /************************************************************************ + * An URI supports the following methods: + */ + + /** + * URI equivalence test (not a strict string comparison). + * + * eg. http://foo.com:80/ == http://foo.com/ + */ + boolean equals(in nsIURI other); + + /** + * An optimization to do scheme checks without requiring the users of nsIURI + * to GetScheme, thereby saving extra allocating and freeing. Returns true if + * the schemes match (case ignored). + */ + boolean schemeIs(in string scheme); + + /** + * Clones the current URI. For some protocols, this is more than just an + * optimization. For example, under MacOS, the spec of a file URL does not + * necessarily uniquely identify a file since two volumes could share the + * same name. + */ + nsIURI clone(); + + /** + * This method resolves a relative string into an absolute URI string, + * using this URI as the base. + * + * NOTE: some implementations may have no concept of a relative URI. + */ + AUTF8String resolve(in AUTF8String relativePath); + + + /************************************************************************ + * Additional attributes: + */ + + /** + * The URI spec with an ASCII compatible encoding. Host portion follows + * the IDNA draft spec. Other parts are URL-escaped per the rules of + * RFC2396. The result is strictly ASCII. + */ + readonly attribute ACString asciiSpec; + + /** + * The URI host with an ASCII compatible encoding. Follows the IDNA + * draft spec for converting internationalized domain names (UTF-8) to + * ASCII for compatibility with existing internet infrasture. + */ + readonly attribute ACString asciiHost; + + /** + * The charset of the document from which this URI originated. An empty + * value implies UTF-8. + * + * If this value is something other than UTF-8 then the URI components + * (e.g., spec, prePath, username, etc.) will all be fully URL-escaped. + * Otherwise, the URI components may contain unescaped multibyte UTF-8 + * characters. + */ + readonly attribute ACString originCharset; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIURIContentListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIURIContentListener.idl new file mode 100644 index 00000000..e4c7a294 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIURIContentListener.idl @@ -0,0 +1,167 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIRequest; +interface nsIStreamListener; +interface nsIURI; + +/** + * nsIURIContentListener is an interface used by components which + * want to know (and have a chance to handle) a particular content type. + * Typical usage scenarios will include running applications which register + * a nsIURIContentListener for each of its content windows with the uri + * dispatcher service. + * + * @status FROZEN + */ +[scriptable, uuid(94928AB3-8B63-11d3-989D-001083010E9B)] +interface nsIURIContentListener : nsISupports +{ + /** + * Gives the original content listener first crack at stopping a load before + * it happens. + * + * @param aURI URI that is being opened. + * + * @return <code>false</code> if the load can continue; + * <code>true</code> if the open should be aborted. + */ + boolean onStartURIOpen(in nsIURI aURI); + + /** + * Notifies the content listener to hook up an nsIStreamListener capable of + * consuming the data stream. + * + * @param aContentType Content type of the data. + * @param aIsContentPreferred Indicates whether the content should be + * preferred by this listener. + * @param aRequest Request that is providing the data. + * @param aContentHandler nsIStreamListener that will consume the data. + * This should be set to <code>nsnull</code> if + * this content listener can't handle the content + * type. + * + * @return <code>true</code> if the consumer wants to + * handle the load completely by itself. This + * causes the URI Loader do nothing else... + * <code>false</code> if the URI Loader should + * continue handling the load and call the + * returned streamlistener's methods. + */ + boolean doContent(in string aContentType, + in boolean aIsContentPreferred, + in nsIRequest aRequest, + out nsIStreamListener aContentHandler); + + /** + * When given a uri to dispatch, if the URI is specified as 'preferred + * content' then the uri loader tries to find a preferred content handler + * for the content type. The thought is that many content listeners may + * be able to handle the same content type if they have to. i.e. the mail + * content window can handle text/html just like a browser window content + * listener. However, if the user clicks on a link with text/html content, + * then the browser window should handle that content and not the mail + * window where the user may have clicked the link. This is the difference + * between isPreferred and canHandleContent. + * + * @param aContentType Content type of the data. + * @param aDesiredContentType Indicates that aContentType must be converted + * to aDesiredContentType before processing the + * data. This causes a stream converted to be + * inserted into the nsIStreamListener chain. + * This argument can be <code>nsnull</code> if + * the content should be consumed directly as + * aContentType. + * + * @return <code>true</code> if this is a preferred + * content handler for aContentType; + * <code>false<code> otherwise. + */ + boolean isPreferred(in string aContentType, out string aDesiredContentType); + + /** + * When given a uri to dispatch, if the URI is not specified as 'preferred + * content' then the uri loader calls canHandleContent to see if the content + * listener is capable of handling the content. + * + * @param aContentType Content type of the data. + * @param aIsContentPreferred Indicates whether the content should be + * preferred by this listener. + * @param aDesiredContentType Indicates that aContentType must be converted + * to aDesiredContentType before processing the + * data. This causes a stream converted to be + * inserted into the nsIStreamListener chain. + * This argument can be <code>nsnull</code> if + * the content should be consumed directly as + * aContentType. + * + * @return <code>true</code> if the data can be consumed. + * <code>false</code> otherwise. + * + * Note: I really envision canHandleContent as a method implemented + * by the docshell as the implementation is generic to all doc + * shells. The isPreferred decision is a decision made by a top level + * application content listener that sits at the top of the docshell + * hierarchy. + */ + boolean canHandleContent(in string aContentType, + in boolean aIsContentPreferred, + out string aDesiredContentType); + + /** + * The load context associated with a particular content listener. + * The URI Loader stores and accesses this value as needed. + */ + attribute nsISupports loadCookie; + + /** + * The parent content listener if this particular listener is part of a chain + * of content listeners (i.e. a docshell!) + * + * @note If this attribute is set to an object that implements + * nsISupportsWeakReference, the implementation should get the + * nsIWeakReference and hold that. Otherwise, the implementation + * should not refcount this interface; it should assume that a non + * null value is always valid. In that case, the caller is + * responsible for explicitly setting this value back to null if the + * parent content listener is destroyed. + */ + attribute nsIURIContentListener parentContentListener; +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIURL.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIURL.idl new file mode 100644 index 00000000..8c735b9d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIURL.idl @@ -0,0 +1,183 @@ +/* -*- Mode: C++; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Gagan Saksena <gagan@netscape.com> (original author) + * Darin Fisher <darin@netscape.com> + * + * 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 "nsIURI.idl" + +/** + * The nsIURL interface provides convenience methods that further + * break down the path portion of nsIURI: + * + * http://directory/fileBaseName.fileExtension?query + * http://directory/fileBaseName.fileExtension#ref + * http://directory/fileBaseName.fileExtension;param + * \ \ / + * \ ----------------------- + * \ | / + * \ fileName / + * ---------------------------- + * | + * filePath + * + * @status FROZEN + */ +[scriptable, uuid(d6116970-8034-11d3-9399-00104ba0fd40)] +interface nsIURL : nsIURI +{ + /************************************************************************* + * The URL path is broken down into the following principal components: + */ + + /** + * Returns a path including the directory and file portions of a + * URL. For example, the filePath of "http://foo/bar.html#baz" is + * "/foo/bar.html". + * + * Some characters may be escaped. + */ + attribute AUTF8String filePath; + + /** + * Returns the parameters specified after the ; in the URL. + * + * Some characters may be escaped. + */ + attribute AUTF8String param; + + /** + * Returns the query portion (the part after the "?") of the URL. + * If there isn't one, an empty string is returned. + * + * Some characters may be escaped. + */ + attribute AUTF8String query; + + /** + * Returns the reference portion (the part after the "#") of the URL. + * If there isn't one, an empty string is returned. + * + * Some characters may be escaped. + */ + attribute AUTF8String ref; + + + /************************************************************************* + * The URL filepath is broken down into the following sub-components: + */ + + /** + * Returns the directory portion of a URL. + * If the URL denotes a path to a directory and not a file, + * e.g. http://foo/bar/, then the Directory attribute accesses + * the complete /foo/bar/ portion, and the FileName is the + * empty string. If the trailing slash is omitted, then the + * Directory is /foo/ and the file is bar (i.e. this is a + * syntactic, not a semantic breakdown of the Path). + * And hence dont rely on this for something to be a definitely + * be a file. But you can get just the leading directory portion + * for sure. + * + * Some characters may be escaped. + */ + attribute AUTF8String directory; + + /** + * Returns the file name portion of a URL. + * If the URL denotes a path to a directory and not a file, + * e.g. http://foo/bar/, then the Directory attribute accesses + * the complete /foo/bar/ portion, and the FileName is the + * empty string. Note that this is purely based on searching + * for the last trailing slash. And hence dont rely on this to + * be a definite file. + * + * Some characters may be escaped. + */ + attribute AUTF8String fileName; + + + /************************************************************************* + * The URL filename is broken down even further: + */ + + /** + * Returns the file basename portion of a filename in a url. + * + * Some characters may be escaped. + */ + attribute AUTF8String fileBaseName; + + /** + * Returns the file extension portion of a filename in a url. If a file + * extension does not exist, the empty string is returned. + * + * Some characters may be escaped. + */ + attribute AUTF8String fileExtension; + + /** + * This method takes a uri and compares the two. The common uri portion + * is returned as a string. The minimum common uri portion is the + * protocol, and any of these if present: login, password, host and port + * If no commonality is found, "" is returned. If they are identical, the + * whole path with file/ref/etc. is returned. For file uris, it is + * expected that the common spec would be at least "file:///" since '/' is + * a shared common root. + * + * Examples: + * this.spec aURIToCompare.spec result + * 1) http://mozilla.org/ http://www.mozilla.org/ "" + * 2) http://foo.com/bar/ ftp://foo.com/bar/ "" + * 3) http://foo.com:8080/ http://foo.com/bar/ "" + * 4) ftp://user@foo.com/ ftp://user:pw@foo.com/ "" + * 5) ftp://foo.com/bar/ ftp://foo.com/bar ftp://foo.com/ + * 6) ftp://foo.com/bar/ ftp://foo.com/bar/b.html ftp://foo.com/bar/ + * 7) http://foo.com/a.htm#i http://foo.com/b.htm http://foo.com/ + * 8) ftp://foo.com/c.htm#i ftp://foo.com/c.htm ftp://foo.com/c.htm + * 9) file:///a/b/c.html file:///d/e/c.html file:/// + */ + AUTF8String getCommonBaseSpec(in nsIURI aURIToCompare); + + /** + * This method takes a uri and returns a substring of this if it can be + * made relative to the uri passed in. If no commonality is found, the + * entire uri spec is returned. If they are identical, "" is returned. + * Filename, query, etc are always returned except when uris are identical. + */ + AUTF8String getRelativeSpec(in nsIURI aURIToCompare); + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIUnicharStreamListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIUnicharStreamListener.idl new file mode 100644 index 00000000..79fef425 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIUnicharStreamListener.idl @@ -0,0 +1,66 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is mozilla.org. + * Portions created by the Initial Developer are Copyright (C) 2004 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@mozilla.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 ***** */ + +#include "nsIRequestObserver.idl" + +/** + * nsIUnicharStreamListener is very similar to nsIStreamListener with + * the difference being that this interface gives notifications about + * data being available after the raw data has been converted to + * UTF-16. + * + * nsIUnicharStreamListener + * + * @status FROZEN + */ +[scriptable, uuid(4a7e9b62-fef8-400d-9865-d6820f630b4c)] +interface nsIUnicharStreamListener : nsIRequestObserver +{ + /** + * Called when the next chunk of data (corresponding to the + * request) is available. + * + * @param aRequest request corresponding to the source of the data + * @param aContext user defined context + * @param aData the data chunk + * + * An exception thrown from onUnicharDataAvailable has the + * side-effect of causing the request to be canceled. + */ + void onUnicharDataAvailable(in nsIRequest aRequest, + in nsISupports aContext, in AString aData); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIUploadChannel.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIUploadChannel.idl new file mode 100644 index 00000000..14ad2ab1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIUploadChannel.idl @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +interface nsIInputStream; + +/** + * nsIUploadChannel + * + * A channel may optionally implement this interface if it supports the + * notion of uploading a data stream. The upload stream may only be set + * prior to the invocation of asyncOpen on the channel. + * + * @status FROZEN + */ +[scriptable, uuid(ddf633d8-e9a4-439d-ad88-de636fd9bb75)] +interface nsIUploadChannel : nsISupports +{ + /** + * Sets a stream to be uploaded by this channel. + * + * Most implementations of this interface require that the stream: + * (1) implement threadsafe addRef and release + * (2) implement nsIInputStream::readSegments + * (3) implement nsISeekableStream::seek + * + * History here is that we need to support both streams that already have + * headers (e.g., Content-Type and Content-Length) information prepended to + * the stream (by plugins) as well as clients (composer, uploading + * application) that want to upload data streams without any knowledge of + * protocol specifications. For this reason, we have a special meaning + * for the aContentType parameter (see below). + * + * @param aStream + * The stream to be uploaded by this channel. + * @param aContentType + * If aContentType is empty, the protocol will assume that no + * content headers are to be added to the uploaded stream and that + * any required headers are already encoded in the stream. In the + * case of HTTP, if this parameter is non-empty, then its value will + * replace any existing Content-Type header on the HTTP request. + * In the case of FTP and FILE, this parameter is ignored. + * @param aContentLength + * A value of -1 indicates that the length of the stream should be + * determined by calling the stream's |available| method. + */ + void setUploadStream(in nsIInputStream aStream, + in ACString aContentType, + in long aContentLength); + + /** + * Get the stream (to be) uploaded by this channel. + */ + readonly attribute nsIInputStream uploadStream; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWeakReference.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWeakReference.idl new file mode 100644 index 00000000..3bdf6eb8 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWeakReference.idl @@ -0,0 +1,102 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Pierre Phaneuf <pp@ludusdesign.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + + +/** + * An instance of |nsIWeakReference| is a proxy object that cooperates with + * its referent to give clients a non-owning, non-dangling reference. Clients + * own the proxy, and should generally manage it with an |nsCOMPtr| (see the + * type |nsWeakPtr| for a |typedef| name that stands out) as they would any + * other XPCOM object. The |QueryReferent| member function provides a + * (hopefully short-lived) owning reference on demand, through which clients + * can get useful access to the referent, while it still exists. + * + * @status FROZEN + * @version 1.0 + * @see nsISupportsWeakReference + * @see nsWeakReference + * @see nsWeakPtr + */ +[scriptable, uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf)] +interface nsIWeakReference : nsISupports + { + /** + * |QueryReferent| queries the referent, if it exists, and like |QueryInterface|, produces + * an owning reference to the desired interface. It is designed to look and act exactly + * like (a proxied) |QueryInterface|. Don't hold on to the produced interface permanently; + * that would defeat the purpose of using a non-owning |nsIWeakReference| in the first place. + */ + void QueryReferent( in nsIIDRef uuid, [iid_is(uuid), retval] out nsQIResult result ); + }; + + +/** + * |nsISupportsWeakReference| is a factory interface which produces appropriate + * instances of |nsIWeakReference|. Weak references in this scheme can only be + * produced for objects that implement this interface. + * + * @status FROZEN + * @version 1.0 + * @see nsIWeakReference + * @see nsSupportsWeakReference + */ +[scriptable, uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf)] +interface nsISupportsWeakReference : nsISupports + { + /** + * |GetWeakReference| produces an appropriate instance of |nsIWeakReference|. + * As with all good XPCOM `getters', you own the resulting interface and should + * manage it with an |nsCOMPtr|. + * + * @see nsIWeakReference + * @see nsWeakPtr + * @see nsCOMPtr + */ + nsIWeakReference GetWeakReference(); + }; + + +%{C++ +#ifdef MOZILLA_INTERNAL_API +#include "nsIWeakReferenceUtils.h" +#endif +%} + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowser.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowser.idl new file mode 100644 index 00000000..b3a4dd2d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowser.idl @@ -0,0 +1,170 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Travis Bogard <travis@netscape.com> + * + * 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" + +interface nsIInterfaceRequestor; +interface nsIWebBrowserChrome; +interface nsIURIContentListener; +interface nsIDOMWindow; +interface nsIWeakReference; + +/** + * The nsIWebBrowser interface is implemented by web browser objects. + * Embedders use this interface during initialisation to associate + * the new web browser instance with the embedders chrome and + * to register any listeners. The interface may also be used at runtime + * to obtain the content DOM window and from that the rest of the DOM. + * + * @status FROZEN + */ +[scriptable, uuid(69E5DF00-7B8B-11d3-AF61-00A024FFC08C)] +interface nsIWebBrowser : nsISupports +{ + /** + * Registers a listener of the type specified by the iid to receive + * callbacks. The browser stores a weak reference to the listener + * to avoid any circular dependencies. + * Typically this method will be called to register an object + * to receive <CODE>nsIWebProgressListener</CODE> or + * <CODE>nsISHistoryListener</CODE> notifications in which case the + * the IID is that of the interface. + * + * @param aListener The listener to be added. + * @param aIID The IID of the interface that will be called + * on the listener as appropriate. + * @return <CODE>NS_OK</CODE> for successful registration; + * <CODE>NS_ERROR_INVALID_ARG</CODE> if aIID is not + * supposed to be registered using this method; + * <CODE>NS_ERROR_FAILURE</CODE> either aListener did not + * expose the interface specified by the IID, or some + * other internal error occurred. + * + * @see removeWebBrowserListener + * @see nsIWeakReference + * @see nsIWebProgressListener + * @see nsISHistoryListener + * + * @return <CODE>NS_OK</CODE>, listener was successfully added; + * <CODE>NS_ERROR_INVALID_ARG</CODE>, one of the arguments was + * invalid or the object did not implement the interface + * specified by the IID. + */ + void addWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID); + + /** + * Removes a previously registered listener. + * + * @param aListener The listener to be removed. + * @param aIID The IID of the interface on the listener that will + * no longer be called. + * + * @return <CODE>NS_OK</CODE>, listener was successfully removed; + * <CODE>NS_ERROR_INVALID_ARG</CODE> arguments was invalid or + * the object did not implement the interface specified by the IID. + * + * @see addWebBrowserListener + * @see nsIWeakReference + */ + void removeWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID); + + /** + * The chrome object associated with the browser instance. The embedder + * must create one chrome object for <I>each</I> browser object + * that is instantiated. The embedder must associate the two by setting + * this property to point to the chrome object before creating the browser + * window via the browser's <CODE>nsIBaseWindow</CODE> interface. + * + * The chrome object must also implement <CODE>nsIEmbeddingSiteWindow</CODE>. + * + * The chrome may optionally implement <CODE>nsIInterfaceRequestor</CODE>, + * <CODE>nsIWebBrowserChromeFocus</CODE>, + * <CODE>nsIContextMenuListener</CODE> and + * <CODE>nsITooltipListener</CODE> to receive additional notifications + * from the browser object. + * + * The chrome object may optionally implement <CODE>nsIWebProgressListener</CODE> + * instead of explicitly calling <CODE>addWebBrowserListener</CODE> and + * <CODE>removeWebBrowserListener</CODE> to register a progress listener + * object. If the implementation does this, it must also implement + * <CODE>nsIWeakReference</CODE>. + * + * @note The implementation should not refcount the supplied chrome + * object; it should assume that a non <CODE>nsnull</CODE> value is + * always valid. The embedder must explicitly set this value back + * to nsnull if the chrome object is destroyed before the browser + * object. + * + * @see nsIBaseWindow + * @see nsIWebBrowserChrome + * @see nsIEmbeddingSiteWindow + * @see nsIInterfaceRequestor + * @see nsIWebBrowserChromeFocus + * @see nsIContextMenuListener + * @see nsITooltipListener + * @see nsIWeakReference + * @see nsIWebProgressListener + */ + attribute nsIWebBrowserChrome containerWindow; + + /** + * URI content listener parent. The embedder may set this property to + * their own implementation if they intend to override or prevent + * how certain kinds of content are loaded. + * + * @note If this attribute is set to an object that implements + * nsISupportsWeakReference, the implementation should get the + * nsIWeakReference and hold that. Otherwise, the implementation + * should not refcount this interface; it should assume that a non + * null value is always valid. In that case, the embedder should + * explicitly set this value back to null if the parent content + * listener is destroyed before the browser object. + * + * @see nsIURIContentListener + */ + attribute nsIURIContentListener parentURIContentListener; + + /** + * The top-level DOM window. The embedder may walk the entire + * DOM starting from this value. + * + * @see nsIDOMWindow + */ + readonly attribute nsIDOMWindow contentDOMWindow; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserChrome.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserChrome.idl new file mode 100644 index 00000000..e4d45053 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserChrome.idl @@ -0,0 +1,154 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Travis Bogard <travis@netscape.com> + * + * 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" + +interface nsIWebBrowser; +interface nsIDocShellTreeItem; + +/** + * nsIWebBrowserChrome corresponds to the top-level, outermost window + * containing an embedded Gecko web browser. + * + * @status FROZEN + */ + +[scriptable, uuid(BA434C60-9D52-11d3-AFB0-00A024FFC08C)] +interface nsIWebBrowserChrome : nsISupports +{ + const unsigned long STATUS_SCRIPT = 0x00000001; + const unsigned long STATUS_SCRIPT_DEFAULT = 0x00000002; + const unsigned long STATUS_LINK = 0x00000003; + + /** + * Called when the status text in the chrome needs to be updated. + * @param statusType indicates what is setting the text + * @param status status string. null is an acceptable value meaning + * no status. + */ + void setStatus(in unsigned long statusType, in wstring status); + + /** + * The currently loaded WebBrowser. The browser chrome may be + * told to set the WebBrowser object to a new object by setting this + * attribute. In this case the implementer is responsible for taking the + * new WebBrowser object and doing any necessary initialization or setup + * as if it had created the WebBrowser itself. This includes positioning + * setting up listeners etc. + */ + attribute nsIWebBrowser webBrowser; + + /** + * Definitions for the chrome flags + */ + const unsigned long CHROME_DEFAULT = 0x00000001; + const unsigned long CHROME_WINDOW_BORDERS = 0x00000002; + const unsigned long CHROME_WINDOW_CLOSE = 0x00000004; + const unsigned long CHROME_WINDOW_RESIZE = 0x00000008; + const unsigned long CHROME_MENUBAR = 0x00000010; + const unsigned long CHROME_TOOLBAR = 0x00000020; + const unsigned long CHROME_LOCATIONBAR = 0x00000040; + const unsigned long CHROME_STATUSBAR = 0x00000080; + const unsigned long CHROME_PERSONAL_TOOLBAR = 0x00000100; + const unsigned long CHROME_SCROLLBARS = 0x00000200; + const unsigned long CHROME_TITLEBAR = 0x00000400; + const unsigned long CHROME_EXTRA = 0x00000800; + + // createBrowserWindow specific flags + const unsigned long CHROME_WITH_SIZE = 0x00001000; + const unsigned long CHROME_WITH_POSITION = 0x00002000; + + // special cases + const unsigned long CHROME_WINDOW_MIN = 0x00004000; + const unsigned long CHROME_WINDOW_POPUP = 0x00008000; + + const unsigned long CHROME_WINDOW_RAISED = 0x02000000; + const unsigned long CHROME_WINDOW_LOWERED = 0x04000000; + const unsigned long CHROME_CENTER_SCREEN = 0x08000000; + const unsigned long CHROME_DEPENDENT = 0x10000000; + // Note: The modal style bit just affects the way the window looks and does + // mean it's actually modal. + const unsigned long CHROME_MODAL = 0x20000000; + const unsigned long CHROME_OPENAS_DIALOG = 0x40000000; + const unsigned long CHROME_OPENAS_CHROME = 0x80000000; + + const unsigned long CHROME_ALL = 0x00000ffe; + + /** + * The chrome flags for this browser chrome. The implementation should + * reflect the value of this attribute by hiding or showing its chrome + * appropriately. + */ + attribute unsigned long chromeFlags; + + /** + * Asks the implementer to destroy the window associated with this + * WebBrowser object. + */ + void destroyBrowserWindow(); + + /** + * Tells the chrome to size itself such that the browser will be the + * specified size. + * @param aCX new width of the browser + * @param aCY new height of the browser + */ + void sizeBrowserTo(in long aCX, in long aCY); + + /** + * Shows the window as a modal window. + * @return (the function error code) the status value specified by + * in exitModalEventLoop. + */ + void showAsModal(); + + /** + * Is the window modal (that is, currently executing a modal loop)? + * @return true if it's a modal window + */ + boolean isWindowModal(); + + /** + * Exit a modal event loop if we're in one. The implementation + * should also exit out of the loop if the window is destroyed. + * @param aStatus - the result code to return from showAsModal + */ + void exitModalEventLoop(in nsresult aStatus); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserChromeFocus.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserChromeFocus.idl new file mode 100644 index 00000000..793ba9f5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserChromeFocus.idl @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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 the Mozilla browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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" + +/** + * The nsIWebBrowserChromeFocus is implemented by the same object as the + * nsIEmbeddingSiteWindow. It represents the focus up-calls from mozilla + * to the embedding chrome. See mozilla bug #70224 for gratuitous info. + * + * @status FROZEN + */ + +[scriptable, uuid(d2206418-1dd1-11b2-8e55-acddcd2bcfb8)] +interface nsIWebBrowserChromeFocus : nsISupports +{ + /** + * Set the focus at the next focusable element in the chrome. + */ + + void focusNextElement(); + + /** + * Set the focus at the previous focusable element in the chrome. + */ + + void focusPrevElement(); + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserFind.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserFind.idl new file mode 100644 index 00000000..fc701271 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserFind.idl @@ -0,0 +1,181 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Conrad Carlen <ccarlen@netscape.com> + * Simon Fraser <sfraser@netscape.com> + * + * 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 "domstubs.idl" + +/* THIS IS A PUBLIC EMBEDDING API */ + + +/** + * nsIWebBrowserFind + * + * Searches for text in a web browser. + * + * Get one by doing a GetInterface on an nsIWebBrowser. + * + * By default, the implementation will search the focussed frame, or + * if there is no focussed frame, the web browser content area. It + * does not by default search subframes or iframes. To change this + * behaviour, and to explicitly set the frame to search, + * QueryInterface to nsIWebBrowserFindInFrames. + * + * @status FROZEN + */ + +[scriptable, uuid(2f977d44-5485-11d4-87e2-0010a4e75ef2)] +interface nsIWebBrowserFind : nsISupports +{ + /** + * findNext + * + * Finds, highlights, and scrolls into view the next occurrence of the + * search string, using the current search settings. Fails if the + * search string is empty. + * + * @return Whether an occurrence was found + */ + boolean findNext(); + + /** + * searchString + * + * The string to search for. This must be non-empty to search. + */ + attribute wstring searchString; + + /** + * findBackwards + * + * Whether to find backwards (towards the beginning of the document). + * Default is false (search forward). + */ + attribute boolean findBackwards; + + /** + * wrapFind + * + * Whether the search wraps around to the start (or end) of the document + * if no match was found between the current position and the end (or + * beginning). Works correctly when searching backwards. Default is + * false. + */ + attribute boolean wrapFind; + + /** + * entireWord + * + * Whether to match entire words only. Default is false. + */ + attribute boolean entireWord; + + /** + * matchCase + * + * Whether to match case (case sensitive) when searching. Default is false. + */ + attribute boolean matchCase; + + /** + * searchFrames + * + * Whether to search through all frames in the content area. Default is true. + * + * Note that you can control whether the search propagates into child or + * parent frames explicitly using nsIWebBrowserFindInFrames, but if one, + * but not both, of searchSubframes and searchParentFrames are set, this + * returns false. + */ + attribute boolean searchFrames; +}; + + + +/** + * nsIWebBrowserFindInFrames + * + * Controls how find behaves when multiple frames or iframes are present. + * + * Get by doing a QueryInterface from nsIWebBrowserFind. + * + * @status FROZEN + */ + +[scriptable, uuid(e0f5d182-34bc-11d5-be5b-b760676c6ebc)] +interface nsIWebBrowserFindInFrames : nsISupports +{ + /** + * currentSearchFrame + * + * Frame at which to start the search. Once the search is done, this will + * be set to be the last frame searched, whether or not a result was found. + * Has to be equal to or contained within the rootSearchFrame. + */ + attribute nsIDOMWindow currentSearchFrame; + + /** + * rootSearchFrame + * + * Frame within which to confine the search (normally the content area frame). + * Set this to only search a subtree of the frame hierarchy. + */ + attribute nsIDOMWindow rootSearchFrame; + + /** + * searchSubframes + * + * Whether to recurse down into subframes while searching. Default is true. + * + * Setting nsIWebBrowserfind.searchFrames to true sets this to true. + */ + attribute boolean searchSubframes; + + /** + * searchParentFrames + * + * Whether to allow the search to propagate out of the currentSearchFrame into its + * parent frame(s). Search is always confined within the rootSearchFrame. Default + * is true. + * + * Setting nsIWebBrowserfind.searchFrames to true sets this to true. + */ + attribute boolean searchParentFrames; + +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserFocus.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserFocus.idl new file mode 100644 index 00000000..322a8210 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserFocus.idl @@ -0,0 +1,112 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Chris Saari <saari@netscape.com> + * Dan Rosen <dr@netscape.com> + * + * 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 ***** */ + +interface nsIDOMWindow; +interface nsIDOMElement; + +#include "nsISupports.idl" + +/** + * nsIWebBrowserFocus + * Interface that embedders use for controlling and interacting + * with the browser focus management. The embedded browser can be focused by + * clicking in it or tabbing into it. If the browser is currently focused and + * the embedding application's top level window is disabled, deactivate() must + * be called, and activate() called again when the top level window is + * reactivated for the browser's focus memory to work correctly. + * + * @status FROZEN + */ + +[scriptable, uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a)] +interface nsIWebBrowserFocus : nsISupports +{ + /** + * MANDATORY + * activate() is a mandatory call that must be made to the browser + * when the embedding application's window is activated *and* the + * browser area was the last thing in focus. This method can also be called + * if the embedding application wishes to give the browser area focus, + * without affecting the currently focused element within the browser. + * + * @note + * If you fail to make this call, mozilla focus memory will not work + * correctly. + */ + void activate(); + + /** + * MANDATORY + * deactivate() is a mandatory call that must be made to the browser + * when the embedding application's window is deactivated *and* the + * browser area was the last thing in focus. On non-windows platforms, + * deactivate() should also be called when focus moves from the browser + * to the embedding chrome. + * + * @note + * If you fail to make this call, mozilla focus memory will not work + * correctly. + */ + void deactivate(); + + /** + * Give the first element focus within mozilla + * (i.e. TAB was pressed and focus should enter mozilla) + */ + void setFocusAtFirstElement(); + + /** + * Give the last element focus within mozilla + * (i.e. SHIFT-TAB was pressed and focus should enter mozilla) + */ + void setFocusAtLastElement(); + + /** + * The currently focused nsDOMWindow when the browser is active, + * or the last focused nsDOMWindow when the browser is inactive. + */ + attribute nsIDOMWindow focusedWindow; + + /** + * The currently focused nsDOMElement when the browser is active, + * or the last focused nsDOMElement when the browser is inactive. + */ + attribute nsIDOMElement focusedElement; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserPrint.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserPrint.idl new file mode 100644 index 00000000..587a6db0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserPrint.idl @@ -0,0 +1,188 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Don Cone <dcone@netscape.com> + * Rod Spears <rods@netscape.com> + * + * 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" + +interface nsIDOMWindow; +interface nsIPrintSettings; +interface nsIWebProgressListener; + +/** + * nsIWebBrowserPrint corresponds to the main interface + * for printing an embedded Gecko web browser window/document + * + * @status FROZEN + */ +[scriptable, uuid(9A7CA4B0-FBBA-11d4-A869-00105A183419)] +interface nsIWebBrowserPrint : nsISupports +{ + /** + * PrintPreview Navigation Constants + */ + const short PRINTPREVIEW_GOTO_PAGENUM = 0; + const short PRINTPREVIEW_PREV_PAGE = 1; + const short PRINTPREVIEW_NEXT_PAGE = 2; + const short PRINTPREVIEW_HOME = 3; + const short PRINTPREVIEW_END = 4; + + /** + * Returns a "global" PrintSettings object + * Creates a new the first time, if one doesn't exist. + * + * Then returns the same object each time after that. + * + * Initializes the globalPrintSettings from the default printer + */ + readonly attribute nsIPrintSettings globalPrintSettings; + + /** + * Returns a pointer to the PrintSettings object that + * that was passed into either "print" or "print preview" + * + * This enables any consumers of the interface to have access + * to the "current" PrintSetting at later points in the execution + */ + readonly attribute nsIPrintSettings currentPrintSettings; + + /** + * Returns a pointer to the current child DOMWindow + * that is being print previewed. (FrameSet Frames) + * + * Returns null if parent document is not a frameset or the entire FrameSet + * document is being print previewed + * + * This enables any consumers of the interface to have access + * to the "current" child DOMWindow at later points in the execution + */ + readonly attribute nsIDOMWindow currentChildDOMWindow; + + /** + * Returns whether it is in Print mode + */ + readonly attribute boolean doingPrint; + + /** + * Returns whether it is in Print Preview mode + */ + readonly attribute boolean doingPrintPreview; + + /** + * This returns whether the current document is a frameset document + */ + readonly attribute boolean isFramesetDocument; + + /** + * This returns whether the current document is a frameset document + */ + readonly attribute boolean isFramesetFrameSelected; + + /** + * This returns whether there is an IFrame selected + */ + readonly attribute boolean isIFrameSelected; + + /** + * This returns whether there is a "range" selection + */ + readonly attribute boolean isRangeSelection; + + /** + * This returns the total number of pages for the Print Preview + */ + readonly attribute long printPreviewNumPages; + + /** + * Print the specified DOM window + * + * @param aThePrintSettings - Printer Settings for the print job, if aThePrintSettings is null + * then the global PS will be used. + * @param aWPListener - is updated during the print + * @return void + */ + void print(in nsIPrintSettings aThePrintSettings, + in nsIWebProgressListener aWPListener); + + /** + * Print Preview the specified DOM window + * + * @param aThePrintSettings - Printer Settings for the print preview, if aThePrintSettings is null + * then the global PS will be used. + * @param aChildDOMWin - DOM Window of the child document to be PP (FrameSet frames) + * @param aWPListener - is updated during the printpreview + * @return void + */ + void printPreview(in nsIPrintSettings aThePrintSettings, + in nsIDOMWindow aChildDOMWin, + in nsIWebProgressListener aWPListener); + + /** + * Print Preview - Navigates within the window + * + * @param aNavType - navigation enum + * @param aPageNum - page num to navigate to when aNavType = ePrintPreviewGoToPageNum + * @return void + */ + void printPreviewNavigate(in short aNavType, in long aPageNum); + + /** + * Cancels the current print + * @return void + */ + void cancel(); + + /** + * Returns an array of the names of all documents names (Title or URL) + * and sub-documents. This will return a single item if the attr "isFramesetDocument" is false + * and may return any number of items is "isFramesetDocument" is true + * + * @param aCount - returns number of printers returned + * @param aResult - returns array of names + * @return void + */ + void enumerateDocumentNames(out PRUint32 aCount,[retval, array, size_is(aCount)] out wstring aResult); + + /** + * This exists PrintPreview mode and returns browser window to galley mode + * @return void + */ + void exitPrintPreview(); + +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserSetup.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserSetup.idl new file mode 100644 index 00000000..6785540d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserSetup.idl @@ -0,0 +1,133 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Travis Bogard <travis@netscape.com> + * + * 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" + +/** + * The nsIWebBrowserSetup interface allows certain properties of a new browser + * object to set before the browser window is opened. + * + * @note Unless stated otherwise, settings are presumed to be enabled by + * default. + * + * @status FROZEN + */ +[scriptable, uuid(F15398A0-8018-11d3-AF70-00A024FFC08C)] +interface nsIWebBrowserSetup : nsISupports +{ + /** + * Boolean. Enables/disables plugin support for this browser. + * + * @see setProperty + */ + const unsigned long SETUP_ALLOW_PLUGINS = 1; + + /** + * Boolean. Enables/disables Javascript support for this browser. + * + * @see setProperty + */ + const unsigned long SETUP_ALLOW_JAVASCRIPT = 2; + + /** + * Boolean. Enables/disables meta redirect support for this browser. + * Meta redirect timers will be ignored if this option is disabled. + * + * @see setProperty + */ + const unsigned long SETUP_ALLOW_META_REDIRECTS = 3; + + /** + * Boolean. Enables/disables subframes within the browser + * + * @see setProperty + */ + const unsigned long SETUP_ALLOW_SUBFRAMES = 4; + + /** + * Boolean. Enables/disables image loading for this browser + * window. If you disable the images, load a page, then enable the images, + * the page will *not* automatically load the images for the previously + * loaded page. This flag controls the state of a webBrowser at load time + * and does not automatically re-load a page when the state is toggled. + * Reloading must be done by hand, or by walking through the DOM tree and + * re-setting the src attributes. + * + * @see setProperty + */ + const unsigned long SETUP_ALLOW_IMAGES = 5; + + /** + * Boolean. Enables/disables whether the document as a whole gets focus before + * traversing the document's content, or after traversing its content. + * + * NOTE: this property is obsolete and now has no effect + * + * @see setProperty + */ + const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6; + + /** + * Boolean. Enables/disables the use of global history in the browser. Visited + * URLs will not be recorded in the global history when it is disabled. + * + * @see setProperty + */ + const unsigned long SETUP_USE_GLOBAL_HISTORY = 256; + + /** + * Boolean. A value of PR_TRUE makes the browser a chrome wrapper. + * Default is PR_FALSE. + * + * @since mozilla1.0 + * + * @see setProperty + */ + const unsigned long SETUP_IS_CHROME_WRAPPER = 7; + + /** + * Sets an integer or boolean property on the new web browser object. + * Only PR_TRUE and PR_FALSE are legal boolean values. + * + * @param aId The identifier of the property to be set. + * @param aValue The value of the property. + */ + void setProperty(in unsigned long aId, in unsigned long aValue); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserStream.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserStream.idl new file mode 100644 index 00000000..c82c88f7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebBrowserStream.idl @@ -0,0 +1,91 @@ +/* -*- Mode: C; tab-width: 2; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2001, 2002 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Marco Pesenti Gritti <marco@gnome.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 ***** */ + +#include "nsISupports.idl" + +interface nsIURI; + +/** + * This interface provides a way to stream data to the web browser. This allows + * loading of data from sources which can not be accessed using URIs and + * nsIWebNavigation. + * + * @status FROZEN + */ +[scriptable, uuid(86d02f0e-219b-4cfc-9c88-bd98d2cce0b8)] +interface nsIWebBrowserStream : nsISupports +{ + /** + * Prepare to load a stream of data. When this function returns successfully, + * it must be paired by a call to closeStream. + * + * @param aBaseURI + * The base URI of the data. Must not be null. Relative + * URIs will be resolved relative to this URI. + * @param aContentType + * ASCII string giving the content type of the data. If rendering + * content of this type is not supported, this method fails. + * This string may include a charset declaration, for example: + * text/html;charset=ISO-8859-1 + * + * @throw NS_ERROR_NOT_AVAILABLE + * The requested content type is not supported. + * @throw NS_ERROR_IN_PROGRESS + * openStream was called twice without an intermediate closeStream. + */ + void openStream(in nsIURI aBaseURI, in ACString aContentType); + + /** + * Append data to this stream. + * @param aData The data to append + * @param aLen Length of the data to append. + * + * @note To append more than 4 GB of data, call this method multiple times. + */ + void appendToStream([const, array, size_is(aLen)] in octet aData, + in unsigned long aLen); + + /** + * Notifies the browser that all the data has been appended. This may notify + * the user that the browser is "done loading" in some form. + * + * @throw NS_ERROR_UNEXPECTED + * This method was called without a preceding openStream. + */ + void closeStream(); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebProgress.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebProgress.idl new file mode 100644 index 00000000..de39ac32 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebProgress.idl @@ -0,0 +1,172 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Travis Bogard <travis@netscape.com> + * Darin Fisher <darin@meer.net> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIDOMWindow; +interface nsIWebProgressListener; + +/** + * The nsIWebProgress interface is used to add or remove nsIWebProgressListener + * instances to observe the loading of asynchronous requests (usually in the + * context of a DOM window). + * + * nsIWebProgress instances may be arranged in a parent-child configuration, + * corresponding to the parent-child configuration of their respective DOM + * windows. However, in some cases a nsIWebProgress instance may not have an + * associated DOM window. The parent-child relationship of nsIWebProgress + * instances is not made explicit by this interface, but the relationship may + * exist in some implementations. + * + * A nsIWebProgressListener instance receives notifications for the + * nsIWebProgress instance to which it added itself, and it may also receive + * notifications from any nsIWebProgress instances that are children of that + * nsIWebProgress instance. + * + * @status FROZEN + */ +[scriptable, uuid(570F39D0-EFD0-11d3-B093-00A024FFC08C)] +interface nsIWebProgress : nsISupports +{ + /** + * The following flags may be combined to form the aNotifyMask parameter for + * the addProgressListener method. They limit the set of events that are + * delivered to an nsIWebProgressListener instance. + */ + + /** + * These flags indicate the state transistions to observe, corresponding to + * nsIWebProgressListener::onStateChange. + * + * NOTIFY_STATE_REQUEST + * Only receive the onStateChange event if the aStateFlags parameter + * includes nsIWebProgressListener::STATE_IS_REQUEST. + * + * NOTIFY_STATE_DOCUMENT + * Only receive the onStateChange event if the aStateFlags parameter + * includes nsIWebProgressListener::STATE_IS_DOCUMENT. + * + * NOTIFY_STATE_NETWORK + * Only receive the onStateChange event if the aStateFlags parameter + * includes nsIWebProgressListener::STATE_IS_NETWORK. + * + * NOTIFY_STATE_WINDOW + * Only receive the onStateChange event if the aStateFlags parameter + * includes nsIWebProgressListener::STATE_IS_WINDOW. + * + * NOTIFY_STATE_ALL + * Receive all onStateChange events. + */ + const unsigned long NOTIFY_STATE_REQUEST = 0x00000001; + const unsigned long NOTIFY_STATE_DOCUMENT = 0x00000002; + const unsigned long NOTIFY_STATE_NETWORK = 0x00000004; + const unsigned long NOTIFY_STATE_WINDOW = 0x00000008; + const unsigned long NOTIFY_STATE_ALL = 0x0000000f; + + /** + * These flags indicate the other events to observe, corresponding to the + * other four methods defined on nsIWebProgressListener. + * + * NOTIFY_PROGRESS + * Receive onProgressChange events. + * + * NOTIFY_STATUS + * Receive onStatusChange events. + * + * NOTIFY_SECURITY + * Receive onSecurityChange events. + * + * NOTIFY_LOCATION + * Receive onLocationChange events. + */ + const unsigned long NOTIFY_PROGRESS = 0x00000010; + const unsigned long NOTIFY_STATUS = 0x00000020; + const unsigned long NOTIFY_SECURITY = 0x00000040; + const unsigned long NOTIFY_LOCATION = 0x00000080; + + /** + * This flag enables all notifications. + */ + const unsigned long NOTIFY_ALL = 0x000000ff; + + /** + * Registers a listener to receive web progress events. + * + * @param aListener + * The listener interface to be called when a progress event occurs. + * This object must also implement nsISupportsWeakReference. + * @param aNotifyMask + * The types of notifications to receive. + * + * @throw NS_ERROR_INVALID_ARG + * Indicates that aListener was either null or that it does not + * support weak references. + * @throw NS_ERROR_FAILURE + * Indicates that aListener was already registered. + */ + void addProgressListener(in nsIWebProgressListener aListener, + in unsigned long aNotifyMask); + + /** + * Removes a previously registered listener of progress events. + * + * @param aListener + * The listener interface previously registered with a call to + * addProgressListener. + * + * @throw NS_ERROR_FAILURE + * Indicates that aListener was not registered. + */ + void removeProgressListener(in nsIWebProgressListener aListener); + + /** + * The DOM window associated with this nsIWebProgress instance. + * + * @throw NS_ERROR_FAILURE + * Indicates that there is no associated DOM window. + */ + readonly attribute nsIDOMWindow DOMWindow; + + /** + * Indicates whether or not a document is currently being loaded + * in the context of this nsIWebProgress instance. + */ + readonly attribute PRBool isLoadingDocument; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebProgressListener.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebProgressListener.idl new file mode 100644 index 00000000..169ae7d1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWebProgressListener.idl @@ -0,0 +1,357 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Travis Bogard <travis@netscape.com> + * Darin Fisher <darin@meer.net> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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" + +interface nsIWebProgress; +interface nsIRequest; +interface nsIURI; + +/** + * The nsIWebProgressListener interface is implemented by clients wishing to + * listen in on the progress associated with the loading of asynchronous + * requests in the context of a nsIWebProgress instance as well as any child + * nsIWebProgress instances. nsIWebProgress.idl describes the parent-child + * relationship of nsIWebProgress instances. + * + * @status FROZEN + */ +[scriptable, uuid(570F39D1-EFD0-11d3-B093-00A024FFC08C)] +interface nsIWebProgressListener : nsISupports +{ + /** + * State Transition Flags + * + * These flags indicate the various states that requests may transition + * through as they are being loaded. These flags are mutually exclusive. + * + * For any given request, onStateChange is called once with the STATE_START + * flag, zero or more times with the STATE_TRANSFERRING flag or once with the + * STATE_REDIRECTING flag, and then finally once with the STATE_STOP flag. + * NOTE: For document requests, a second STATE_STOP is generated (see the + * description of STATE_IS_WINDOW for more details). + * + * STATE_START + * This flag indicates the start of a request. This flag is set when a + * request is initiated. The request is complete when onStateChange is + * called for the same request with the STATE_STOP flag set. + * + * STATE_REDIRECTING + * This flag indicates that a request is being redirected. The request + * passed to onStateChange is the request that is being redirected. When a + * redirect occurs, a new request is generated automatically to process the + * new request. Expect a corresponding STATE_START event for the new + * request, and a STATE_STOP for the redirected request. + * + * STATE_TRANSFERRING + * This flag indicates that data for a request is being transferred to an + * end consumer. This flag indicates that the request has been targeted, + * and that the user may start seeing content corresponding to the request. + * + * STATE_NEGOTIATING + * This flag is not used. + * + * STATE_STOP + * This flag indicates the completion of a request. The aStatus parameter + * to onStateChange indicates the final status of the request. + */ + const unsigned long STATE_START = 0x00000001; + const unsigned long STATE_REDIRECTING = 0x00000002; + const unsigned long STATE_TRANSFERRING = 0x00000004; + const unsigned long STATE_NEGOTIATING = 0x00000008; + const unsigned long STATE_STOP = 0x00000010; + + + /** + * State Type Flags + * + * These flags further describe the entity for which the state transition is + * occuring. These flags are NOT mutually exclusive (i.e., an onStateChange + * event may indicate some combination of these flags). + * + * STATE_IS_REQUEST + * This flag indicates that the state transition is for a request, which + * includes but is not limited to document requests. (See below for a + * description of document requests.) Other types of requests, such as + * requests for inline content (e.g., images and stylesheets) are + * considered normal requests. + * + * STATE_IS_DOCUMENT + * This flag indicates that the state transition is for a document request. + * This flag is set in addition to STATE_IS_REQUEST. A document request + * supports the nsIChannel interface and its loadFlags attribute includes + * the nsIChannel::LOAD_DOCUMENT_URI flag. + * + * A document request does not complete until all requests associated with + * the loading of its corresponding document have completed. This includes + * other document requests (e.g., corresponding to HTML <iframe> elements). + * The document corresponding to a document request is available via the + * DOMWindow attribute of onStateChange's aWebProgress parameter. + * + * STATE_IS_NETWORK + * This flag indicates that the state transition corresponds to the start + * or stop of activity in the indicated nsIWebProgress instance. This flag + * is accompanied by either STATE_START or STATE_STOP, and it may be + * combined with other State Type Flags. + * + * Unlike STATE_IS_WINDOW, this flag is only set when activity within the + * nsIWebProgress instance being observed starts or stops. If activity + * only occurs in a child nsIWebProgress instance, then this flag will be + * set to indicate the start and stop of that activity. + * + * For example, in the case of navigation within a single frame of a HTML + * frameset, a nsIWebProgressListener instance attached to the + * nsIWebProgress of the frameset window will receive onStateChange calls + * with the STATE_IS_NETWORK flag set to indicate the start and stop of + * said navigation. In other words, an observer of an outer window can + * determine when activity, that may be constrained to a child window or + * set of child windows, starts and stops. + * + * STATE_IS_WINDOW + * This flag indicates that the state transition corresponds to the start + * or stop of activity in the indicated nsIWebProgress instance. This flag + * is accompanied by either STATE_START or STATE_STOP, and it may be + * combined with other State Type Flags. + * + * This flag is similar to STATE_IS_DOCUMENT. However, when a document + * request completes, two onStateChange calls with STATE_STOP are + * generated. The document request is passed as aRequest to both calls. + * The first has STATE_IS_REQUEST and STATE_IS_DOCUMENT set, and the second + * has the STATE_IS_WINDOW flag set (and possibly the STATE_IS_NETWORK flag + * set as well -- see above for a description of when the STATE_IS_NETWORK + * flag may be set). This second STATE_STOP event may be useful as a way + * to partition the work that occurs when a document request completes. + */ + const unsigned long STATE_IS_REQUEST = 0x00010000; + const unsigned long STATE_IS_DOCUMENT = 0x00020000; + const unsigned long STATE_IS_NETWORK = 0x00040000; + const unsigned long STATE_IS_WINDOW = 0x00080000; + + + /** + * State Modifier Flags + * + * These flags further describe the transition which is occuring. These + * flags are NOT mutually exclusive (i.e., an onStateChange event may + * indicate some combination of these flags). + * + * STATE_RESTORING + * This flag indicates that the state transition corresponds to the start + * or stop of activity for restoring a previously-rendered presentation. + * As such, there is no actual network activity associated with this + * request, and any modifications made to the document or presentation + * when it was originally loaded will still be present. + */ + const unsigned long STATE_RESTORING = 0x01000000; + + /** + * State Security Flags + * + * These flags describe the security state reported by a call to the + * onSecurityChange method. These flags are mutually exclusive. + * + * STATE_IS_INSECURE + * This flag indicates that the data corresponding to the request + * was received over an insecure channel. + * + * STATE_IS_BROKEN + * This flag indicates an unknown security state. This may mean that the + * request is being loaded as part of a page in which some content was + * received over an insecure channel. + * + * STATE_IS_SECURE + * This flag indicates that the data corresponding to the request was + * received over a secure channel. The degree of security is expressed by + * STATE_SECURE_HIGH, STATE_SECURE_MED, or STATE_SECURE_LOW. + */ + const unsigned long STATE_IS_INSECURE = 0x00000004; + const unsigned long STATE_IS_BROKEN = 0x00000001; + const unsigned long STATE_IS_SECURE = 0x00000002; + + /** + * Security Strength Flags + * + * These flags describe the security strength and accompany STATE_IS_SECURE + * in a call to the onSecurityChange method. These flags are mutually + * exclusive. + * + * These flags are not meant to provide a precise description of data + * transfer security. These are instead intended as a rough indicator that + * may be used to, for example, color code a security indicator or otherwise + * provide basic data transfer security feedback to the user. + * + * STATE_SECURE_HIGH + * This flag indicates a high degree of security. + * + * STATE_SECURE_MED + * This flag indicates a medium degree of security. + * + * STATE_SECURE_LOW + * This flag indicates a low degree of security. + */ + const unsigned long STATE_SECURE_HIGH = 0x00040000; + const unsigned long STATE_SECURE_MED = 0x00010000; + const unsigned long STATE_SECURE_LOW = 0x00020000; + + + /** + * Notification indicating the state has changed for one of the requests + * associated with aWebProgress. + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification + * @param aRequest + * The nsIRequest that has changed state. + * @param aStateFlags + * Flags indicating the new state. This value is a combination of one + * of the State Transition Flags and one or more of the State Type + * Flags defined above. Any undefined bits are reserved for future + * use. + * @param aStatus + * Error status code associated with the state change. This parameter + * should be ignored unless aStateFlags includes the STATE_STOP bit. + * The status code indicates success or failure of the request + * associated with the state change. NOTE: aStatus may be a success + * code even for server generated errors, such as the HTTP 404 error. + * In such cases, the request itself should be queried for extended + * error information (e.g., for HTTP requests see nsIHttpChannel). + */ + void onStateChange(in nsIWebProgress aWebProgress, + in nsIRequest aRequest, + in unsigned long aStateFlags, + in nsresult aStatus); + + /** + * Notification that the progress has changed for one of the requests + * associated with aWebProgress. Progress totals are reset to zero when all + * requests in aWebProgress complete (corresponding to onStateChange being + * called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW + * flags). + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification. + * @param aRequest + * The nsIRequest that has new progress. + * @param aCurSelfProgress + * The current progress for aRequest. + * @param aMaxSelfProgress + * The maximum progress for aRequest. + * @param aCurTotalProgress + * The current progress for all requests associated with aWebProgress. + * @param aMaxTotalProgress + * The total progress for all requests associated with aWebProgress. + * + * NOTE: If any progress value is unknown, or if its value would exceed the + * maximum value of type long, then its value is replaced with -1. + * + * NOTE: If the object also implements nsIWebProgressListener2 and the caller + * knows about that interface, this function will not be called. Instead, + * nsIWebProgressListener2::onProgressChange64 will be called. + */ + void onProgressChange(in nsIWebProgress aWebProgress, + in nsIRequest aRequest, + in long aCurSelfProgress, + in long aMaxSelfProgress, + in long aCurTotalProgress, + in long aMaxTotalProgress); + + /** + * Called when the location of the window being watched changes. This is not + * when a load is requested, but rather once it is verified that the load is + * going to occur in the given window. For instance, a load that starts in a + * window might send progress and status messages for the new site, but it + * will not send the onLocationChange until we are sure that we are loading + * this new page here. + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification. + * @param aRequest + * The associated nsIRequest. This may be null in some cases. + * @param aLocation + * The URI of the location that is being loaded. + */ + void onLocationChange(in nsIWebProgress aWebProgress, + in nsIRequest aRequest, + in nsIURI aLocation); + + /** + * Notification that the status of a request has changed. The status message + * is intended to be displayed to the user (e.g., in the status bar of the + * browser). + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification. + * @param aRequest + * The nsIRequest that has new status. + * @param aStatus + * This value is not an error code. Instead, it is a numeric value + * that indicates the current status of the request. This interface + * does not define the set of possible status codes. NOTE: Some + * status values are defined by nsITransport and nsISocketTransport. + * @param aMessage + * Localized text corresponding to aStatus. + */ + void onStatusChange(in nsIWebProgress aWebProgress, + in nsIRequest aRequest, + in nsresult aStatus, + in wstring aMessage); + + /** + * Notification called for security progress. This method will be called on + * security transitions (eg HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and + * after document load completion. It might also be called if an error + * occurs during network loading. + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification. + * @param aRequest + * The nsIRequest that has new security state. + * @param aState + * A value composed of the Security State Flags and the Security + * Strength Flags listed above. Any undefined bits are reserved for + * future use. + * + * NOTE: These notifications will only occur if a security package is + * installed. + */ + void onSecurityChange(in nsIWebProgress aWebProgress, + in nsIRequest aRequest, + in unsigned long aState); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWindowCreator.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWindowCreator.idl new file mode 100644 index 00000000..c42f8863 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWindowCreator.idl @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Adam Lock <adamlock@netscape.com> + * + * 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 ***** */ + +/** + * nsIWindowCreator is a callback interface used by Gecko to create + * new browser windows. The application, either Mozilla or an embedding app, + * must provide an implementation of the Window Watcher component and + * notify the WindowWatcher during application initialization. + * @see nsIWindowWatcher + * + * @status FROZEN + */ + +#include "nsISupports.idl" + +interface nsIWebBrowserChrome; + +[uuid(30465632-A777-44cc-90F9-8145475EF999)] + +interface nsIWindowCreator : nsISupports { + + /** Create a new window. Gecko will/may call this method, if made + available to it, to create new windows. + @param parent parent window, if any. null if not. the newly created + window should be made a child/dependent window of + the parent, if any (and if the concept applies + to the underlying OS). + @param chromeFlags chrome features from nsIWebBrowserChrome + @return the new window + */ + nsIWebBrowserChrome createChromeWindow(in nsIWebBrowserChrome parent, + in PRUint32 chromeFlags); +}; + +%{C++ +// {30465632-A777-44cc-90F9-8145475EF999} +#define NS_WINDOWCREATOR_IID \ + {0x30465632, 0xa777, 0x44cc, {0x90, 0xf9, 0x81, 0x45, 0x47, 0x5e, 0xf9, 0x99}} +%} + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIWindowWatcher.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWindowWatcher.idl new file mode 100644 index 00000000..6ecca124 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIWindowWatcher.idl @@ -0,0 +1,190 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/** + * nsIWindowWatcher is the keeper of Gecko/DOM Windows. It maintains + * a list of open top-level windows, and allows some operations on them. + + * Usage notes: + + * This component has an |activeWindow| property. Clients may expect + * this property to be always current, so to properly integrate this component + * the application will need to keep it current by setting the property + * as the active window changes. + * This component should not keep a (XPCOM) reference to any windows; + * the implementation will claim no ownership. Windows must notify + * this component when they are created or destroyed, so only a weak + * reference is kept. Note that there is no interface for such notifications + * (not a public one, anyway). This is taken care of both in Mozilla and + * by common embedding code. Embedding clients need do nothing special + * about that requirement. + * This component must be initialized at application startup by calling + * setWindowCreator. + * + * @status FROZEN + */ + +#include "nsISupports.idl" + +interface nsIDOMWindow; +interface nsIObserver; +interface nsIPrompt; +interface nsIAuthPrompt; +interface nsISimpleEnumerator; +interface nsIWebBrowserChrome; +interface nsIWindowCreator; + +[scriptable, uuid(002286a8-494b-43b3-8ddd-49e3fc50622b)] + +interface nsIWindowWatcher : nsISupports { + + /** Create a new window. It will automatically be added to our list + (via addWindow()). + @param aParent parent window, if any. Null if no parent. If it is + impossible to get to an nsIWebBrowserChrome from aParent, this + method will effectively act as if aParent were null. + @param aURL url to which to open the new window. Must already be + escaped, if applicable. can be null. + @param aName window name from JS window.open. can be null. + @param aFeatures window features from JS window.open. can be null. + @param aArguments extra argument(s) to the new window, to be attached + as the |arguments| property. An nsISupportsArray will be + unwound into multiple arguments (but not recursively!). + can be null. + @return the new window + */ + nsIDOMWindow openWindow(in nsIDOMWindow aParent, in string aUrl, + in string aName, in string aFeatures, + in nsISupports aArguments); + + /** Clients of this service can register themselves to be notified + when a window is opened or closed (added to or removed from this + service). This method adds an aObserver to the list of objects + to be notified. + @param aObserver the object to be notified when windows are + opened or closed. Its Observe method will be + called with the following parameters: + + aObserver::Observe interprets its parameters so: + aSubject the window being opened or closed, sent as an nsISupports + which can be QIed to an nsIDOMWindow. + aTopic a wstring, either "domwindowopened" or "domwindowclosed". + someData not used. + */ + void registerNotification(in nsIObserver aObserver); + + /** Clients of this service can register themselves to be notified + when a window is opened or closed (added to or removed from this + service). This method removes an aObserver from the list of objects + to be notified. + @param aObserver the observer to be removed. + */ + void unregisterNotification(in nsIObserver aObserver); + + /** Get an iterator for currently open windows in the order they were opened, + guaranteeing that each will be visited exactly once. + @return an enumerator which will itself return nsISupports objects which + can be QIed to an nsIDOMWindow + */ + + nsISimpleEnumerator getWindowEnumerator(); + + /** Return a newly created nsIPrompt implementation. + @param aParent the parent window used for posing alerts. can be null. + @return a new nsIPrompt object + */ + + nsIPrompt getNewPrompter(in nsIDOMWindow aParent); + + /** Return a newly created nsIAuthPrompt implementation. + @param aParent the parent window used for posing alerts. can be null. + @return a new nsIAuthPrompt object + */ + + nsIAuthPrompt getNewAuthPrompter(in nsIDOMWindow aParent); + + /** Set the window creator callback. It must be filled in by the app. + openWindow will use it to create new windows. + @param creator the callback. if null, the callback will be cleared + and window creation capabilities lost. + */ + void setWindowCreator(in nsIWindowCreator creator); + + + /** Retrieve the chrome window mapped to the given DOM window. Window + Watcher keeps a list of all top-level DOM windows currently open, + along with their corresponding chrome interfaces. Since DOM Windows + lack a (public) means of retrieving their corresponding chrome, + this method will do that. + @param aWindow the DOM window whose chrome window the caller needs + @return the corresponding chrome window + */ + nsIWebBrowserChrome getChromeForWindow(in nsIDOMWindow aWindow); + + /** + Retrieve an existing window (or frame). + @param aTargetName the window name + @param aCurrentWindow a starting point in the window hierarchy to + begin the search. If null, each toplevel window + will be searched. + + Note: This method will search all open windows for any window or + frame with the given window name. Make sure you understand the + security implications of this before using this method! + */ + nsIDOMWindow getWindowByName(in wstring aTargetName, + in nsIDOMWindow aCurrentWindow); + + /** The Watcher serves as a global storage facility for the current active + (frontmost non-floating-palette-type) window, storing and returning + it on demand. Users must keep this attribute current, including after + the topmost window is closed. This attribute obviously can return null + if no windows are open, but should otherwise always return a valid + window. + */ + attribute nsIDOMWindow activeWindow; + +}; + +%{C++ +// {002286a8-494b-43b3-8ddd-49e3fc50622b} +#define NS_WINDOWWATCHER_IID \ + {0x002286a8, 0x494b, 0x43b3, {0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b}} + +#define NS_WINDOWWATCHER_CONTRACTID "@mozilla.org/embedcomp/window-watcher;1" +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509Cert.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509Cert.idl new file mode 100644 index 00000000..707c23da --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509Cert.idl @@ -0,0 +1,270 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo <javi@netscape.com> + * + * 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" + +interface nsIArray; +interface nsIX509CertValidity; +interface nsIASN1Object; + +/** + * This represents a X.509 certificate. + * + * @status FROZEN + */ +[scriptable, uuid(f0980f60-ee3d-11d4-998b-00b0d02354a0)] +interface nsIX509Cert : nsISupports { + + /** + * A nickname for the certificate. + */ + readonly attribute AString nickname; + + /** + * The primary email address of the certificate, if present. + */ + readonly attribute AString emailAddress; + + /** + * Obtain a list of all email addresses + * contained in the certificate. + * + * @param length The number of strings in the returned array. + * @return An array of email addresses. + */ + void getEmailAddresses(out unsigned long length, + [retval, array, size_is(length)] out wstring addresses); + + /** + * Check whether a given address is contained in the certificate. + * The comparison will convert the email address to lowercase. + * The behaviour for non ASCII characters is undefined. + * + * @param aEmailAddress The address to search for. + * + * @return True if the address is contained in the certificate. + */ + boolean containsEmailAddress(in AString aEmailAddress); + + /** + * The subject owning the certificate. + */ + readonly attribute AString subjectName; + + /** + * The subject's common name. + */ + readonly attribute AString commonName; + + /** + * The subject's organization. + */ + readonly attribute AString organization; + + /** + * The subject's organizational unit. + */ + readonly attribute AString organizationalUnit; + + /** + * The fingerprint of the certificate's public key, + * calculated using the SHA1 algorithm. + */ + readonly attribute AString sha1Fingerprint; + + /** + * The fingerprint of the certificate's public key, + * calculated using the MD5 algorithm. + */ + readonly attribute AString md5Fingerprint; + + /** + * A human readable name identifying the hardware or + * software token the certificate is stored on. + */ + readonly attribute AString tokenName; + + /** + * The subject identifying the issuer certificate. + */ + readonly attribute AString issuerName; + + /** + * The serial number the issuer assigned to this certificate. + */ + readonly attribute AString serialNumber; + + /** + * The issuer subject's common name. + */ + readonly attribute AString issuerCommonName; + + /** + * The issuer subject's organization. + */ + readonly attribute AString issuerOrganization; + + /** + * The issuer subject's organizational unit. + */ + readonly attribute AString issuerOrganizationUnit; + + /** + * The certificate used by the issuer to sign this certificate. + */ + readonly attribute nsIX509Cert issuer; + + /** + * This certificate's validity period. + */ + readonly attribute nsIX509CertValidity validity; + + /** + * A unique identifier of this certificate within the local storage. + */ + readonly attribute string dbKey; + + /** + * A human readable identifier to label this certificate. + */ + readonly attribute string windowTitle; + + /** + * Constants to classify the type of a certificate. + */ + const unsigned long UNKNOWN_CERT = 0; + const unsigned long CA_CERT = 1 << 0; + const unsigned long USER_CERT = 1 << 1; + const unsigned long EMAIL_CERT = 1 << 2; + const unsigned long SERVER_CERT = 1 << 3; + + /** + * Constants for certificate verification results. + */ + const unsigned long VERIFIED_OK = 0; + const unsigned long NOT_VERIFIED_UNKNOWN = 1 << 0; + const unsigned long CERT_REVOKED = 1 << 1; + const unsigned long CERT_EXPIRED = 1 << 2; + const unsigned long CERT_NOT_TRUSTED = 1 << 3; + const unsigned long ISSUER_NOT_TRUSTED = 1 << 4; + const unsigned long ISSUER_UNKNOWN = 1 << 5; + const unsigned long INVALID_CA = 1 << 6; + const unsigned long USAGE_NOT_ALLOWED = 1 << 7; + + /** + * Constants that describe the certified usages of a certificate. + */ + const unsigned long CERT_USAGE_SSLClient = 0; + const unsigned long CERT_USAGE_SSLServer = 1; + const unsigned long CERT_USAGE_SSLServerWithStepUp = 2; + const unsigned long CERT_USAGE_SSLCA = 3; + const unsigned long CERT_USAGE_EmailSigner = 4; + const unsigned long CERT_USAGE_EmailRecipient = 5; + const unsigned long CERT_USAGE_ObjectSigner = 6; + const unsigned long CERT_USAGE_UserCertImport = 7; + const unsigned long CERT_USAGE_VerifyCA = 8; + const unsigned long CERT_USAGE_ProtectedObjectSigner = 9; + const unsigned long CERT_USAGE_StatusResponder = 10; + const unsigned long CERT_USAGE_AnyCA = 11; + + /** + * Obtain a list of certificates that contains this certificate + * and the issuing certificates of all involved issuers, + * up to the root issuer. + * + * @return The chain of certifficates including the issuers. + */ + nsIArray getChain(); + + /** + * Obtain an array of human readable strings describing + * the certificate's certified usages. + * + * @param ignoreOcsp Do not use OCSP even if it is currently activated. + * @param verified The certificate verification result, see constants. + * @param count The number of human readable usages returned. + * @param usages The array of human readable usages. + */ + void getUsagesArray(in boolean ignoreOcsp, + out PRUint32 verified, + out PRUint32 count, + [array, size_is(count)] out wstring usages); + + /** + * Obtain a single comma separated human readable string describing + * the certificate's certified usages. + * + * @param ignoreOcsp Do not use OCSP even if it is currently activated. + * @param verified The certificate verification result, see constants. + * @param purposes The string listing the usages. + */ + void getUsagesString(in boolean ignoreOcsp, out PRUint32 verified, out AString usages); + + /** + * Verify the certificate for a particular usage. + * + * @return The certificate verification result, see constants. + */ + unsigned long verifyForUsage(in unsigned long usage); + + /** + * This is the attribute which describes the ASN1 layout + * of the certificate. This can be used when doing a + * "pretty print" of the certificate's ASN1 structure. + */ + readonly attribute nsIASN1Object ASN1Structure; + + /** + * Obtain a raw binary encoding of this certificate + * in DER format. + * + * @param length The number of bytes in the binary encoding. + * @param data The bytes representing the DER encoded certificate. + */ + void getRawDER(out unsigned long length, + [retval, array, size_is(length)] out octet data); + + /** + * Test whether two certificate instances represent the + * same certificate. + * + * @return Whether the certificates are equal + */ + boolean equals(in nsIX509Cert other); +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509CertDB.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509CertDB.idl new file mode 100644 index 00000000..8916d5fa --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509CertDB.idl @@ -0,0 +1,300 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo <javi@netscape.com> + * + * 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" + +interface nsIArray; +interface nsIX509Cert; +interface nsILocalFile; +interface nsIInterfaceRequestor; + +%{C++ +#define NS_X509CERTDB_CONTRACTID "@mozilla.org/security/x509certdb;1" +%} + +/** + * This represents a service to access and manipulate + * X.509 certificates stored in a database. + * + * @status FROZEN + */ +[scriptable, uuid(da48b3c0-1284-11d5-ac67-000064657374)] +interface nsIX509CertDB : nsISupports { + + /** + * Constants that define which usages a certificate + * is trusted for. + */ + const unsigned long UNTRUSTED = 0; + const unsigned long TRUSTED_SSL = 1 << 0; + const unsigned long TRUSTED_EMAIL = 1 << 1; + const unsigned long TRUSTED_OBJSIGN = 1 << 2; + + /** + * Given a nickname and optionally a token, + * locate the matching certificate. + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aNickname The nickname to be used as the key + * to find a certificate. + * + * @return The matching certificate if found. + */ + nsIX509Cert findCertByNickname(in nsISupports aToken, + in AString aNickname); + + /** + * Will find a certificate based on its dbkey + * retrieved by getting the dbKey attribute of + * the certificate. + * + * @param aDBkey Database internal key, as obtained using + * attribute dbkey in nsIX509Cert. + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + */ + nsIX509Cert findCertByDBKey(in string aDBkey, in nsISupports aToken); + + /** + * Obtain a list of certificate nicknames from the database. + * What the name is depends on type: + * user, ca, or server cert - the nickname + * email cert - the email address + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aType Type of certificate to obtain + * See certificate type constants in nsIX509Cert. + * @param count The number of nicknames in the returned array + * @param certNameList The returned array of certificate nicknames. + */ + void findCertNicknames(in nsISupports aToken, + in unsigned long aType, + out unsigned long count, + [array, size_is(count)] out wstring certNameList); + + /** + * Find the email encryption certificate by nickname. + * + * @param aNickname The nickname to be used as the key + * to find the certificate. + * + * @return The matching certificate if found. + */ + nsIX509Cert findEmailEncryptionCert(in AString aNickname); + + /** + * Find the email signing certificate by nickname. + * + * @param aNickname The nickname to be used as the key + * to find the certificate. + * + * @return The matching certificate if found. + */ + nsIX509Cert findEmailSigningCert(in AString aNickname); + + /** + * Find a certificate by email address. + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aEmailAddress The email address to be used as the key + * to find the certificate. + * + * @return The matching certificate if found. + */ + nsIX509Cert findCertByEmailAddress(in nsISupports aToken, + in string aEmailAddress); + + /** + * Use this to import a stream sent down as a mime type into + * the certificate database on the default token. + * The stream may consist of one or more certificates. + * + * @param data The raw data to be imported + * @param length The length of the data to be imported + * @param type The type of the certificate, see constants in nsIX509Cert + * @param ctx A UI context. + */ + void importCertificates([array, size_is(length)] in octet data, + in unsigned long length, + in unsigned long type, + in nsIInterfaceRequestor ctx); + + /** + * Import another person's email certificate into the database. + * + * @param data The raw data to be imported + * @param length The length of the data to be imported + * @param ctx A UI context. + */ + void importEmailCertificate([array, size_is(length)] in octet data, + in unsigned long length, + in nsIInterfaceRequestor ctx); + + /** + * Import a server machine's certificate into the database. + * + * @param data The raw data to be imported + * @param length The length of the data to be imported + * @param ctx A UI context. + */ + void importServerCertificate([array, size_is(length)] in octet data, + in unsigned long length, + in nsIInterfaceRequestor ctx); + + /** + * Import a personal certificate into the database, assuming + * the database already contains the private key for this certificate. + * + * @param data The raw data to be imported + * @param length The length of the data to be imported + * @param ctx A UI context. + */ + void importUserCertificate([array, size_is(length)] in octet data, + in unsigned long length, + in nsIInterfaceRequestor ctx); + + /** + * Delete a certificate stored in the database. + * + * @param aCert Delete this certificate. + */ + void deleteCertificate(in nsIX509Cert aCert); + + /** + * Modify the trust that is stored and associated to a certificate within + * a database. Separate trust is stored for + * One call manipulates the trust for one trust type only. + * See the trust type constants defined within this interface. + * + * @param cert Change the stored trust of this certificate. + * @param type The type of the certificate. See nsIX509Cert. + * @param trust A bitmask. The new trust for the possible usages. + * See the trust constants defined within this interface. + */ + void setCertTrust(in nsIX509Cert cert, + in unsigned long type, + in unsigned long trust); + + /** + * Query whether a certificate is trusted for a particular use. + * + * @param cert Obtain the stored trust of this certificate. + * @param certType The type of the certificate. See nsIX509Cert. + * @param trustType A single bit from the usages constants defined + * within this interface. + * + * @return Returns true if the certificate is trusted for the given use. + */ + boolean isCertTrusted(in nsIX509Cert cert, + in unsigned long certType, + in unsigned long trustType); + + /** + * Import certificate(s) from file + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aFile Identifies a file that contains the certificate + * to be imported. + * @param aType Describes the type of certificate that is going to + * be imported. See type constants in nsIX509Cert. + */ + void importCertsFromFile(in nsISupports aToken, + in nsILocalFile aFile, + in unsigned long aType); + + /** + * Import a PKCS#12 file containing cert(s) and key(s) into the database. + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aFile Identifies a file that contains the data + * to be imported. + */ + void importPKCS12File(in nsISupports aToken, + in nsILocalFile aFile); + + /** + * Export a set of certs and keys from the database to a PKCS#12 file. + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aFile Identifies a file that will be filled with the data + * to be exported. + * @param count The number of certificates to be exported. + * @param aCerts The array of all certificates to be exported. + */ + void exportPKCS12File(in nsISupports aToken, + in nsILocalFile aFile, + in unsigned long count, + [array, size_is(count)] in nsIX509Cert aCerts); + + /** + * An array of all known OCSP responders within the scope of the + * certificate database. + * + * @return Array of OCSP responders, entries are QIable to nsIOCSPResponder. + */ + nsIArray getOCSPResponders(); + + /** + * Whether OCSP is enabled in preferences. + */ + readonly attribute boolean isOcspOn; + + /* + * Decode a raw data presentation and instantiate an object in memory. + * + * @param base64 The raw representation of a certificate, + * encoded as Base 64. + * @return The new certificate object. + */ + nsIX509Cert constructX509FromBase64(in string base64); +}; + diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509CertValidity.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509CertValidity.idl new file mode 100644 index 00000000..39c38601 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsIX509CertValidity.idl @@ -0,0 +1,105 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Javier Delgadillo <javi@netscape.com> + * + * 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" + +/** + * Information on the validity period of a X.509 certificate. + * + * @status FROZEN + */ +[scriptable, uuid(e701dfd8-1dd1-11b2-a172-ffa6cc6156ad)] +interface nsIX509CertValidity : nsISupports { + + /** + * The earliest point in time where + * a certificate is valid. + */ + readonly attribute PRTime notBefore; + + /** + * "notBefore" attribute formatted as a time string + * according to the environment locale, + * according to the environment time zone. + */ + readonly attribute AString notBeforeLocalTime; + + /** + * The day portion of "notBefore" + * formatted as a time string + * according to the environment locale, + * according to the environment time zone. + */ + readonly attribute AString notBeforeLocalDay; + + /** + * "notBefore" attribute formatted as a string + * according to the environment locale, + * displayed as GMT / UTC. + */ + readonly attribute AString notBeforeGMT; + + /** + * The latest point in time where + * a certificate is valid. + */ + readonly attribute PRTime notAfter; + + /** + * "notAfter" attribute formatted as a time string + * according to the environment locale, + * according to the environment time zone. + */ + readonly attribute AString notAfterLocalTime; + + /** + * The day portion of "notAfter" + * formatted as a time string + * according to the environment locale, + * according to the environment time zone. + */ + readonly attribute AString notAfterLocalDay; + + /** + * "notAfter" attribute formatted as a time string + * according to the environment locale, + * displayed as GMT / UTC. + */ + readonly attribute AString notAfterGMT; +}; diff --git a/Src/nprt_plugin/gecko/1.8/win/idl/nsrootidl.idl b/Src/nprt_plugin/gecko/1.8/win/idl/nsrootidl.idl new file mode 100644 index 00000000..0538e4bc --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/idl/nsrootidl.idl @@ -0,0 +1,128 @@ +/* -*- Mode: IDL; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Dan Rosen <dr@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +/** + * Root idl declarations to be used by all. + * @status FROZEN + */ + +%{C++ + +#include "nscore.h" +#include "prtime.h" + +/* + * Forward declarations for new string types + */ +class nsAString; +class nsACString; + +/* + * Start commenting out the C++ versions of the below in the output header + */ +#if 0 +%} + +typedef boolean PRBool ; +typedef octet PRUint8 ; +typedef unsigned short PRUint16 ; +typedef unsigned short PRUnichar; +typedef unsigned long PRUint32 ; +typedef unsigned long long PRUint64 ; +typedef unsigned long long PRTime ; +typedef short PRInt16 ; +typedef long PRInt32 ; +typedef long long PRInt64 ; + +typedef unsigned long nsrefcnt ; +typedef unsigned long nsresult ; + +// XXX need this built into xpidl compiler so that it's really size_t or PRSize +// and it's scriptable: +typedef unsigned long size_t; + +[ptr] native voidPtr(void); +[ptr] native charPtr(char); +[ptr] native unicharPtr(PRUnichar); + +[ref, nsid] native nsIDRef(nsID); +[ref, nsid] native nsIIDRef(nsIID); +[ref, nsid] native nsCIDRef(nsCID); + +[ptr, nsid] native nsIDPtr(nsID); +[ptr, nsid] native nsIIDPtr(nsIID); +[ptr, nsid] native nsCIDPtr(nsCID); + +// NOTE: Be careful in using the following 3 types. The *Ref and *Ptr variants +// are more commonly used (and better supported). Those variants require +// nsMemory alloc'd copies when used as 'out' params while these types do not. +// However, currently these types can not be used for 'in' params. And, methods +// that use them as 'out' params *must* be declared [notxpcom] (with an explicit +// return type of nsresult). This makes such methods implicitly not scriptable. +// Use of these types in methods without a [notxpcom] declaration will cause +// the xpidl compiler to raise an error. +// See: http://bugzilla.mozilla.org/show_bug.cgi?id=93792 + +[nsid] native nsIID(nsIID); +[nsid] native nsID(nsID); +[nsid] native nsCID(nsCID); + +[ptr] native nsQIResult(void); + +[ref, domstring] native DOMString(ignored); +[ref, domstring] native DOMStringRef(ignored); +[ptr, domstring] native DOMStringPtr(ignored); + +[ref, utf8string] native AUTF8String(ignored); +[ref, utf8string] native AUTF8StringRef(ignored); +[ptr, utf8string] native AUTF8StringPtr(ignored); + +[ref, cstring] native ACString(ignored); +[ref, cstring] native ACStringRef(ignored); +[ptr, cstring] native ACStringPtr(ignored); + +[ref, astring] native AString(ignored); +[ref, astring] native AStringRef(ignored); +[ptr, astring] native AStringPtr(ignored); + +%{C++ +/* + * End commenting out the C++ versions of the above in the output header + */ +#endif +%} diff --git a/Src/nprt_plugin/gecko/1.8/win/include/domstubs.h b/Src/nprt_plugin/gecko/1.8/win/include/domstubs.h new file mode 100644 index 00000000..b39d73d4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/domstubs.h @@ -0,0 +1,148 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/base/domstubs.idl + */ + +#ifndef __gen_domstubs_h__ +#define __gen_domstubs_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +typedef PRUint64 DOMTimeStamp; + +class nsIDOMAttr; /* forward declaration */ + +class nsIDOMCDATASection; /* forward declaration */ + +class nsIDOMCharacterData; /* forward declaration */ + +class nsIDOMComment; /* forward declaration */ + +class nsIDOMDOMImplementation; /* forward declaration */ + +class nsIDOMDocument; /* forward declaration */ + +class nsIDOMDocumentFragment; /* forward declaration */ + +class nsIDOMDocumentType; /* forward declaration */ + +class nsIDOMElement; /* forward declaration */ + +class nsIDOMEntity; /* forward declaration */ + +class nsIDOMEntityReference; /* forward declaration */ + +class nsIDOMNSDocument; /* forward declaration */ + +class nsIDOMNamedNodeMap; /* forward declaration */ + +class nsIDOMNode; /* forward declaration */ + +class nsIDOMNodeList; /* forward declaration */ + +class nsIDOMNotation; /* forward declaration */ + +class nsIDOMProcessingInstruction; /* forward declaration */ + +class nsIDOMText; /* forward declaration */ + +class nsIDOMDOMStringList; /* forward declaration */ + +class nsIDOMNameList; /* forward declaration */ + +class DOMException; /* forward declaration */ + +class RangeException; /* forward declaration */ + +class nsIDOMStyleSheetList; /* forward declaration */ + +class nsIDOMLinkStyle; /* forward declaration */ + +class nsIDOMStyleSheet; /* forward declaration */ + +class nsIDOMMediaList; /* forward declaration */ + +class nsIDOMAbstractView; /* forward declaration */ + +class nsIDOMDocumentView; /* forward declaration */ + +class nsIDOMWindow; /* forward declaration */ + +class nsIDOMWindowInternal; /* forward declaration */ + +class nsIDOMWindowCollection; /* forward declaration */ + +class nsIDOMPlugin; /* forward declaration */ + +class nsIDOMPluginArray; /* forward declaration */ + +class nsIDOMMimeType; /* forward declaration */ + +class nsIDOMMimeTypeArray; /* forward declaration */ + +class nsIDOMBarProp; /* forward declaration */ + +class nsIDOMNavigator; /* forward declaration */ + +class nsIDOMScreen; /* forward declaration */ + +class nsIDOMHistory; /* forward declaration */ + +class nsIDOMEvent; /* forward declaration */ + +class nsIDOMEventTarget; /* forward declaration */ + +class nsIDOMEventListener; /* forward declaration */ + +class nsIDOMEventGroup; /* forward declaration */ + +class nsIDOMHTMLElement; /* forward declaration */ + +class nsIDOMHTMLFormElement; /* forward declaration */ + +class nsIDOMHTMLCollection; /* forward declaration */ + +class nsIDOMCSSValue; /* forward declaration */ + +class nsIDOMCSSValueList; /* forward declaration */ + +class nsIDOMCSSPrimitiveValue; /* forward declaration */ + +class nsIDOMCSSRule; /* forward declaration */ + +class nsIDOMCSSRuleList; /* forward declaration */ + +class nsIDOMCSSStyleSheet; /* forward declaration */ + +class nsIDOMCSSStyleDeclaration; /* forward declaration */ + +class nsIDOMCounter; /* forward declaration */ + +class nsIDOMRect; /* forward declaration */ + +class nsIDOMRGBColor; /* forward declaration */ + +class nsIDOMCSSStyleRule; /* forward declaration */ + +class nsIDOMCSSStyleRuleCollection; /* forward declaration */ + +class nsIDOMHTMLTableCaptionElement; /* forward declaration */ + +class nsIDOMHTMLTableSectionElement; /* forward declaration */ + +class nsIDOMRange; /* forward declaration */ + +class nsIDOMCRMFObject; /* forward declaration */ + +class nsIDOMCrypto; /* forward declaration */ + +class nsIDOMPkcs11; /* forward declaration */ + + +#endif /* __gen_domstubs_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/jni.h b/Src/nprt_plugin/gecko/1.8/win/include/jni.h new file mode 100644 index 00000000..863075af --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/jni.h @@ -0,0 +1,1810 @@ +/* ***** 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 Java Runtime Interface. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation and Sun Microsystems, Inc. + * Portions created by the Initial Developer are Copyright (C) 1993-1996 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef JNI_H +#define JNI_H + +#include <stdio.h> +#include <stdarg.h> + +/* jni_md.h contains the machine-dependent typedefs for jbyte, jint + and jlong */ + +#include "jni_md.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * JNI Types + */ + +typedef unsigned char jboolean; +typedef unsigned short jchar; +typedef short jshort; +typedef float jfloat; +typedef double jdouble; + +typedef jint jsize; + +#ifdef __cplusplus + +class _jobject {}; +class _jclass : public _jobject {}; +class _jthrowable : public _jobject {}; +class _jstring : public _jobject {}; +class _jarray : public _jobject {}; +class _jbooleanArray : public _jarray {}; +class _jbyteArray : public _jarray {}; +class _jcharArray : public _jarray {}; +class _jshortArray : public _jarray {}; +class _jintArray : public _jarray {}; +class _jlongArray : public _jarray {}; +class _jfloatArray : public _jarray {}; +class _jdoubleArray : public _jarray {}; +class _jobjectArray : public _jarray {}; + +typedef _jobject *jobject; +typedef _jclass *jclass; +typedef _jthrowable *jthrowable; +typedef _jstring *jstring; +typedef _jarray *jarray; +typedef _jbooleanArray *jbooleanArray; +typedef _jbyteArray *jbyteArray; +typedef _jcharArray *jcharArray; +typedef _jshortArray *jshortArray; +typedef _jintArray *jintArray; +typedef _jlongArray *jlongArray; +typedef _jfloatArray *jfloatArray; +typedef _jdoubleArray *jdoubleArray; +typedef _jobjectArray *jobjectArray; + +#else + +struct _jobject; + +typedef struct _jobject *jobject; +typedef jobject jclass; +typedef jobject jthrowable; +typedef jobject jstring; +typedef jobject jarray; +typedef jarray jbooleanArray; +typedef jarray jbyteArray; +typedef jarray jcharArray; +typedef jarray jshortArray; +typedef jarray jintArray; +typedef jarray jlongArray; +typedef jarray jfloatArray; +typedef jarray jdoubleArray; +typedef jarray jobjectArray; + +#endif + +#if 0 /* moved to jri_md.h */ +typedef jobject jref; /* For transition---not meant to be part of public + API anymore.*/ +#endif + +typedef union jvalue { + jboolean z; + jbyte b; + jchar c; + jshort s; + jint i; + jlong j; + jfloat f; + jdouble d; + jobject l; +} jvalue; + +struct _jfieldID; +typedef struct _jfieldID *jfieldID; + +struct _jmethodID; +typedef struct _jmethodID *jmethodID; + +/* + * jboolean constants + */ + +#define JNI_FALSE 0 +#define JNI_TRUE 1 + +/* + * possible return values for JNI functions. + */ + +#define JNI_OK 0 +#define JNI_ERR (-1) + +/* + * used in ReleaseScalarArrayElements + */ + +#define JNI_COMMIT 1 +#define JNI_ABORT 2 + +/* + * used in RegisterNatives to describe native method name, signature, + * and function pointer. + */ + +typedef struct { + char *name; + char *signature; + void *fnPtr; +} JNINativeMethod; + +/* + * JNI Native Method Interface. + */ + +struct JNINativeInterface_; + +struct JNIEnv_; + +#ifdef __cplusplus +typedef JNIEnv_ JNIEnv; +#else +typedef const struct JNINativeInterface_ *JNIEnv; +#endif + +/* + * JNI Invocation Interface. + */ + +struct JNIInvokeInterface_; + +struct JavaVM_; + +#ifdef __cplusplus +typedef JavaVM_ JavaVM; +#else +typedef const struct JNIInvokeInterface_ *JavaVM; +#endif + +struct JNINativeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + void *reserved3; + jint (JNICALL *GetVersion)(JNIEnv *env); + + jclass (JNICALL *DefineClass) + (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, + jsize len); + jclass (JNICALL *FindClass) + (JNIEnv *env, const char *name); + + void *reserved4; + void *reserved5; + void *reserved6; + + jclass (JNICALL *GetSuperclass) + (JNIEnv *env, jclass sub); + jboolean (JNICALL *IsAssignableFrom) + (JNIEnv *env, jclass sub, jclass sup); + void *reserved7; + + + jint (JNICALL *Throw) + (JNIEnv *env, jthrowable obj); + jint (JNICALL *ThrowNew) + (JNIEnv *env, jclass clazz, const char *msg); + jthrowable (JNICALL *ExceptionOccurred) + (JNIEnv *env); + void (JNICALL *ExceptionDescribe) + (JNIEnv *env); + void (JNICALL *ExceptionClear) + (JNIEnv *env); + void (JNICALL *FatalError) + (JNIEnv *env, const char *msg); + void *reserved8; + void *reserved9; + + jobject (JNICALL *NewGlobalRef) + (JNIEnv *env, jobject lobj); + void (JNICALL *DeleteGlobalRef) + (JNIEnv *env, jobject gref); + void (JNICALL *DeleteLocalRef) + (JNIEnv *env, jobject obj); + jboolean (JNICALL *IsSameObject) + (JNIEnv *env, jobject obj1, jobject obj2); + void *reserved10; + void *reserved11; + + jobject (JNICALL *AllocObject) + (JNIEnv *env, jclass clazz); + jobject (JNICALL *NewObject) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *NewObjectV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject (JNICALL *NewObjectA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jclass (JNICALL *GetObjectClass) + (JNIEnv *env, jobject obj); + jboolean (JNICALL *IsInstanceOf) + (JNIEnv *env, jobject obj, jclass clazz); + + jmethodID (JNICALL *GetMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *CallObjectMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jobject (JNICALL *CallObjectMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jobject (JNICALL *CallObjectMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); + + jboolean (JNICALL *CallBooleanMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jboolean (JNICALL *CallBooleanMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jboolean (JNICALL *CallBooleanMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); + + jbyte (JNICALL *CallByteMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jbyte (JNICALL *CallByteMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jbyte (JNICALL *CallByteMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + + jchar (JNICALL *CallCharMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jchar (JNICALL *CallCharMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jchar (JNICALL *CallCharMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + + jshort (JNICALL *CallShortMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jshort (JNICALL *CallShortMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jshort (JNICALL *CallShortMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + + jint (JNICALL *CallIntMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jint (JNICALL *CallIntMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jint (JNICALL *CallIntMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + + jlong (JNICALL *CallLongMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jlong (JNICALL *CallLongMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jlong (JNICALL *CallLongMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + + jfloat (JNICALL *CallFloatMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jfloat (JNICALL *CallFloatMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jfloat (JNICALL *CallFloatMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + + jdouble (JNICALL *CallDoubleMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jdouble (JNICALL *CallDoubleMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jdouble (JNICALL *CallDoubleMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); + + void (JNICALL *CallVoidMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + void (JNICALL *CallVoidMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + void (JNICALL *CallVoidMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); + + jobject (JNICALL *CallNonvirtualObjectMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *CallNonvirtualObjectMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jobject (JNICALL *CallNonvirtualObjectMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue * args); + + jboolean (JNICALL *CallNonvirtualBooleanMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jboolean (JNICALL *CallNonvirtualBooleanMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jboolean (JNICALL *CallNonvirtualBooleanMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue * args); + + jbyte (JNICALL *CallNonvirtualByteMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jbyte (JNICALL *CallNonvirtualByteMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jbyte (JNICALL *CallNonvirtualByteMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + + jchar (JNICALL *CallNonvirtualCharMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jchar (JNICALL *CallNonvirtualCharMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jchar (JNICALL *CallNonvirtualCharMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + + jshort (JNICALL *CallNonvirtualShortMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jshort (JNICALL *CallNonvirtualShortMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jshort (JNICALL *CallNonvirtualShortMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + + jint (JNICALL *CallNonvirtualIntMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jint (JNICALL *CallNonvirtualIntMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jint (JNICALL *CallNonvirtualIntMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + + jlong (JNICALL *CallNonvirtualLongMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jlong (JNICALL *CallNonvirtualLongMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jlong (JNICALL *CallNonvirtualLongMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + + jfloat (JNICALL *CallNonvirtualFloatMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jfloat (JNICALL *CallNonvirtualFloatMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jfloat (JNICALL *CallNonvirtualFloatMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + + jdouble (JNICALL *CallNonvirtualDoubleMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jdouble (JNICALL *CallNonvirtualDoubleMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jdouble (JNICALL *CallNonvirtualDoubleMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue *args); + + void (JNICALL *CallNonvirtualVoidMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + void (JNICALL *CallNonvirtualVoidMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + void (JNICALL *CallNonvirtualVoidMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + jvalue * args); + + jfieldID (JNICALL *GetFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *GetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jboolean (JNICALL *GetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jbyte (JNICALL *GetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jchar (JNICALL *GetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jshort (JNICALL *GetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jint (JNICALL *GetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jlong (JNICALL *GetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jfloat (JNICALL *GetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jdouble (JNICALL *GetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + + void (JNICALL *SetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); + void (JNICALL *SetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); + void (JNICALL *SetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); + void (JNICALL *SetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); + void (JNICALL *SetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); + void (JNICALL *SetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); + void (JNICALL *SetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); + void (JNICALL *SetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); + void (JNICALL *SetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); + + jmethodID (JNICALL *GetStaticMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *CallStaticObjectMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *CallStaticObjectMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject (JNICALL *CallStaticObjectMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jboolean (JNICALL *CallStaticBooleanMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jboolean (JNICALL *CallStaticBooleanMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jboolean (JNICALL *CallStaticBooleanMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jbyte (JNICALL *CallStaticByteMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jbyte (JNICALL *CallStaticByteMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jbyte (JNICALL *CallStaticByteMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jchar (JNICALL *CallStaticCharMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jchar (JNICALL *CallStaticCharMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jchar (JNICALL *CallStaticCharMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jshort (JNICALL *CallStaticShortMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jshort (JNICALL *CallStaticShortMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jshort (JNICALL *CallStaticShortMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jint (JNICALL *CallStaticIntMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jint (JNICALL *CallStaticIntMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jint (JNICALL *CallStaticIntMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jlong (JNICALL *CallStaticLongMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jlong (JNICALL *CallStaticLongMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jlong (JNICALL *CallStaticLongMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jfloat (JNICALL *CallStaticFloatMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jfloat (JNICALL *CallStaticFloatMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jfloat (JNICALL *CallStaticFloatMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + jdouble (JNICALL *CallStaticDoubleMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jdouble (JNICALL *CallStaticDoubleMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jdouble (JNICALL *CallStaticDoubleMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); + + void (JNICALL *CallStaticVoidMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, ...); + void (JNICALL *CallStaticVoidMethodV) + (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); + void (JNICALL *CallStaticVoidMethodA) + (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args); + + jfieldID (JNICALL *GetStaticFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + jobject (JNICALL *GetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jboolean (JNICALL *GetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jbyte (JNICALL *GetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jchar (JNICALL *GetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jshort (JNICALL *GetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jint (JNICALL *GetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jlong (JNICALL *GetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jfloat (JNICALL *GetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jdouble (JNICALL *GetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + + void (JNICALL *SetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); + void (JNICALL *SetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); + void (JNICALL *SetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); + void (JNICALL *SetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); + void (JNICALL *SetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); + void (JNICALL *SetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); + void (JNICALL *SetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); + void (JNICALL *SetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); + void (JNICALL *SetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); + + jstring (JNICALL *NewString) + (JNIEnv *env, const jchar *unicode, jsize len); + jsize (JNICALL *GetStringLength) + (JNIEnv *env, jstring str); + const jchar *(JNICALL *GetStringChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void (JNICALL *ReleaseStringChars) + (JNIEnv *env, jstring str, const jchar *chars); + + jstring (JNICALL *NewStringUTF) + (JNIEnv *env, const char *utf); + jsize (JNICALL *GetStringUTFLength) + (JNIEnv *env, jstring str); + const char* (JNICALL *GetStringUTFChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void (JNICALL *ReleaseStringUTFChars) + (JNIEnv *env, jstring str, const char* chars); + + + jsize (JNICALL *GetArrayLength) + (JNIEnv *env, jarray array); + + jobjectArray (JNICALL *NewObjectArray) + (JNIEnv *env, jsize len, jclass clazz, jobject init); + jobject (JNICALL *GetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index); + void (JNICALL *SetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index, jobject val); + + jbooleanArray (JNICALL *NewBooleanArray) + (JNIEnv *env, jsize len); + jbyteArray (JNICALL *NewByteArray) + (JNIEnv *env, jsize len); + jcharArray (JNICALL *NewCharArray) + (JNIEnv *env, jsize len); + jshortArray (JNICALL *NewShortArray) + (JNIEnv *env, jsize len); + jintArray (JNICALL *NewIntArray) + (JNIEnv *env, jsize len); + jlongArray (JNICALL *NewLongArray) + (JNIEnv *env, jsize len); + jfloatArray (JNICALL *NewFloatArray) + (JNIEnv *env, jsize len); + jdoubleArray (JNICALL *NewDoubleArray) + (JNIEnv *env, jsize len); + + jboolean * (JNICALL *GetBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *isCopy); + jbyte * (JNICALL *GetByteArrayElements) + (JNIEnv *env, jbyteArray array, jboolean *isCopy); + jchar * (JNICALL *GetCharArrayElements) + (JNIEnv *env, jcharArray array, jboolean *isCopy); + jshort * (JNICALL *GetShortArrayElements) + (JNIEnv *env, jshortArray array, jboolean *isCopy); + jint * (JNICALL *GetIntArrayElements) + (JNIEnv *env, jintArray array, jboolean *isCopy); + jlong * (JNICALL *GetLongArrayElements) + (JNIEnv *env, jlongArray array, jboolean *isCopy); + jfloat * (JNICALL *GetFloatArrayElements) + (JNIEnv *env, jfloatArray array, jboolean *isCopy); + jdouble * (JNICALL *GetDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jboolean *isCopy); + + void (JNICALL *ReleaseBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); + void (JNICALL *ReleaseByteArrayElements) + (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); + void (JNICALL *ReleaseCharArrayElements) + (JNIEnv *env, jcharArray array, jchar *elems, jint mode); + void (JNICALL *ReleaseShortArrayElements) + (JNIEnv *env, jshortArray array, jshort *elems, jint mode); + void (JNICALL *ReleaseIntArrayElements) + (JNIEnv *env, jintArray array, jint *elems, jint mode); + void (JNICALL *ReleaseLongArrayElements) + (JNIEnv *env, jlongArray array, jlong *elems, jint mode); + void (JNICALL *ReleaseFloatArrayElements) + (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); + void (JNICALL *ReleaseDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); + + void (JNICALL *GetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); + void (JNICALL *GetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); + void (JNICALL *GetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); + void (JNICALL *GetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); + void (JNICALL *GetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); + void (JNICALL *GetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); + void (JNICALL *GetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); + void (JNICALL *GetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); + + void (JNICALL *SetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); + void (JNICALL *SetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); + void (JNICALL *SetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); + void (JNICALL *SetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); + void (JNICALL *SetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); + void (JNICALL *SetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); + void (JNICALL *SetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); + void (JNICALL *SetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); + + jint (JNICALL *RegisterNatives) + (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, + jint nMethods); + jint (JNICALL *UnregisterNatives) + (JNIEnv *env, jclass clazz); + + jint (JNICALL *MonitorEnter) + (JNIEnv *env, jobject obj); + jint (JNICALL *MonitorExit) + (JNIEnv *env, jobject obj); + + jint (JNICALL *GetJavaVM) + (JNIEnv *env, JavaVM **vm); +}; + +/* + * We use inlined functions for C++ so that programmers can write: + * + * env->FindClass("java/lang/String") + * + * in C++ rather than: + * + * (*env)->FindClass(env, "java/lang/String") + * + * in C. + */ + +struct JNIEnv_ { + const struct JNINativeInterface_ *functions; + void *reserved0; + void *reserved1[6]; +#ifdef __cplusplus + + jint GetVersion() { + return functions->GetVersion(this); + } + jclass DefineClass(const char *name, jobject loader, const jbyte *buf, + jsize len) { + return functions->DefineClass(this, name, loader, buf, len); + } + jclass FindClass(const char *name) { + return functions->FindClass(this, name); + } + jclass GetSuperclass(jclass sub) { + return functions->GetSuperclass(this, sub); + } + jboolean IsAssignableFrom(jclass sub, jclass sup) { + return functions->IsAssignableFrom(this, sub, sup); + } + + jint Throw(jthrowable obj) { + return functions->Throw(this, obj); + } + jint ThrowNew(jclass clazz, const char *msg) { + return functions->ThrowNew(this, clazz, msg); + } + jthrowable ExceptionOccurred() { + return functions->ExceptionOccurred(this); + } + void ExceptionDescribe() { + functions->ExceptionDescribe(this); + } + void ExceptionClear() { + functions->ExceptionClear(this); + } + void FatalError(const char *msg) { + functions->FatalError(this, msg); + } + + jobject NewGlobalRef(jobject lobj) { + return functions->NewGlobalRef(this,lobj); + } + void DeleteGlobalRef(jobject gref) { + functions->DeleteGlobalRef(this,gref); + } + void DeleteLocalRef(jobject obj) { + functions->DeleteLocalRef(this, obj); + } + + jboolean IsSameObject(jobject obj1, jobject obj2) { + return functions->IsSameObject(this,obj1,obj2); + } + + jobject AllocObject(jclass clazz) { + return functions->AllocObject(this,clazz); + } + jobject NewObject(jclass clazz, jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args, methodID); + result = functions->NewObjectV(this,clazz,methodID,args); + va_end(args); + return result; + } + jobject NewObjectV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->NewObjectV(this,clazz,methodID,args); + } + jobject NewObjectA(jclass clazz, jmethodID methodID, + jvalue *args) { + return functions->NewObjectA(this,clazz,methodID,args); + } + + jclass GetObjectClass(jobject obj) { + return functions->GetObjectClass(this,obj); + } + jboolean IsInstanceOf(jobject obj, jclass clazz) { + return functions->IsInstanceOf(this,obj,clazz); + } + + jmethodID GetMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetMethodID(this,clazz,name,sig); + } + + jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallObjectMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jobject CallObjectMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallObjectMethodV(this,obj,methodID,args); + } + jobject CallObjectMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallObjectMethodA(this,obj,methodID,args); + } + + jboolean CallBooleanMethod(jobject obj, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallBooleanMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallBooleanMethodV(this,obj,methodID,args); + } + jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallBooleanMethodA(this,obj,methodID, args); + } + + jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallByteMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jbyte CallByteMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallByteMethodV(this,obj,methodID,args); + } + jbyte CallByteMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallByteMethodA(this,obj,methodID,args); + } + + jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallCharMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jchar CallCharMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallCharMethodV(this,obj,methodID,args); + } + jchar CallCharMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallCharMethodA(this,obj,methodID,args); + } + + jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallShortMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jshort CallShortMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallShortMethodV(this,obj,methodID,args); + } + jshort CallShortMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallShortMethodA(this,obj,methodID,args); + } + + jint CallIntMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallIntMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jint CallIntMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallIntMethodV(this,obj,methodID,args); + } + jint CallIntMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallIntMethodA(this,obj,methodID,args); + } + + jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallLongMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jlong CallLongMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallLongMethodV(this,obj,methodID,args); + } + jlong CallLongMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallLongMethodA(this,obj,methodID,args); + } + + jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallFloatMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jfloat CallFloatMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallFloatMethodV(this,obj,methodID,args); + } + jfloat CallFloatMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallFloatMethodA(this,obj,methodID,args); + } + + jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallDoubleMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallDoubleMethodV(this,obj,methodID,args); + } + jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + return functions->CallDoubleMethodA(this,obj,methodID,args); + } + + void CallVoidMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallVoidMethodV(this,obj,methodID,args); + va_end(args); + } + void CallVoidMethodV(jobject obj, jmethodID methodID, + va_list args) { + functions->CallVoidMethodV(this,obj,methodID,args); + } + void CallVoidMethodA(jobject obj, jmethodID methodID, + jvalue * args) { + functions->CallVoidMethodA(this,obj,methodID,args); + } + + jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + } + jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, + jmethodID methodID, jvalue * args) { + return functions->CallNonvirtualObjectMethodA(this,obj,clazz, + methodID,args); + } + + jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + } + jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, + jmethodID methodID, jvalue * args) { + return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, + methodID, args); + } + + jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + } + jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, + jmethodID methodID, jvalue * args) { + return functions->CallNonvirtualByteMethodA(this,obj,clazz, + methodID,args); + } + + jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + } + jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, + jmethodID methodID, jvalue * args) { + return functions->CallNonvirtualCharMethodA(this,obj,clazz, + methodID,args); + } + + jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + } + jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, + jmethodID methodID, jvalue * args) { + return functions->CallNonvirtualShortMethodA(this,obj,clazz, + methodID,args); + } + + jint CallNonvirtualIntMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + } + jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, + jmethodID methodID, jvalue * args) { + return functions->CallNonvirtualIntMethodA(this,obj,clazz, + methodID,args); + } + + jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + } + jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, + jmethodID methodID, jvalue * args) { + return functions->CallNonvirtualLongMethodA(this,obj,clazz, + methodID,args); + } + + jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + } + jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, + jmethodID methodID, + jvalue * args) { + return functions->CallNonvirtualFloatMethodA(this,obj,clazz, + methodID,args); + } + + jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + } + jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, + jmethodID methodID, + jvalue * args) { + return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, + methodID,args); + } + + void CallNonvirtualVoidMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + va_end(args); + } + void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + } + void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, + jmethodID methodID, + jvalue * args) { + functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); + } + + jfieldID GetFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetFieldID(this,clazz,name,sig); + } + + jobject GetObjectField(jobject obj, jfieldID fieldID) { + return functions->GetObjectField(this,obj,fieldID); + } + jboolean GetBooleanField(jobject obj, jfieldID fieldID) { + return functions->GetBooleanField(this,obj,fieldID); + } + jbyte GetByteField(jobject obj, jfieldID fieldID) { + return functions->GetByteField(this,obj,fieldID); + } + jchar GetCharField(jobject obj, jfieldID fieldID) { + return functions->GetCharField(this,obj,fieldID); + } + jshort GetShortField(jobject obj, jfieldID fieldID) { + return functions->GetShortField(this,obj,fieldID); + } + jint GetIntField(jobject obj, jfieldID fieldID) { + return functions->GetIntField(this,obj,fieldID); + } + jlong GetLongField(jobject obj, jfieldID fieldID) { + return functions->GetLongField(this,obj,fieldID); + } + jfloat GetFloatField(jobject obj, jfieldID fieldID) { + return functions->GetFloatField(this,obj,fieldID); + } + jdouble GetDoubleField(jobject obj, jfieldID fieldID) { + return functions->GetDoubleField(this,obj,fieldID); + } + + void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { + functions->SetObjectField(this,obj,fieldID,val); + } + void SetBooleanField(jobject obj, jfieldID fieldID, + jboolean val) { + functions->SetBooleanField(this,obj,fieldID,val); + } + void SetByteField(jobject obj, jfieldID fieldID, + jbyte val) { + functions->SetByteField(this,obj,fieldID,val); + } + void SetCharField(jobject obj, jfieldID fieldID, + jchar val) { + functions->SetCharField(this,obj,fieldID,val); + } + void SetShortField(jobject obj, jfieldID fieldID, + jshort val) { + functions->SetShortField(this,obj,fieldID,val); + } + void SetIntField(jobject obj, jfieldID fieldID, + jint val) { + functions->SetIntField(this,obj,fieldID,val); + } + void SetLongField(jobject obj, jfieldID fieldID, + jlong val) { + functions->SetLongField(this,obj,fieldID,val); + } + void SetFloatField(jobject obj, jfieldID fieldID, + jfloat val) { + functions->SetFloatField(this,obj,fieldID,val); + } + void SetDoubleField(jobject obj, jfieldID fieldID, + jdouble val) { + functions->SetDoubleField(this,obj,fieldID,val); + } + + jmethodID GetStaticMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticMethodID(this,clazz,name,sig); + } + + jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, + ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->CallStaticObjectMethodV(this,clazz,methodID,args); + } + jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, + jvalue *args) { + return functions->CallStaticObjectMethodA(this,clazz,methodID,args); + } + + jboolean CallStaticBooleanMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jboolean CallStaticBooleanMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + } + jboolean CallStaticBooleanMethodA(jclass clazz, + jmethodID methodID, jvalue *args) { + return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); + } + + jbyte CallStaticByteMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallStaticByteMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jbyte CallStaticByteMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticByteMethodV(this,clazz,methodID,args); + } + jbyte CallStaticByteMethodA(jclass clazz, + jmethodID methodID, jvalue *args) { + return functions->CallStaticByteMethodA(this,clazz,methodID,args); + } + + jchar CallStaticCharMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallStaticCharMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jchar CallStaticCharMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticCharMethodV(this,clazz,methodID,args); + } + jchar CallStaticCharMethodA(jclass clazz, + jmethodID methodID, jvalue *args) { + return functions->CallStaticCharMethodA(this,clazz,methodID,args); + } + + jshort CallStaticShortMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallStaticShortMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jshort CallStaticShortMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticShortMethodV(this,clazz,methodID,args); + } + jshort CallStaticShortMethodA(jclass clazz, + jmethodID methodID, jvalue *args) { + return functions->CallStaticShortMethodA(this,clazz,methodID,args); + } + + jint CallStaticIntMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallStaticIntMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jint CallStaticIntMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticIntMethodV(this,clazz,methodID,args); + } + jint CallStaticIntMethodA(jclass clazz, + jmethodID methodID, jvalue *args) { + return functions->CallStaticIntMethodA(this,clazz,methodID,args); + } + + jlong CallStaticLongMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallStaticLongMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jlong CallStaticLongMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticLongMethodV(this,clazz,methodID,args); + } + jlong CallStaticLongMethodA(jclass clazz, + jmethodID methodID, jvalue *args) { + return functions->CallStaticLongMethodA(this,clazz,methodID,args); + } + + jfloat CallStaticFloatMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jfloat CallStaticFloatMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticFloatMethodV(this,clazz,methodID,args); + } + jfloat CallStaticFloatMethodA(jclass clazz, + jmethodID methodID, jvalue *args) { + return functions->CallStaticFloatMethodA(this,clazz,methodID,args); + } + + jdouble CallStaticDoubleMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jdouble CallStaticDoubleMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + } + jdouble CallStaticDoubleMethodA(jclass clazz, + jmethodID methodID, jvalue *args) { + return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); + } + + void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallStaticVoidMethodV(this,cls,methodID,args); + va_end(args); + } + void CallStaticVoidMethodV(jclass cls, jmethodID methodID, + va_list args) { + functions->CallStaticVoidMethodV(this,cls,methodID,args); + } + void CallStaticVoidMethodA(jclass cls, jmethodID methodID, + jvalue * args) { + functions->CallStaticVoidMethodA(this,cls,methodID,args); + } + + jfieldID GetStaticFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticFieldID(this,clazz,name,sig); + } + jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticObjectField(this,clazz,fieldID); + } + jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticBooleanField(this,clazz,fieldID); + } + jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticByteField(this,clazz,fieldID); + } + jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticCharField(this,clazz,fieldID); + } + jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticShortField(this,clazz,fieldID); + } + jint GetStaticIntField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticIntField(this,clazz,fieldID); + } + jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticLongField(this,clazz,fieldID); + } + jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticFloatField(this,clazz,fieldID); + } + jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticDoubleField(this,clazz,fieldID); + } + + void SetStaticObjectField(jclass clazz, jfieldID fieldID, + jobject value) { + functions->SetStaticObjectField(this,clazz,fieldID,value); + } + void SetStaticBooleanField(jclass clazz, jfieldID fieldID, + jboolean value) { + functions->SetStaticBooleanField(this,clazz,fieldID,value); + } + void SetStaticByteField(jclass clazz, jfieldID fieldID, + jbyte value) { + functions->SetStaticByteField(this,clazz,fieldID,value); + } + void SetStaticCharField(jclass clazz, jfieldID fieldID, + jchar value) { + functions->SetStaticCharField(this,clazz,fieldID,value); + } + void SetStaticShortField(jclass clazz, jfieldID fieldID, + jshort value) { + functions->SetStaticShortField(this,clazz,fieldID,value); + } + void SetStaticIntField(jclass clazz, jfieldID fieldID, + jint value) { + functions->SetStaticIntField(this,clazz,fieldID,value); + } + void SetStaticLongField(jclass clazz, jfieldID fieldID, + jlong value) { + functions->SetStaticLongField(this,clazz,fieldID,value); + } + void SetStaticFloatField(jclass clazz, jfieldID fieldID, + jfloat value) { + functions->SetStaticFloatField(this,clazz,fieldID,value); + } + void SetStaticDoubleField(jclass clazz, jfieldID fieldID, + jdouble value) { + functions->SetStaticDoubleField(this,clazz,fieldID,value); + } + + jstring NewString(const jchar *unicode, jsize len) { + return functions->NewString(this,unicode,len); + } + jsize GetStringLength(jstring str) { + return functions->GetStringLength(this,str); + } + const jchar *GetStringChars(jstring str, jboolean *isCopy) { + return functions->GetStringChars(this,str,isCopy); + } + void ReleaseStringChars(jstring str, const jchar *chars) { + functions->ReleaseStringChars(this,str,chars); + } + + jstring NewStringUTF(const char *utf) { + return functions->NewStringUTF(this,utf); + } + jsize GetStringUTFLength(jstring str) { + return functions->GetStringUTFLength(this,str); + } + const char* GetStringUTFChars(jstring str, jboolean *isCopy) { + return functions->GetStringUTFChars(this,str,isCopy); + } + void ReleaseStringUTFChars(jstring str, const char* chars) { + functions->ReleaseStringUTFChars(this,str,chars); + } + + jsize GetArrayLength(jarray array) { + return functions->GetArrayLength(this,array); + } + + jobjectArray NewObjectArray(jsize len, jclass clazz, + jobject init) { + return functions->NewObjectArray(this,len,clazz,init); + } + jobject GetObjectArrayElement(jobjectArray array, jsize index) { + return functions->GetObjectArrayElement(this,array,index); + } + void SetObjectArrayElement(jobjectArray array, jsize index, + jobject val) { + functions->SetObjectArrayElement(this,array,index,val); + } + + jbooleanArray NewBooleanArray(jsize len) { + return functions->NewBooleanArray(this,len); + } + jbyteArray NewByteArray(jsize len) { + return functions->NewByteArray(this,len); + } + jcharArray NewCharArray(jsize len) { + return functions->NewCharArray(this,len); + } + jshortArray NewShortArray(jsize len) { + return functions->NewShortArray(this,len); + } + jintArray NewIntArray(jsize len) { + return functions->NewIntArray(this,len); + } + jlongArray NewLongArray(jsize len) { + return functions->NewLongArray(this,len); + } + jfloatArray NewFloatArray(jsize len) { + return functions->NewFloatArray(this,len); + } + jdoubleArray NewDoubleArray(jsize len) { + return functions->NewDoubleArray(this,len); + } + + jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { + return functions->GetBooleanArrayElements(this,array,isCopy); + } + jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) { + return functions->GetByteArrayElements(this,array,isCopy); + } + jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) { + return functions->GetCharArrayElements(this,array,isCopy); + } + jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) { + return functions->GetShortArrayElements(this,array,isCopy); + } + jint * GetIntArrayElements(jintArray array, jboolean *isCopy) { + return functions->GetIntArrayElements(this,array,isCopy); + } + jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) { + return functions->GetLongArrayElements(this,array,isCopy); + } + jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { + return functions->GetFloatArrayElements(this,array,isCopy); + } + jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { + return functions->GetDoubleArrayElements(this,array,isCopy); + } + + void ReleaseBooleanArrayElements(jbooleanArray array, + jboolean *elems, + jint mode) { + functions->ReleaseBooleanArrayElements(this,array,elems,mode); + } + void ReleaseByteArrayElements(jbyteArray array, + jbyte *elems, + jint mode) { + functions->ReleaseByteArrayElements(this,array,elems,mode); + } + void ReleaseCharArrayElements(jcharArray array, + jchar *elems, + jint mode) { + functions->ReleaseCharArrayElements(this,array,elems,mode); + } + void ReleaseShortArrayElements(jshortArray array, + jshort *elems, + jint mode) { + functions->ReleaseShortArrayElements(this,array,elems,mode); + } + void ReleaseIntArrayElements(jintArray array, + jint *elems, + jint mode) { + functions->ReleaseIntArrayElements(this,array,elems,mode); + } + void ReleaseLongArrayElements(jlongArray array, + jlong *elems, + jint mode) { + functions->ReleaseLongArrayElements(this,array,elems,mode); + } + void ReleaseFloatArrayElements(jfloatArray array, + jfloat *elems, + jint mode) { + functions->ReleaseFloatArrayElements(this,array,elems,mode); + } + void ReleaseDoubleArrayElements(jdoubleArray array, + jdouble *elems, + jint mode) { + functions->ReleaseDoubleArrayElements(this,array,elems,mode); + } + + void GetBooleanArrayRegion(jbooleanArray array, + jsize start, jsize len, jboolean *buf) { + functions->GetBooleanArrayRegion(this,array,start,len,buf); + } + void GetByteArrayRegion(jbyteArray array, + jsize start, jsize len, jbyte *buf) { + functions->GetByteArrayRegion(this,array,start,len,buf); + } + void GetCharArrayRegion(jcharArray array, + jsize start, jsize len, jchar *buf) { + functions->GetCharArrayRegion(this,array,start,len,buf); + } + void GetShortArrayRegion(jshortArray array, + jsize start, jsize len, jshort *buf) { + functions->GetShortArrayRegion(this,array,start,len,buf); + } + void GetIntArrayRegion(jintArray array, + jsize start, jsize len, jint *buf) { + functions->GetIntArrayRegion(this,array,start,len,buf); + } + void GetLongArrayRegion(jlongArray array, + jsize start, jsize len, jlong *buf) { + functions->GetLongArrayRegion(this,array,start,len,buf); + } + void GetFloatArrayRegion(jfloatArray array, + jsize start, jsize len, jfloat *buf) { + functions->GetFloatArrayRegion(this,array,start,len,buf); + } + void GetDoubleArrayRegion(jdoubleArray array, + jsize start, jsize len, jdouble *buf) { + functions->GetDoubleArrayRegion(this,array,start,len,buf); + } + + void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, + jboolean *buf) { + functions->SetBooleanArrayRegion(this,array,start,len,buf); + } + void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, + jbyte *buf) { + functions->SetByteArrayRegion(this,array,start,len,buf); + } + void SetCharArrayRegion(jcharArray array, jsize start, jsize len, + jchar *buf) { + functions->SetCharArrayRegion(this,array,start,len,buf); + } + void SetShortArrayRegion(jshortArray array, jsize start, jsize len, + jshort *buf) { + functions->SetShortArrayRegion(this,array,start,len,buf); + } + void SetIntArrayRegion(jintArray array, jsize start, jsize len, + jint *buf) { + functions->SetIntArrayRegion(this,array,start,len,buf); + } + void SetLongArrayRegion(jlongArray array, jsize start, jsize len, + jlong *buf) { + functions->SetLongArrayRegion(this,array,start,len,buf); + } + void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, + jfloat *buf) { + functions->SetFloatArrayRegion(this,array,start,len,buf); + } + void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, + jdouble *buf) { + functions->SetDoubleArrayRegion(this,array,start,len,buf); + } + + jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, + jint nMethods) { + return functions->RegisterNatives(this,clazz,methods,nMethods); + } + jint UnregisterNatives(jclass clazz) { + return functions->UnregisterNatives(this,clazz); + } + + jint MonitorEnter(jobject obj) { + return functions->MonitorEnter(this,obj); + } + jint MonitorExit(jobject obj) { + return functions->MonitorExit(this,obj); + } + + jint GetJavaVM(JavaVM **vm) { + return functions->GetJavaVM(this,vm); + } + +#endif /* __cplusplus */ +}; + +/* These structures will be VM-specific. */ + +typedef struct JDK1_1InitArgs { + jint version; + + char **properties; + jint checkSource; + jint nativeStackSize; + jint javaStackSize; + jint minHeapSize; + jint maxHeapSize; + jint verifyMode; + char *classpath; + + jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args); + void (JNICALL *exit)(jint code); + void (JNICALL *abort)(); + + jint enableClassGC; + jint enableVerboseGC; + jint disableAsyncGC; + jint verbose; + jboolean debugging; + jint debugPort; +} JDK1_1InitArgs; + +typedef struct JDK1_1AttachArgs { + void * __padding; /* C compilers don't allow empty structures. */ +} JDK1_1AttachArgs; + +/* End VM-specific. */ + +struct JNIInvokeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + jint (JNICALL *DestroyJavaVM)(JavaVM *vm); + + jint (JNICALL *AttachCurrentThread) + (JavaVM *vm, JNIEnv **penv, void *args); + + jint (JNICALL *DetachCurrentThread)(JavaVM *vm); +}; + +struct JavaVM_ { + const struct JNIInvokeInterface_ *functions; + void *reserved0; + void *reserved1; + void *reserved2; +#ifdef __cplusplus + + jint DestroyJavaVM() { + return functions->DestroyJavaVM(this); + } + jint AttachCurrentThread(JNIEnv **penv, void *args) { + return functions->AttachCurrentThread(this, penv, args); + } + jint DetachCurrentThread() { + return functions->DetachCurrentThread(this); + } + +#endif +}; + +JNI_PUBLIC_API(void) JNI_GetDefaultJavaVMInitArgs(void *); + +JNI_PUBLIC_API(jint) JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *); + +JNI_PUBLIC_API(jint) JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); +JNI_PUBLIC_API(jref) JNI_MakeLocalRef(JNIEnv *pJNIEnv, void *pHObject); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* JNI_H */ + + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/jni_md.h b/Src/nprt_plugin/gecko/1.8/win/include/jni_md.h new file mode 100644 index 00000000..d3e96ab4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/jni_md.h @@ -0,0 +1,182 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * + * This Original Code has been modified by IBM Corporation. + * Modifications made by IBM described herein are + * Copyright (c) International Business Machines + * Corporation, 2000 + * + * Modifications to Mozilla code or documentation + * identified per MPL Section 3.3 + * + * Date Modified by Description of modification + * 03/27/2000 IBM Corp. Set JNICALL to Optlink for + * use in OS2 + */ + +/******************************************************************************* + * Netscape version of jni_md.h -- depends on jri_md.h + ******************************************************************************/ + +#ifndef JNI_MD_H +#define JNI_MD_H + +#include "prtypes.h" /* needed for _declspec */ + +/******************************************************************************* + * WHAT'S UP WITH THIS FILE? + * + * This is where we define the mystical JNI_PUBLIC_API macro that works on all + * platforms. If you're running with Visual C++, Symantec C, or Borland's + * development environment on the PC, you're all set. Or if you're on the Mac + * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't + * matter. + + * Changes by sailesh on 9/26 + + * There are two symbols used in the declaration of the JNI functions + * and native code that uses the JNI: + * JNICALL - specifies the calling convention + * JNIEXPORT - specifies export status of the function + * + * The syntax to specify calling conventions is different in Win16 and + * Win32 - the brains at Micro$oft at work here. JavaSoft in their + * infinite wisdom cares for no platform other than Win32, and so they + * just define these two symbols as: + + #define JNIEXPORT __declspec(dllexport) + #define JNICALL __stdcall + + * We deal with this, in the way JRI defines the JRI_PUBLIC_API, by + * defining a macro called JNI_PUBLIC_API. Any of our developers who + * wish to use code for Win16 and Win32, _must_ use JNI_PUBLIC_API to + * be able to export functions properly. + + * Since we must also maintain compatibility with JavaSoft, we + * continue to define the symbol JNIEXPORT. However, use of this + * internally is deprecated, since it will cause a mess on Win16. + + * We _do not_ need a new symbol called JNICALL. Instead we + * redefine JNICALL in the same way JRI_CALLBACK was defined. + + ******************************************************************************/ + +/* DLL Entry modifiers... */ +#if defined(XP_OS2) +# ifdef XP_OS2_VACPP +# define JNI_PUBLIC_API(ResultType) ResultType _System +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNICALL _Optlink +# define JNIEXPORT +# else +# define JNI_PUBLIC_API(ResultType) ResultType +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNICALL +# define JNIEXPORT +# endif +/* Win32 */ +#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) +# include <windows.h> +# if defined(_MSC_VER) || defined(__GNUC__) +# if defined(WIN32) || defined(_WIN32) +# define JNI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType __stdcall +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) _declspec(dllexport) ResultType +# define JNICALL __stdcall +# else /* !_WIN32 */ +# if defined(_WINDLL) +# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds +# define JNICALL __loadds +# else /* !WINDLL */ +# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __export +# define JNICALL __export +# endif /* !WINDLL */ +# endif /* !_WIN32 */ +# elif defined(__BORLANDC__) +# if defined(WIN32) || defined(_WIN32) +# define JNI_PUBLIC_API(ResultType) __export ResultType +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) __export ResultType +# define JNICALL +# else /* !_WIN32 */ +# define JNI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds +# define JNICALL _loadds +# endif +# else +# error Unsupported PC development environment. +# endif +# ifndef IS_LITTLE_ENDIAN +# define IS_LITTLE_ENDIAN +# endif + /* This is the stuff inherited from JavaSoft .. */ +# define JNIEXPORT __declspec(dllexport) + + +/* Mac */ +#elif macintosh || Macintosh || THINK_C +# if defined(__MWERKS__) /* Metrowerks */ +# if !__option(enumsalwaysint) +# error You need to define 'Enums Always Int' for your project. +# endif +# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM +# if !__option(fourbyteints) +# error You need to define 'Struct Alignment: 68k' for your project. +# endif +# endif /* !GENERATINGCFM */ +# define JNI_PUBLIC_API(ResultType) __declspec(export) ResultType +# define JNI_PUBLIC_VAR(VarType) JNI_PUBLIC_API(VarType) +# define JNI_NATIVE_STUB(ResultType) JNI_PUBLIC_API(ResultType) +# elif defined(__SC__) /* Symantec */ +# error What are the Symantec defines? (warren@netscape.com) +# elif macintosh && applec /* MPW */ +# error Please upgrade to the latest MPW compiler (SC). +# else +# error Unsupported Mac development environment. +# endif +# define JNICALL + /* This is the stuff inherited from JavaSoft .. */ +# define JNIEXPORT + +/* Unix or else */ +#else +# define JNI_PUBLIC_API(ResultType) ResultType +# define JNI_PUBLIC_VAR(VarType) VarType +# define JNI_NATIVE_STUB(ResultType) ResultType +# define JNICALL + /* This is the stuff inherited from JavaSoft .. */ +# define JNIEXPORT +#endif + +#ifndef FAR /* for non-Win16 */ +#define FAR +#endif + +/* Get the rest of the stuff from jri_md.h */ +#include "jri_md.h" + +#endif /* JNI_MD_H */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/jri.h b/Src/nprt_plugin/gecko/1.8/win/include/jri.h new file mode 100644 index 00000000..f29945b9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/jri.h @@ -0,0 +1,689 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/******************************************************************************* + * Java Runtime Interface + ******************************************************************************/ + +#ifndef JRI_H +#define JRI_H + +#include "jritypes.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/******************************************************************************* + * JRIEnv + ******************************************************************************/ + +/* The type of the JRIEnv interface. */ +typedef struct JRIEnvInterface JRIEnvInterface; + +/* The type of a JRIEnv instance. */ +typedef const JRIEnvInterface* JRIEnv; + +/******************************************************************************* + * JRIEnv Operations + ******************************************************************************/ + +#define JRI_DefineClass(env, classLoader, buf, bufLen) \ + (((*(env))->DefineClass)(env, JRI_DefineClass_op, classLoader, buf, bufLen)) + +#define JRI_FindClass(env, name) \ + (((*(env))->FindClass)(env, JRI_FindClass_op, name)) + +#define JRI_Throw(env, obj) \ + (((*(env))->Throw)(env, JRI_Throw_op, obj)) + +#define JRI_ThrowNew(env, clazz, message) \ + (((*(env))->ThrowNew)(env, JRI_ThrowNew_op, clazz, message)) + +#define JRI_ExceptionOccurred(env) \ + (((*(env))->ExceptionOccurred)(env, JRI_ExceptionOccurred_op)) + +#define JRI_ExceptionDescribe(env) \ + (((*(env))->ExceptionDescribe)(env, JRI_ExceptionDescribe_op)) + +#define JRI_ExceptionClear(env) \ + (((*(env))->ExceptionClear)(env, JRI_ExceptionClear_op)) + +#define JRI_NewGlobalRef(env, ref) \ + (((*(env))->NewGlobalRef)(env, JRI_NewGlobalRef_op, ref)) + +#define JRI_DisposeGlobalRef(env, gref) \ + (((*(env))->DisposeGlobalRef)(env, JRI_DisposeGlobalRef_op, gref)) + +#define JRI_GetGlobalRef(env, gref) \ + (((*(env))->GetGlobalRef)(env, JRI_GetGlobalRef_op, gref)) + +#define JRI_SetGlobalRef(env, gref, ref) \ + (((*(env))->SetGlobalRef)(env, JRI_SetGlobalRef_op, gref, ref)) + +#define JRI_IsSameObject(env, a, b) \ + (((*(env))->IsSameObject)(env, JRI_IsSameObject_op, a, b)) + +#define JRI_NewObject(env) ((*(env))->NewObject) +#define JRI_NewObjectV(env, clazz, methodID, args) \ + (((*(env))->NewObjectV)(env, JRI_NewObject_op_va_list, clazz, methodID, args)) +#define JRI_NewObjectA(env, clazz, method, args) \ + (((*(env))->NewObjectA)(env, JRI_NewObject_op_array, clazz, methodID, args)) + +#define JRI_GetObjectClass(env, obj) \ + (((*(env))->GetObjectClass)(env, JRI_GetObjectClass_op, obj)) + +#define JRI_IsInstanceOf(env, obj, clazz) \ + (((*(env))->IsInstanceOf)(env, JRI_IsInstanceOf_op, obj, clazz)) + +#define JRI_GetMethodID(env, clazz, name, sig) \ + (((*(env))->GetMethodID)(env, JRI_GetMethodID_op, clazz, name, sig)) + +#define JRI_CallMethod(env) ((*(env))->CallMethod) +#define JRI_CallMethodV(env, obj, methodID, args) \ + (((*(env))->CallMethodV)(env, JRI_CallMethod_op_va_list, obj, methodID, args)) +#define JRI_CallMethodA(env, obj, methodID, args) \ + (((*(env))->CallMethodA)(env, JRI_CallMethod_op_array, obj, methodID, args)) + +#define JRI_CallMethodBoolean(env) ((*(env))->CallMethodBoolean) +#define JRI_CallMethodBooleanV(env, obj, methodID, args) \ + (((*(env))->CallMethodBooleanV)(env, JRI_CallMethodBoolean_op_va_list, obj, methodID, args)) +#define JRI_CallMethodBooleanA(env, obj, methodID, args) \ + (((*(env))->CallMethodBooleanA)(env, JRI_CallMethodBoolean_op_array, obj, methodID, args)) + +#define JRI_CallMethodByte(env) ((*(env))->CallMethodByte) +#define JRI_CallMethodByteV(env, obj, methodID, args) \ + (((*(env))->CallMethodByteV)(env, JRI_CallMethodByte_op_va_list, obj, methodID, args)) +#define JRI_CallMethodByteA(env, obj, methodID, args) \ + (((*(env))->CallMethodByteA)(env, JRI_CallMethodByte_op_array, obj, methodID, args)) + +#define JRI_CallMethodChar(env) ((*(env))->CallMethodChar) +#define JRI_CallMethodCharV(env, obj, methodID, args) \ + (((*(env))->CallMethodCharV)(env, JRI_CallMethodChar_op_va_list, obj, methodID, args)) +#define JRI_CallMethodCharA(env, obj, methodID, args) \ + (((*(env))->CallMethodCharA)(env, JRI_CallMethodChar_op_array, obj, methodID, args)) + +#define JRI_CallMethodShort(env) ((*(env))->CallMethodShort) +#define JRI_CallMethodShortV(env, obj, methodID, args) \ + (((*(env))->CallMethodShortV)(env, JRI_CallMethodShort_op_va_list, obj, methodID, args)) +#define JRI_CallMethodShortA(env, obj, methodID, args) \ + (((*(env))->CallMethodShortA)(env, JRI_CallMethodShort_op_array, obj, methodID, args)) + +#define JRI_CallMethodInt(env) ((*(env))->CallMethodInt) +#define JRI_CallMethodIntV(env, obj, methodID, args) \ + (((*(env))->CallMethodIntV)(env, JRI_CallMethodInt_op_va_list, obj, methodID, args)) +#define JRI_CallMethodIntA(env, obj, methodID, args) \ + (((*(env))->CallMethodIntA)(env, JRI_CallMethodInt_op_array, obj, methodID, args)) + +#define JRI_CallMethodLong(env) ((*(env))->CallMethodLong) +#define JRI_CallMethodLongV(env, obj, methodID, args) \ + (((*(env))->CallMethodLongV)(env, JRI_CallMethodLong_op_va_list, obj, methodID, args)) +#define JRI_CallMethodLongA(env, obj, methodID, args) \ + (((*(env))->CallMethodLongA)(env, JRI_CallMethodLong_op_array, obj, methodID, args)) + +#define JRI_CallMethodFloat(env) ((*(env))->CallMethodFloat) +#define JRI_CallMethodFloatV(env, obj, methodID, args) \ + (((*(env))->CallMethodFloatV)(env, JRI_CallMethodFloat_op_va_list, obj, methodID, args)) +#define JRI_CallMethodFloatA(env, obj, methodID, args) \ + (((*(env))->CallMethodFloatA)(env, JRI_CallMethodFloat_op_array, obj, methodID, args)) + +#define JRI_CallMethodDouble(env) ((*(env))->CallMethodDouble) +#define JRI_CallMethodDoubleV(env, obj, methodID, args) \ + (((*(env))->CallMethodDoubleV)(env, JRI_CallMethodDouble_op_va_list, obj, methodID, args)) +#define JRI_CallMethodDoubleA(env, obj, methodID, args) \ + (((*(env))->CallMethodDoubleA)(env, JRI_CallMethodDouble_op_array, obj, methodID, args)) + +#define JRI_GetFieldID(env, clazz, name, sig) \ + (((*(env))->GetFieldID)(env, JRI_GetFieldID_op, clazz, name, sig)) + +#define JRI_GetField(env, obj, fieldID) \ + (((*(env))->GetField)(env, JRI_GetField_op, obj, fieldID)) + +#define JRI_GetFieldBoolean(env, obj, fieldID) \ + (((*(env))->GetFieldBoolean)(env, JRI_GetFieldBoolean_op, obj, fieldID)) + +#define JRI_GetFieldByte(env, obj, fieldID) \ + (((*(env))->GetFieldByte)(env, JRI_GetFieldByte_op, obj, fieldID)) + +#define JRI_GetFieldChar(env, obj, fieldID) \ + (((*(env))->GetFieldChar)(env, JRI_GetFieldChar_op, obj, fieldID)) + +#define JRI_GetFieldShort(env, obj, fieldID) \ + (((*(env))->GetFieldShort)(env, JRI_GetFieldShort_op, obj, fieldID)) + +#define JRI_GetFieldInt(env, obj, fieldID) \ + (((*(env))->GetFieldInt)(env, JRI_GetFieldInt_op, obj, fieldID)) + +#define JRI_GetFieldLong(env, obj, fieldID) \ + (((*(env))->GetFieldLong)(env, JRI_GetFieldLong_op, obj, fieldID)) + +#define JRI_GetFieldFloat(env, obj, fieldID) \ + (((*(env))->GetFieldFloat)(env, JRI_GetFieldFloat_op, obj, fieldID)) + +#define JRI_GetFieldDouble(env, obj, fieldID) \ + (((*(env))->GetFieldDouble)(env, JRI_GetFieldDouble_op, obj, fieldID)) + +#define JRI_SetField(env, obj, fieldID, value) \ + (((*(env))->SetField)(env, JRI_SetField_op, obj, fieldID, value)) + +#define JRI_SetFieldBoolean(env, obj, fieldID, value) \ + (((*(env))->SetFieldBoolean)(env, JRI_SetFieldBoolean_op, obj, fieldID, value)) + +#define JRI_SetFieldByte(env, obj, fieldID, value) \ + (((*(env))->SetFieldByte)(env, JRI_SetFieldByte_op, obj, fieldID, value)) + +#define JRI_SetFieldChar(env, obj, fieldID, value) \ + (((*(env))->SetFieldChar)(env, JRI_SetFieldChar_op, obj, fieldID, value)) + +#define JRI_SetFieldShort(env, obj, fieldID, value) \ + (((*(env))->SetFieldShort)(env, JRI_SetFieldShort_op, obj, fieldID, value)) + +#define JRI_SetFieldInt(env, obj, fieldID, value) \ + (((*(env))->SetFieldInt)(env, JRI_SetFieldInt_op, obj, fieldID, value)) + +#define JRI_SetFieldLong(env, obj, fieldID, value) \ + (((*(env))->SetFieldLong)(env, JRI_SetFieldLong_op, obj, fieldID, value)) + +#define JRI_SetFieldFloat(env, obj, fieldID, value) \ + (((*(env))->SetFieldFloat)(env, JRI_SetFieldFloat_op, obj, fieldID, value)) + +#define JRI_SetFieldDouble(env, obj, fieldID, value) \ + (((*(env))->SetFieldDouble)(env, JRI_SetFieldDouble_op, obj, fieldID, value)) + +#define JRI_IsSubclassOf(env, a, b) \ + (((*(env))->IsSubclassOf)(env, JRI_IsSubclassOf_op, a, b)) + +#define JRI_GetStaticMethodID(env, clazz, name, sig) \ + (((*(env))->GetStaticMethodID)(env, JRI_GetStaticMethodID_op, clazz, name, sig)) + +#define JRI_CallStaticMethod(env) ((*(env))->CallStaticMethod) +#define JRI_CallStaticMethodV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodV)(env, JRI_CallStaticMethod_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodA)(env, JRI_CallStaticMethod_op_array, clazz, methodID, args)) + +#define JRI_CallStaticMethodBoolean(env) ((*(env))->CallStaticMethodBoolean) +#define JRI_CallStaticMethodBooleanV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodBooleanV)(env, JRI_CallStaticMethodBoolean_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodBooleanA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodBooleanA)(env, JRI_CallStaticMethodBoolean_op_array, clazz, methodID, args)) + +#define JRI_CallStaticMethodByte(env) ((*(env))->CallStaticMethodByte) +#define JRI_CallStaticMethodByteV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodByteV)(env, JRI_CallStaticMethodByte_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodByteA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodByteA)(env, JRI_CallStaticMethodByte_op_array, clazz, methodID, args)) + +#define JRI_CallStaticMethodChar(env) ((*(env))->CallStaticMethodChar) +#define JRI_CallStaticMethodCharV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodCharV)(env, JRI_CallStaticMethodChar_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodCharA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodCharA)(env, JRI_CallStaticMethodChar_op_array, clazz, methodID, args)) + +#define JRI_CallStaticMethodShort(env) ((*(env))->CallStaticMethodShort) +#define JRI_CallStaticMethodShortV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodShortV)(env, JRI_CallStaticMethodShort_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodShortA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodShortA)(env, JRI_CallStaticMethodShort_op_array, clazz, methodID, args)) + +#define JRI_CallStaticMethodInt(env) ((*(env))->CallStaticMethodInt) +#define JRI_CallStaticMethodIntV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodIntV)(env, JRI_CallStaticMethodInt_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodIntA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodIntA)(env, JRI_CallStaticMethodInt_op_array, clazz, methodID, args)) + +#define JRI_CallStaticMethodLong(env) ((*(env))->CallStaticMethodLong) +#define JRI_CallStaticMethodLongV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodLongV)(env, JRI_CallStaticMethodLong_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodLongA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodLongA)(env, JRI_CallStaticMethodLong_op_array, clazz, methodID, args)) + +#define JRI_CallStaticMethodFloat(env) ((*(env))->CallStaticMethodFloat) +#define JRI_CallStaticMethodFloatV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodFloatV)(env, JRI_CallStaticMethodFloat_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodFloatA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodFloatA)(env, JRI_CallStaticMethodFloat_op_array, clazz, methodID, args)) + +#define JRI_CallStaticMethodDouble(env) ((*(env))->CallStaticMethodDouble) +#define JRI_CallStaticMethodDoubleV(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodDoubleV)(env, JRI_CallStaticMethodDouble_op_va_list, clazz, methodID, args)) +#define JRI_CallStaticMethodDoubleA(env, clazz, methodID, args) \ + (((*(env))->CallStaticMethodDoubleA)(env, JRI_CallStaticMethodDouble_op_array, clazz, methodID, args)) + +#define JRI_GetStaticFieldID(env, clazz, name, sig) \ + (((*(env))->GetStaticFieldID)(env, JRI_GetStaticFieldID_op, clazz, name, sig)) + +#define JRI_GetStaticField(env, clazz, fieldID) \ + (((*(env))->GetStaticField)(env, JRI_GetStaticField_op, clazz, fieldID)) + +#define JRI_GetStaticFieldBoolean(env, clazz, fieldID) \ + (((*(env))->GetStaticFieldBoolean)(env, JRI_GetStaticFieldBoolean_op, clazz, fieldID)) + +#define JRI_GetStaticFieldByte(env, clazz, fieldID) \ + (((*(env))->GetStaticFieldByte)(env, JRI_GetStaticFieldByte_op, clazz, fieldID)) + +#define JRI_GetStaticFieldChar(env, clazz, fieldID) \ + (((*(env))->GetStaticFieldChar)(env, JRI_GetStaticFieldChar_op, clazz, fieldID)) + +#define JRI_GetStaticFieldShort(env, clazz, fieldID) \ + (((*(env))->GetStaticFieldShort)(env, JRI_GetStaticFieldShort_op, clazz, fieldID)) + +#define JRI_GetStaticFieldInt(env, clazz, fieldID) \ + (((*(env))->GetStaticFieldInt)(env, JRI_GetStaticFieldInt_op, clazz, fieldID)) + +#define JRI_GetStaticFieldLong(env, clazz, fieldID) \ + (((*(env))->GetStaticFieldLong)(env, JRI_GetStaticFieldLong_op, clazz, fieldID)) + +#define JRI_GetStaticFieldFloat(env, clazz, fieldID) \ + (((*(env))->GetStaticFieldFloat)(env, JRI_GetStaticFieldFloat_op, clazz, fieldID)) + +#define JRI_GetStaticFieldDouble(env, clazz, fieldID) \ + (((*(env))->GetStaticFieldDouble)(env, JRI_GetStaticFieldDouble_op, clazz, fieldID)) + +#define JRI_SetStaticField(env, clazz, fieldID, value) \ + (((*(env))->SetStaticField)(env, JRI_SetStaticField_op, clazz, fieldID, value)) + +#define JRI_SetStaticFieldBoolean(env, clazz, fieldID, value) \ + (((*(env))->SetStaticFieldBoolean)(env, JRI_SetStaticFieldBoolean_op, clazz, fieldID, value)) + +#define JRI_SetStaticFieldByte(env, clazz, fieldID, value) \ + (((*(env))->SetStaticFieldByte)(env, JRI_SetStaticFieldByte_op, clazz, fieldID, value)) + +#define JRI_SetStaticFieldChar(env, clazz, fieldID, value) \ + (((*(env))->SetStaticFieldChar)(env, JRI_SetStaticFieldChar_op, clazz, fieldID, value)) + +#define JRI_SetStaticFieldShort(env, clazz, fieldID, value) \ + (((*(env))->SetStaticFieldShort)(env, JRI_SetStaticFieldShort_op, clazz, fieldID, value)) + +#define JRI_SetStaticFieldInt(env, clazz, fieldID, value) \ + (((*(env))->SetStaticFieldInt)(env, JRI_SetStaticFieldInt_op, clazz, fieldID, value)) + +#define JRI_SetStaticFieldLong(env, clazz, fieldID, value) \ + (((*(env))->SetStaticFieldLong)(env, JRI_SetStaticFieldLong_op, clazz, fieldID, value)) + +#define JRI_SetStaticFieldFloat(env, clazz, fieldID, value) \ + (((*(env))->SetStaticFieldFloat)(env, JRI_SetStaticFieldFloat_op, clazz, fieldID, value)) + +#define JRI_SetStaticFieldDouble(env, clazz, fieldID, value) \ + (((*(env))->SetStaticFieldDouble)(env, JRI_SetStaticFieldDouble_op, clazz, fieldID, value)) + +#define JRI_NewString(env, unicode, len) \ + (((*(env))->NewString)(env, JRI_NewString_op, unicode, len)) + +#define JRI_GetStringLength(env, string) \ + (((*(env))->GetStringLength)(env, JRI_GetStringLength_op, string)) + +#define JRI_GetStringChars(env, string) \ + (((*(env))->GetStringChars)(env, JRI_GetStringChars_op, string)) + +#define JRI_NewStringUTF(env, utf, len) \ + (((*(env))->NewStringUTF)(env, JRI_NewStringUTF_op, utf, len)) + +#define JRI_GetStringUTFLength(env, string) \ + (((*(env))->GetStringUTFLength)(env, JRI_GetStringUTFLength_op, string)) + +#define JRI_GetStringUTFChars(env, string) \ + (((*(env))->GetStringUTFChars)(env, JRI_GetStringUTFChars_op, string)) + +#define JRI_NewScalarArray(env, length, elementSig, initialElements) \ + (((*(env))->NewScalarArray)(env, JRI_NewScalarArray_op, length, elementSig, initialElements)) + +#define JRI_GetScalarArrayLength(env, array) \ + (((*(env))->GetScalarArrayLength)(env, JRI_GetScalarArrayLength_op, array)) + +#define JRI_GetScalarArrayElements(env, array) \ + (((*(env))->GetScalarArrayElements)(env, JRI_GetScalarArrayElements_op, array)) + +#define JRI_NewObjectArray(env, length, elementClass, initialElement) \ + (((*(env))->NewObjectArray)(env, JRI_NewObjectArray_op, length, elementClass, initialElement)) + +#define JRI_GetObjectArrayLength(env, array) \ + (((*(env))->GetObjectArrayLength)(env, JRI_GetObjectArrayLength_op, array)) + +#define JRI_GetObjectArrayElement(env, array, index) \ + (((*(env))->GetObjectArrayElement)(env, JRI_GetObjectArrayElement_op, array, index)) + +#define JRI_SetObjectArrayElement(env, array, index, value) \ + (((*(env))->SetObjectArrayElement)(env, JRI_SetObjectArrayElement_op, array, index, value)) + +#define JRI_RegisterNatives(env, clazz, nameAndSigArray, nativeProcArray) \ + (((*(env))->RegisterNatives)(env, JRI_RegisterNatives_op, clazz, nameAndSigArray, nativeProcArray)) + +#define JRI_UnregisterNatives(env, clazz) \ + (((*(env))->UnregisterNatives)(env, JRI_UnregisterNatives_op, clazz)) + +#define JRI_NewStringPlatform(env, string, len, encoding, encodingLength) \ + (((*(env))->NewStringPlatform)(env, JRI_NewStringPlatform_op, string, len, encoding, encodingLength)) + +#define JRI_GetStringPlatformChars(env, string, encoding, encodingLength) \ + (((*(env))->GetStringPlatformChars)(env, JRI_GetStringPlatformChars_op, string, encoding, encodingLength)) + + +/******************************************************************************* + * JRIEnv Interface + ******************************************************************************/ + +struct java_lang_ClassLoader; +struct java_lang_Class; +struct java_lang_Throwable; +struct java_lang_Object; +struct java_lang_String; + +struct JRIEnvInterface { + void* reserved0; + void* reserved1; + void* reserved2; + void* reserved3; + struct java_lang_Class* (*FindClass)(JRIEnv* env, jint op, const char* a); + void (*Throw)(JRIEnv* env, jint op, struct java_lang_Throwable* a); + void (*ThrowNew)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b); + struct java_lang_Throwable* (*ExceptionOccurred)(JRIEnv* env, jint op); + void (*ExceptionDescribe)(JRIEnv* env, jint op); + void (*ExceptionClear)(JRIEnv* env, jint op); + jglobal (*NewGlobalRef)(JRIEnv* env, jint op, void* a); + void (*DisposeGlobalRef)(JRIEnv* env, jint op, jglobal a); + void* (*GetGlobalRef)(JRIEnv* env, jint op, jglobal a); + void (*SetGlobalRef)(JRIEnv* env, jint op, jglobal a, void* b); + jbool (*IsSameObject)(JRIEnv* env, jint op, void* a, void* b); + void* (*NewObject)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + void* (*NewObjectV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + void* (*NewObjectA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + struct java_lang_Class* (*GetObjectClass)(JRIEnv* env, jint op, void* a); + jbool (*IsInstanceOf)(JRIEnv* env, jint op, void* a, struct java_lang_Class* b); + jint (*GetMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c); + void* (*CallMethod)(JRIEnv* env, jint op, void* a, jint b, ...); + void* (*CallMethodV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + void* (*CallMethodA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jbool (*CallMethodBoolean)(JRIEnv* env, jint op, void* a, jint b, ...); + jbool (*CallMethodBooleanV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + jbool (*CallMethodBooleanA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jbyte (*CallMethodByte)(JRIEnv* env, jint op, void* a, jint b, ...); + jbyte (*CallMethodByteV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + jbyte (*CallMethodByteA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jchar (*CallMethodChar)(JRIEnv* env, jint op, void* a, jint b, ...); + jchar (*CallMethodCharV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + jchar (*CallMethodCharA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jshort (*CallMethodShort)(JRIEnv* env, jint op, void* a, jint b, ...); + jshort (*CallMethodShortV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + jshort (*CallMethodShortA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jint (*CallMethodInt)(JRIEnv* env, jint op, void* a, jint b, ...); + jint (*CallMethodIntV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + jint (*CallMethodIntA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jlong (*CallMethodLong)(JRIEnv* env, jint op, void* a, jint b, ...); + jlong (*CallMethodLongV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + jlong (*CallMethodLongA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jfloat (*CallMethodFloat)(JRIEnv* env, jint op, void* a, jint b, ...); + jfloat (*CallMethodFloatV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + jfloat (*CallMethodFloatA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jdouble (*CallMethodDouble)(JRIEnv* env, jint op, void* a, jint b, ...); + jdouble (*CallMethodDoubleV)(JRIEnv* env, jint op, void* a, jint b, va_list c); + jdouble (*CallMethodDoubleA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); + jint (*GetFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c); + void* (*GetField)(JRIEnv* env, jint op, void* a, jint b); + jbool (*GetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b); + jbyte (*GetFieldByte)(JRIEnv* env, jint op, void* a, jint b); + jchar (*GetFieldChar)(JRIEnv* env, jint op, void* a, jint b); + jshort (*GetFieldShort)(JRIEnv* env, jint op, void* a, jint b); + jint (*GetFieldInt)(JRIEnv* env, jint op, void* a, jint b); + jlong (*GetFieldLong)(JRIEnv* env, jint op, void* a, jint b); + jfloat (*GetFieldFloat)(JRIEnv* env, jint op, void* a, jint b); + jdouble (*GetFieldDouble)(JRIEnv* env, jint op, void* a, jint b); + void (*SetField)(JRIEnv* env, jint op, void* a, jint b, void* c); + void (*SetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b, jbool c); + void (*SetFieldByte)(JRIEnv* env, jint op, void* a, jint b, jbyte c); + void (*SetFieldChar)(JRIEnv* env, jint op, void* a, jint b, jchar c); + void (*SetFieldShort)(JRIEnv* env, jint op, void* a, jint b, jshort c); + void (*SetFieldInt)(JRIEnv* env, jint op, void* a, jint b, jint c); + void (*SetFieldLong)(JRIEnv* env, jint op, void* a, jint b, jlong c); + void (*SetFieldFloat)(JRIEnv* env, jint op, void* a, jint b, jfloat c); + void (*SetFieldDouble)(JRIEnv* env, jint op, void* a, jint b, jdouble c); + jbool (*IsSubclassOf)(JRIEnv* env, jint op, struct java_lang_Class* a, struct java_lang_Class* b); + jint (*GetStaticMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c); + void* (*CallStaticMethod)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + void* (*CallStaticMethodV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + void* (*CallStaticMethodA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jbool (*CallStaticMethodBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + jbool (*CallStaticMethodBooleanV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + jbool (*CallStaticMethodBooleanA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jbyte (*CallStaticMethodByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + jbyte (*CallStaticMethodByteV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + jbyte (*CallStaticMethodByteA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jchar (*CallStaticMethodChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + jchar (*CallStaticMethodCharV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + jchar (*CallStaticMethodCharA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jshort (*CallStaticMethodShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + jshort (*CallStaticMethodShortV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + jshort (*CallStaticMethodShortA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jint (*CallStaticMethodInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + jint (*CallStaticMethodIntV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + jint (*CallStaticMethodIntA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jlong (*CallStaticMethodLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + jlong (*CallStaticMethodLongV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + jlong (*CallStaticMethodLongA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jfloat (*CallStaticMethodFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + jfloat (*CallStaticMethodFloatV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + jfloat (*CallStaticMethodFloatA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jdouble (*CallStaticMethodDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); + jdouble (*CallStaticMethodDoubleV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); + jdouble (*CallStaticMethodDoubleA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); + jint (*GetStaticFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c); + void* (*GetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + jbool (*GetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + jbyte (*GetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + jchar (*GetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + jshort (*GetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + jint (*GetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + jlong (*GetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + jfloat (*GetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + jdouble (*GetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); + void (*SetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, void* c); + void (*SetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbool c); + void (*SetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbyte c); + void (*SetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jchar c); + void (*SetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jshort c); + void (*SetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jint c); + void (*SetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jlong c); + void (*SetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jfloat c); + void (*SetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jdouble c); + struct java_lang_String* (*NewString)(JRIEnv* env, jint op, const jchar* a, jint b); + jint (*GetStringLength)(JRIEnv* env, jint op, struct java_lang_String* a); + const jchar* (*GetStringChars)(JRIEnv* env, jint op, struct java_lang_String* a); + struct java_lang_String* (*NewStringUTF)(JRIEnv* env, jint op, const jbyte* a, jint b); + jint (*GetStringUTFLength)(JRIEnv* env, jint op, struct java_lang_String* a); + const jbyte* (*GetStringUTFChars)(JRIEnv* env, jint op, struct java_lang_String* a); + void* (*NewScalarArray)(JRIEnv* env, jint op, jint a, const char* b, const jbyte* c); + jint (*GetScalarArrayLength)(JRIEnv* env, jint op, void* a); + jbyte* (*GetScalarArrayElements)(JRIEnv* env, jint op, void* a); + void* (*NewObjectArray)(JRIEnv* env, jint op, jint a, struct java_lang_Class* b, void* c); + jint (*GetObjectArrayLength)(JRIEnv* env, jint op, void* a); + void* (*GetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b); + void (*SetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b, void* c); + void (*RegisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a, char** b, void** c); + void (*UnregisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a); + struct java_lang_Class* (*DefineClass)(JRIEnv* env, jint op, struct java_lang_ClassLoader* a, jbyte* b, jsize bLen); + struct java_lang_String* (*NewStringPlatform)(JRIEnv* env, jint op, const jbyte* a, jint b, const jbyte* c, jint d); + const jbyte* (*GetStringPlatformChars)(JRIEnv* env, jint op, struct java_lang_String* a, const jbyte* b, jint c); +}; + +/* +** **************************************************************************** +** JRIEnv Operation IDs +** *************************************************************************** +*/ + +typedef enum JRIEnvOperations { + JRI_Reserved0_op, + JRI_Reserved1_op, + JRI_Reserved2_op, + JRI_Reserved3_op, + JRI_FindClass_op, + JRI_Throw_op, + JRI_ThrowNew_op, + JRI_ExceptionOccurred_op, + JRI_ExceptionDescribe_op, + JRI_ExceptionClear_op, + JRI_NewGlobalRef_op, + JRI_DisposeGlobalRef_op, + JRI_GetGlobalRef_op, + JRI_SetGlobalRef_op, + JRI_IsSameObject_op, + JRI_NewObject_op, + JRI_NewObject_op_va_list, + JRI_NewObject_op_array, + JRI_GetObjectClass_op, + JRI_IsInstanceOf_op, + JRI_GetMethodID_op, + JRI_CallMethod_op, + JRI_CallMethod_op_va_list, + JRI_CallMethod_op_array, + JRI_CallMethodBoolean_op, + JRI_CallMethodBoolean_op_va_list, + JRI_CallMethodBoolean_op_array, + JRI_CallMethodByte_op, + JRI_CallMethodByte_op_va_list, + JRI_CallMethodByte_op_array, + JRI_CallMethodChar_op, + JRI_CallMethodChar_op_va_list, + JRI_CallMethodChar_op_array, + JRI_CallMethodShort_op, + JRI_CallMethodShort_op_va_list, + JRI_CallMethodShort_op_array, + JRI_CallMethodInt_op, + JRI_CallMethodInt_op_va_list, + JRI_CallMethodInt_op_array, + JRI_CallMethodLong_op, + JRI_CallMethodLong_op_va_list, + JRI_CallMethodLong_op_array, + JRI_CallMethodFloat_op, + JRI_CallMethodFloat_op_va_list, + JRI_CallMethodFloat_op_array, + JRI_CallMethodDouble_op, + JRI_CallMethodDouble_op_va_list, + JRI_CallMethodDouble_op_array, + JRI_GetFieldID_op, + JRI_GetField_op, + JRI_GetFieldBoolean_op, + JRI_GetFieldByte_op, + JRI_GetFieldChar_op, + JRI_GetFieldShort_op, + JRI_GetFieldInt_op, + JRI_GetFieldLong_op, + JRI_GetFieldFloat_op, + JRI_GetFieldDouble_op, + JRI_SetField_op, + JRI_SetFieldBoolean_op, + JRI_SetFieldByte_op, + JRI_SetFieldChar_op, + JRI_SetFieldShort_op, + JRI_SetFieldInt_op, + JRI_SetFieldLong_op, + JRI_SetFieldFloat_op, + JRI_SetFieldDouble_op, + JRI_IsSubclassOf_op, + JRI_GetStaticMethodID_op, + JRI_CallStaticMethod_op, + JRI_CallStaticMethod_op_va_list, + JRI_CallStaticMethod_op_array, + JRI_CallStaticMethodBoolean_op, + JRI_CallStaticMethodBoolean_op_va_list, + JRI_CallStaticMethodBoolean_op_array, + JRI_CallStaticMethodByte_op, + JRI_CallStaticMethodByte_op_va_list, + JRI_CallStaticMethodByte_op_array, + JRI_CallStaticMethodChar_op, + JRI_CallStaticMethodChar_op_va_list, + JRI_CallStaticMethodChar_op_array, + JRI_CallStaticMethodShort_op, + JRI_CallStaticMethodShort_op_va_list, + JRI_CallStaticMethodShort_op_array, + JRI_CallStaticMethodInt_op, + JRI_CallStaticMethodInt_op_va_list, + JRI_CallStaticMethodInt_op_array, + JRI_CallStaticMethodLong_op, + JRI_CallStaticMethodLong_op_va_list, + JRI_CallStaticMethodLong_op_array, + JRI_CallStaticMethodFloat_op, + JRI_CallStaticMethodFloat_op_va_list, + JRI_CallStaticMethodFloat_op_array, + JRI_CallStaticMethodDouble_op, + JRI_CallStaticMethodDouble_op_va_list, + JRI_CallStaticMethodDouble_op_array, + JRI_GetStaticFieldID_op, + JRI_GetStaticField_op, + JRI_GetStaticFieldBoolean_op, + JRI_GetStaticFieldByte_op, + JRI_GetStaticFieldChar_op, + JRI_GetStaticFieldShort_op, + JRI_GetStaticFieldInt_op, + JRI_GetStaticFieldLong_op, + JRI_GetStaticFieldFloat_op, + JRI_GetStaticFieldDouble_op, + JRI_SetStaticField_op, + JRI_SetStaticFieldBoolean_op, + JRI_SetStaticFieldByte_op, + JRI_SetStaticFieldChar_op, + JRI_SetStaticFieldShort_op, + JRI_SetStaticFieldInt_op, + JRI_SetStaticFieldLong_op, + JRI_SetStaticFieldFloat_op, + JRI_SetStaticFieldDouble_op, + JRI_NewString_op, + JRI_GetStringLength_op, + JRI_GetStringChars_op, + JRI_NewStringUTF_op, + JRI_GetStringUTFLength_op, + JRI_GetStringUTFChars_op, + JRI_NewScalarArray_op, + JRI_GetScalarArrayLength_op, + JRI_GetScalarArrayElements_op, + JRI_NewObjectArray_op, + JRI_GetObjectArrayLength_op, + JRI_GetObjectArrayElement_op, + JRI_SetObjectArrayElement_op, + JRI_RegisterNatives_op, + JRI_UnregisterNatives_op, + JRI_DefineClass_op, + JRI_NewStringPlatform_op, + JRI_GetStringPlatformChars_op +} JRIEnvOperations; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* JRI_H */ +/******************************************************************************/ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/jri_md.h b/Src/nprt_plugin/gecko/1.8/win/include/jri_md.h new file mode 100644 index 00000000..f18093cd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/jri_md.h @@ -0,0 +1,565 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/******************************************************************************* + * Java Runtime Interface - Machine Dependent Types + ******************************************************************************/ + +#ifndef JRI_MD_H +#define JRI_MD_H + +#include <assert.h> +#include "prtypes.h" /* Needed for HAS_LONG_LONG ifdefs */ + +#ifdef __cplusplus +extern "C" { +#endif + +/******************************************************************************* + * WHAT'S UP WITH THIS FILE? + * + * This is where we define the mystical JRI_PUBLIC_API macro that works on all + * platforms. If you're running with Visual C++, Symantec C, or Borland's + * development environment on the PC, you're all set. Or if you're on the Mac + * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't + * matter. + * + * On UNIX though you probably care about a couple of other symbols though: + * IS_LITTLE_ENDIAN must be defined for little-endian systems + * HAVE_LONG_LONG must be defined on systems that have 'long long' integers + * HAVE_ALIGNED_LONGLONGS must be defined if long-longs must be 8 byte aligned + * HAVE_ALIGNED_DOUBLES must be defined if doubles must be 8 byte aligned + * IS_64 must be defined on 64-bit machines (like Dec Alpha) + ******************************************************************************/ + +/* DLL Entry modifiers... */ + +/* PC */ +#if defined(XP_OS2) +# ifdef XP_OS2_VACPP +# define JRI_PUBLIC_API(ResultType) ResultType _Optlink +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_CALLBACK +# else +# define JRI_PUBLIC_API(ResultType) ResultType +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_CALLBACK +# endif +#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) +# include <windows.h> +# if defined(_MSC_VER) || defined(__GNUC__) +# if defined(WIN32) || defined(_WIN32) +# define JRI_PUBLIC_API(ResultType) __declspec(dllexport) ResultType +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) __declspec(dllexport) VarType +# define JRI_PUBLIC_VAR_IMP(VarType) __declspec(dllimport) VarType +# define JRI_NATIVE_STUB(ResultType) __declspec(dllexport) ResultType +# define JRI_CALLBACK +# else /* !_WIN32 */ +# if defined(_WINDLL) +# define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds +# define JRI_CALLBACK __loadds +# else /* !WINDLL */ +# define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __export +# define JRI_CALLBACK __export +# endif /* !WINDLL */ +# endif /* !_WIN32 */ +# elif defined(__BORLANDC__) +# if defined(WIN32) || defined(_WIN32) +# define JRI_PUBLIC_API(ResultType) __export ResultType +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) __export VarType +# define JRI_PUBLIC_VAR_IMP(VarType) __import VarType +# define JRI_NATIVE_STUB(ResultType) __export ResultType +# define JRI_CALLBACK +# else /* !_WIN32 */ +# define JRI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) __cdecl __export VarType +# define JRI_PUBLIC_VAR_IMP(VarType) __cdecl __import VarType +# define JRI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds +# define JRI_CALLBACK _loadds +# endif +# else +# error Unsupported PC development environment. +# endif +# ifndef IS_LITTLE_ENDIAN +# define IS_LITTLE_ENDIAN +# endif + +/* Mac */ +#elif defined (macintosh) || Macintosh || THINK_C +# if defined(__MWERKS__) /* Metrowerks */ +# if !__option(enumsalwaysint) +# error You need to define 'Enums Always Int' for your project. +# endif +# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM +# if !__option(fourbyteints) +# error You need to define 'Struct Alignment: 68k' for your project. +# endif +# endif /* !GENERATINGCFM */ +# define JRI_PUBLIC_API(ResultType) __declspec(export) ResultType +# define JRI_PUBLIC_VAR(VarType) JRI_PUBLIC_API(VarType) +# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_API(VarType) +# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_API(VarType) +# define JRI_NATIVE_STUB(ResultType) JRI_PUBLIC_API(ResultType) +# elif defined(__SC__) /* Symantec */ +# error What are the Symantec defines? (warren@netscape.com) +# elif macintosh && applec /* MPW */ +# error Please upgrade to the latest MPW compiler (SC). +# else +# error Unsupported Mac development environment. +# endif +# define JRI_CALLBACK + +/* Unix or else */ +#else +# define JRI_PUBLIC_API(ResultType) ResultType +# define JRI_PUBLIC_VAR(VarType) VarType +# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) +# define JRI_NATIVE_STUB(ResultType) ResultType +# define JRI_CALLBACK +#endif + +#ifndef FAR /* for non-Win16 */ +#define FAR +#endif + +/******************************************************************************/ + +/* Java Scalar Types */ + +#if 0 /* now in jni.h */ +typedef short jchar; +typedef short jshort; +typedef float jfloat; +typedef double jdouble; +typedef juint jsize; +#endif + +/* moved from jni.h -- Sun's new jni.h doesn't have this anymore */ +#ifdef __cplusplus +typedef class _jobject *jref; +#else +typedef struct _jobject *jref; +#endif + +typedef unsigned char jbool; +typedef signed char jbyte; +#ifdef IS_64 /* XXX ok for alpha, but not right on all 64-bit architectures */ +typedef unsigned int juint; +typedef int jint; +#else +typedef unsigned long juint; +typedef long jint; +#endif + +/******************************************************************************* + * jlong : long long (64-bit signed integer type) support. + ******************************************************************************/ + +/* +** Bit masking macros. (n must be <= 31 to be portable) +*/ +#define JRI_BIT(n) ((juint)1 << (n)) +#define JRI_BITMASK(n) (JRI_BIT(n) - 1) + +#ifdef HAVE_LONG_LONG + +#ifdef OSF1 + +/* long is default 64-bit on OSF1, -std1 does not allow long long */ +typedef long jlong; +typedef unsigned long julong; +#define jlong_MAXINT 0x7fffffffffffffffL +#define jlong_MININT 0x8000000000000000L +#define jlong_ZERO 0x0L + +#elif (defined(WIN32) || defined(_WIN32)) + +typedef LONGLONG jlong; +typedef DWORDLONG julong; +#define jlong_MAXINT 0x7fffffffffffffffi64 +#define jlong_MININT 0x8000000000000000i64 +#define jlong_ZERO 0x0i64 + +#else + +typedef long long jlong; +typedef unsigned long long julong; +#define jlong_MAXINT 0x7fffffffffffffffLL +#define jlong_MININT 0x8000000000000000LL +#define jlong_ZERO 0x0LL + +#endif + +#define jlong_IS_ZERO(a) ((a) == 0) +#define jlong_EQ(a, b) ((a) == (b)) +#define jlong_NE(a, b) ((a) != (b)) +#define jlong_GE_ZERO(a) ((a) >= 0) +#define jlong_CMP(a, op, b) ((a) op (b)) + +#define jlong_AND(r, a, b) ((r) = (a) & (b)) +#define jlong_OR(r, a, b) ((r) = (a) | (b)) +#define jlong_XOR(r, a, b) ((r) = (a) ^ (b)) +#define jlong_OR2(r, a) ((r) = (r) | (a)) +#define jlong_NOT(r, a) ((r) = ~(a)) + +#define jlong_NEG(r, a) ((r) = -(a)) +#define jlong_ADD(r, a, b) ((r) = (a) + (b)) +#define jlong_SUB(r, a, b) ((r) = (a) - (b)) + +#define jlong_MUL(r, a, b) ((r) = (a) * (b)) +#define jlong_DIV(r, a, b) ((r) = (a) / (b)) +#define jlong_MOD(r, a, b) ((r) = (a) % (b)) + +#define jlong_SHL(r, a, b) ((r) = (a) << (b)) +#define jlong_SHR(r, a, b) ((r) = (a) >> (b)) +#define jlong_USHR(r, a, b) ((r) = (julong)(a) >> (b)) +#define jlong_ISHL(r, a, b) ((r) = ((jlong)(a)) << (b)) + +#define jlong_L2I(i, l) ((i) = (int)(l)) +#define jlong_L2UI(ui, l) ((ui) =(unsigned int)(l)) +#define jlong_L2F(f, l) ((f) = (l)) +#define jlong_L2D(d, l) ((d) = (l)) + +#define jlong_I2L(l, i) ((l) = (i)) +#define jlong_UI2L(l, ui) ((l) = (ui)) +#define jlong_F2L(l, f) ((l) = (f)) +#define jlong_D2L(l, d) ((l) = (d)) + +#define jlong_UDIVMOD(qp, rp, a, b) \ + (*(qp) = ((julong)(a) / (b)), \ + *(rp) = ((julong)(a) % (b))) + +#else /* !HAVE_LONG_LONG */ + +typedef struct { +#ifdef IS_LITTLE_ENDIAN + juint lo, hi; +#else + juint hi, lo; +#endif +} jlong; +typedef jlong julong; + +extern jlong jlong_MAXINT, jlong_MININT, jlong_ZERO; + +#define jlong_IS_ZERO(a) (((a).hi == 0) && ((a).lo == 0)) +#define jlong_EQ(a, b) (((a).hi == (b).hi) && ((a).lo == (b).lo)) +#define jlong_NE(a, b) (((a).hi != (b).hi) || ((a).lo != (b).lo)) +#define jlong_GE_ZERO(a) (((a).hi >> 31) == 0) + +/* + * NB: jlong_CMP and jlong_UCMP work only for strict relationals (<, >). + */ +#define jlong_CMP(a, op, b) (((int32)(a).hi op (int32)(b).hi) || \ + (((a).hi == (b).hi) && ((a).lo op (b).lo))) +#define jlong_UCMP(a, op, b) (((a).hi op (b).hi) || \ + (((a).hi == (b).hi) && ((a).lo op (b).lo))) + +#define jlong_AND(r, a, b) ((r).lo = (a).lo & (b).lo, \ + (r).hi = (a).hi & (b).hi) +#define jlong_OR(r, a, b) ((r).lo = (a).lo | (b).lo, \ + (r).hi = (a).hi | (b).hi) +#define jlong_XOR(r, a, b) ((r).lo = (a).lo ^ (b).lo, \ + (r).hi = (a).hi ^ (b).hi) +#define jlong_OR2(r, a) ((r).lo = (r).lo | (a).lo, \ + (r).hi = (r).hi | (a).hi) +#define jlong_NOT(r, a) ((r).lo = ~(a).lo, \ + (r).hi = ~(a).hi) + +#define jlong_NEG(r, a) ((r).lo = -(int32)(a).lo, \ + (r).hi = -(int32)(a).hi - ((r).lo != 0)) +#define jlong_ADD(r, a, b) { \ + jlong _a, _b; \ + _a = a; _b = b; \ + (r).lo = _a.lo + _b.lo; \ + (r).hi = _a.hi + _b.hi + ((r).lo < _b.lo); \ +} + +#define jlong_SUB(r, a, b) { \ + jlong _a, _b; \ + _a = a; _b = b; \ + (r).lo = _a.lo - _b.lo; \ + (r).hi = _a.hi - _b.hi - (_a.lo < _b.lo); \ +} \ + +/* + * Multiply 64-bit operands a and b to get 64-bit result r. + * First multiply the low 32 bits of a and b to get a 64-bit result in r. + * Then add the outer and inner products to r.hi. + */ +#define jlong_MUL(r, a, b) { \ + jlong _a, _b; \ + _a = a; _b = b; \ + jlong_MUL32(r, _a.lo, _b.lo); \ + (r).hi += _a.hi * _b.lo + _a.lo * _b.hi; \ +} + +/* XXX _jlong_lo16(a) = ((a) << 16 >> 16) is better on some archs (not on mips) */ +#define _jlong_lo16(a) ((a) & JRI_BITMASK(16)) +#define _jlong_hi16(a) ((a) >> 16) + +/* + * Multiply 32-bit operands a and b to get 64-bit result r. + * Use polynomial expansion based on primitive field element (1 << 16). + */ +#define jlong_MUL32(r, a, b) { \ + juint _a1, _a0, _b1, _b0, _y0, _y1, _y2, _y3; \ + _a1 = _jlong_hi16(a), _a0 = _jlong_lo16(a); \ + _b1 = _jlong_hi16(b), _b0 = _jlong_lo16(b); \ + _y0 = _a0 * _b0; \ + _y1 = _a0 * _b1; \ + _y2 = _a1 * _b0; \ + _y3 = _a1 * _b1; \ + _y1 += _jlong_hi16(_y0); /* can't carry */ \ + _y1 += _y2; /* might carry */ \ + if (_y1 < _y2) _y3 += 1 << 16; /* propagate */ \ + (r).lo = (_jlong_lo16(_y1) << 16) + _jlong_lo16(_y0); \ + (r).hi = _y3 + _jlong_hi16(_y1); \ +} + +/* + * Divide 64-bit unsigned operand a by 64-bit unsigned operand b, setting *qp + * to the 64-bit unsigned quotient, and *rp to the 64-bit unsigned remainder. + * Minimize effort if one of qp and rp is null. + */ +#define jlong_UDIVMOD(qp, rp, a, b) jlong_udivmod(qp, rp, a, b) + +extern JRI_PUBLIC_API(void) +jlong_udivmod(julong *qp, julong *rp, julong a, julong b); + +#define jlong_DIV(r, a, b) { \ + jlong _a, _b; \ + juint _negative = (int32)(a).hi < 0; \ + if (_negative) { \ + jlong_NEG(_a, a); \ + } else { \ + _a = a; \ + } \ + if ((int32)(b).hi < 0) { \ + _negative ^= 1; \ + jlong_NEG(_b, b); \ + } else { \ + _b = b; \ + } \ + jlong_UDIVMOD(&(r), 0, _a, _b); \ + if (_negative) \ + jlong_NEG(r, r); \ +} + +#define jlong_MOD(r, a, b) { \ + jlong _a, _b; \ + juint _negative = (int32)(a).hi < 0; \ + if (_negative) { \ + jlong_NEG(_a, a); \ + } else { \ + _a = a; \ + } \ + if ((int32)(b).hi < 0) { \ + jlong_NEG(_b, b); \ + } else { \ + _b = b; \ + } \ + jlong_UDIVMOD(0, &(r), _a, _b); \ + if (_negative) \ + jlong_NEG(r, r); \ +} + +/* + * NB: b is a juint, not jlong or julong, for the shift ops. + */ +#define jlong_SHL(r, a, b) { \ + if (b) { \ + jlong _a; \ + _a = a; \ + if ((b) < 32) { \ + (r).lo = _a.lo << (b); \ + (r).hi = (_a.hi << (b)) | (_a.lo >> (32 - (b))); \ + } else { \ + (r).lo = 0; \ + (r).hi = _a.lo << ((b) & 31); \ + } \ + } else { \ + (r) = (a); \ + } \ +} + +/* a is an int32, b is int32, r is jlong */ +#define jlong_ISHL(r, a, b) { \ + if (b) { \ + jlong _a; \ + _a.lo = (a); \ + _a.hi = 0; \ + if ((b) < 32) { \ + (r).lo = (a) << (b); \ + (r).hi = ((a) >> (32 - (b))); \ + } else { \ + (r).lo = 0; \ + (r).hi = (a) << ((b) & 31); \ + } \ + } else { \ + (r).lo = (a); \ + (r).hi = 0; \ + } \ +} + +#define jlong_SHR(r, a, b) { \ + if (b) { \ + jlong _a; \ + _a = a; \ + if ((b) < 32) { \ + (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b)); \ + (r).hi = (int32)_a.hi >> (b); \ + } else { \ + (r).lo = (int32)_a.hi >> ((b) & 31); \ + (r).hi = (int32)_a.hi >> 31; \ + } \ + } else { \ + (r) = (a); \ + } \ +} + +#define jlong_USHR(r, a, b) { \ + if (b) { \ + jlong _a; \ + _a = a; \ + if ((b) < 32) { \ + (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b)); \ + (r).hi = _a.hi >> (b); \ + } else { \ + (r).lo = _a.hi >> ((b) & 31); \ + (r).hi = 0; \ + } \ + } else { \ + (r) = (a); \ + } \ +} + +#define jlong_L2I(i, l) ((i) = (l).lo) +#define jlong_L2UI(ui, l) ((ui) = (l).lo) +#define jlong_L2F(f, l) { double _d; jlong_L2D(_d, l); (f) = (float) _d; } + +#define jlong_L2D(d, l) { \ + int32 _negative; \ + jlong _absval; \ + \ + _negative = (l).hi >> 31; \ + if (_negative) { \ + jlong_NEG(_absval, l); \ + } else { \ + _absval = l; \ + } \ + (d) = (double)_absval.hi * 4.294967296e9 + _absval.lo; \ + if (_negative) \ + (d) = -(d); \ +} + +#define jlong_I2L(l, i) ((l).hi = (i) >> 31, (l).lo = (i)) +#define jlong_UI2L(l, ui) ((l).hi = 0, (l).lo = (ui)) +#define jlong_F2L(l, f) { double _d = (double) f; jlong_D2L(l, _d); } + +#define jlong_D2L(l, d) { \ + int _negative; \ + double _absval, _d_hi; \ + jlong _lo_d; \ + \ + _negative = ((d) < 0); \ + _absval = _negative ? -(d) : (d); \ + \ + (l).hi = (juint)(_absval / 4.294967296e9); \ + (l).lo = 0; \ + jlong_L2D(_d_hi, l); \ + _absval -= _d_hi; \ + _lo_d.hi = 0; \ + if (_absval < 0) { \ + _lo_d.lo = (juint) -_absval; \ + jlong_SUB(l, l, _lo_d); \ + } else { \ + _lo_d.lo = (juint) _absval; \ + jlong_ADD(l, l, _lo_d); \ + } \ + \ + if (_negative) \ + jlong_NEG(l, l); \ +} + +#endif /* !HAVE_LONG_LONG */ + +/******************************************************************************/ + +#ifdef HAVE_ALIGNED_LONGLONGS +#define JRI_GET_INT64(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \ + ((_t).x[1] = ((jint*)(_addr))[1]), \ + (_t).l ) +#define JRI_SET_INT64(_t, _addr, _v) ( (_t).l = (_v), \ + ((jint*)(_addr))[0] = (_t).x[0], \ + ((jint*)(_addr))[1] = (_t).x[1] ) +#else +#define JRI_GET_INT64(_t,_addr) (*(jlong*)(_addr)) +#define JRI_SET_INT64(_t, _addr, _v) (*(jlong*)(_addr) = (_v)) +#endif + +/* If double's must be aligned on doubleword boundaries then define this */ +#ifdef HAVE_ALIGNED_DOUBLES +#define JRI_GET_DOUBLE(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \ + ((_t).x[1] = ((jint*)(_addr))[1]), \ + (_t).d ) +#define JRI_SET_DOUBLE(_t, _addr, _v) ( (_t).d = (_v), \ + ((jint*)(_addr))[0] = (_t).x[0], \ + ((jint*)(_addr))[1] = (_t).x[1] ) +#else +#define JRI_GET_DOUBLE(_t,_addr) (*(jdouble*)(_addr)) +#define JRI_SET_DOUBLE(_t, _addr, _v) (*(jdouble*)(_addr) = (_v)) +#endif + +/******************************************************************************/ +#ifdef __cplusplus +} +#endif +#endif /* JRI_MD_H */ +/******************************************************************************/ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/jritypes.h b/Src/nprt_plugin/gecko/1.8/win/include/jritypes.h new file mode 100644 index 00000000..ddeb6331 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/jritypes.h @@ -0,0 +1,243 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/******************************************************************************* + * Java Runtime Interface + ******************************************************************************/ + +#ifndef JRITYPES_H +#define JRITYPES_H + +#include "jri_md.h" +#include "jni.h" +#include <stddef.h> +#include <stdlib.h> +#include <stdarg.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/******************************************************************************* + * Types + ******************************************************************************/ + +struct JRIEnvInterface; + +typedef void* JRIRef; +typedef void* JRIGlobalRef; + +typedef jint JRIFieldID; +typedef jint JRIMethodID; + +/* synonyms: */ +typedef JRIGlobalRef jglobal; + +typedef union JRIValue { + jbool z; + jbyte b; + jchar c; + jshort s; + jint i; + jlong l; + jfloat f; + jdouble d; + jref r; +} JRIValue; + +typedef enum JRIBoolean { + JRIFalse = 0, + JRITrue = 1 +} JRIBoolean; + +typedef enum JRIConstant { + JRIUninitialized = -1 +} JRIConstant; + +/* convenience types (these must be distinct struct types for c++ overloading): */ +#if 0 /* now in jni.h */ +typedef struct jbooleanArrayStruct* jbooleanArray; +typedef struct jbyteArrayStruct* jbyteArray; +typedef struct jcharArrayStruct* jcharArray; +typedef struct jshortArrayStruct* jshortArray; +typedef struct jintArrayStruct* jintArray; +typedef struct jlongArrayStruct* jlongArray; +typedef struct jfloatArrayStruct* jfloatArray; +typedef struct jdoubleArrayStruct* jdoubleArray; +typedef struct jobjectArrayStruct* jobjectArray; +#endif +typedef struct jstringArrayStruct* jstringArray; +typedef struct jarrayArrayStruct* jarrayArray; + +#define JRIConstructorMethodName "<init>" + +/******************************************************************************* + * Signature Construction Macros + ******************************************************************************/ + +/* +** These macros can be used to construct signature strings. Hopefully their names +** are a little easier to remember than the single character they correspond to. +** For example, to specify the signature of the method: +** +** public int read(byte b[], int off, int len); +** +** you could write something like this in C: +** +** char* readSig = JRISigMethod(JRISigArray(JRISigByte) +** JRISigInt +** JRISigInt) JRISigInt; +** +** Of course, don't put commas between the types. +*/ +#define JRISigArray(T) "[" T +#define JRISigByte "B" +#define JRISigChar "C" +#define JRISigClass(name) "L" name ";" +#define JRISigFloat "F" +#define JRISigDouble "D" +#define JRISigMethod(args) "(" args ")" +#define JRISigNoArgs "" +#define JRISigInt "I" +#define JRISigLong "J" +#define JRISigShort "S" +#define JRISigVoid "V" +#define JRISigBoolean "Z" + +/******************************************************************************* + * Environments + ******************************************************************************/ + +extern JRI_PUBLIC_API(const struct JRIEnvInterface**) +JRI_GetCurrentEnv(void); + +/******************************************************************************* + * Specific Scalar Array Types + ******************************************************************************/ + +/* +** The JRI Native Method Interface does not support boolean arrays. This +** is to allow Java runtime implementations to optimize boolean array +** storage. Using the ScalarArray operations on boolean arrays is bound +** to fail, so convert any boolean arrays to byte arrays in Java before +** passing them to a native method. +*/ + +#define JRI_NewByteArray(env, length, initialValues) \ + JRI_NewScalarArray(env, length, JRISigByte, (jbyte*)(initialValues)) +#define JRI_GetByteArrayLength(env, array) \ + JRI_GetScalarArrayLength(env, array) +#define JRI_GetByteArrayElements(env, array) \ + JRI_GetScalarArrayElements(env, array) + +#define JRI_NewCharArray(env, length, initialValues) \ + JRI_NewScalarArray(env, ((length) * sizeof(jchar)), JRISigChar, (jbyte*)(initialValues)) +#define JRI_GetCharArrayLength(env, array) \ + JRI_GetScalarArrayLength(env, array) +#define JRI_GetCharArrayElements(env, array) \ + ((jchar*)JRI_GetScalarArrayElements(env, array)) + +#define JRI_NewShortArray(env, length, initialValues) \ + JRI_NewScalarArray(env, ((length) * sizeof(jshort)), JRISigShort, (jbyte*)(initialValues)) +#define JRI_GetShortArrayLength(env, array) \ + JRI_GetScalarArrayLength(env, array) +#define JRI_GetShortArrayElements(env, array) \ + ((jshort*)JRI_GetScalarArrayElements(env, array)) + +#define JRI_NewIntArray(env, length, initialValues) \ + JRI_NewScalarArray(env, ((length) * sizeof(jint)), JRISigInt, (jbyte*)(initialValues)) +#define JRI_GetIntArrayLength(env, array) \ + JRI_GetScalarArrayLength(env, array) +#define JRI_GetIntArrayElements(env, array) \ + ((jint*)JRI_GetScalarArrayElements(env, array)) + +#define JRI_NewLongArray(env, length, initialValues) \ + JRI_NewScalarArray(env, ((length) * sizeof(jlong)), JRISigLong, (jbyte*)(initialValues)) +#define JRI_GetLongArrayLength(env, array) \ + JRI_GetScalarArrayLength(env, array) +#define JRI_GetLongArrayElements(env, array) \ + ((jlong*)JRI_GetScalarArrayElements(env, array)) + +#define JRI_NewFloatArray(env, length, initialValues) \ + JRI_NewScalarArray(env, ((length) * sizeof(jfloat)), JRISigFloat, (jbyte*)(initialValues)) +#define JRI_GetFloatArrayLength(env, array) \ + JRI_GetScalarArrayLength(env, array) +#define JRI_GetFloatArrayElements(env, array) \ + ((jfloat*)JRI_GetScalarArrayElements(env, array)) + +#define JRI_NewDoubleArray(env, length, initialValues) \ + JRI_NewScalarArray(env, ((length) * sizeof(jdouble)), JRISigDouble, (jbyte*)(initialValues)) +#define JRI_GetDoubleArrayLength(env, array) \ + JRI_GetScalarArrayLength(env, array) +#define JRI_GetDoubleArrayElements(env, array) \ + ((jdouble*)JRI_GetScalarArrayElements(env, array)) + +/******************************************************************************/ +/* +** JDK Stuff -- This stuff is still needed while we're using the JDK +** dynamic linking strategy to call native methods. +*/ + +typedef union JRI_JDK_stack_item { + /* Non pointer items */ + jint i; + jfloat f; + jint o; + /* Pointer items */ + void *h; + void *p; + unsigned char *addr; +#ifdef IS_64 + double d; + long l; /* == 64bits! */ +#endif +} JRI_JDK_stack_item; + +typedef union JRI_JDK_Java8Str { + jint x[2]; + jdouble d; + jlong l; + void *p; + float f; +} JRI_JDK_Java8; + +/******************************************************************************/ +#ifdef __cplusplus +} +#endif +#endif /* JRITYPES_H */ +/******************************************************************************/ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_aix.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_aix.h new file mode 100644 index 00000000..855cb247 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_aix.h @@ -0,0 +1,254 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_aix_defs_h___ +#define nspr_aix_defs_h___ + +#include <sys/types.h> +#if defined(_PR_PTHREADS) || defined(PTHREADS_USER) +#include <pthread.h> +#endif + +/* + * To pick up fd_set and the poll events. + */ +#include <sys/select.h> +#include <sys/poll.h> + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "aix" +#define _PR_SI_SYSNAME "AIX" +#define _PR_SI_ARCHITECTURE "rs6000" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE (2*65536L) +#define _MD_MINIMUM_STACK_SIZE (2*65536L) +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#define NEED_TIME_R +#undef HAVE_STACK_GROWING_UP +#undef HAVE_WEAK_IO_SYMBOLS +#undef HAVE_WEAK_MALLOC_SYMBOLS +#define HAVE_DLL +#define USE_DLFCN +#define _PR_HAVE_SOCKADDR_LEN +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_STAT_HAS_ONLY_ST_ATIME +#ifdef _PR_INET6 +#define _PR_HAVE_INET_NTOP +#define _PR_HAVE_GETHOSTBYNAME2 +#define _PR_HAVE_GETADDRINFO +#endif +#define _PR_HAVE_SYSV_SEMAPHORES +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY +#define _PR_ACCEPT_INHERIT_NONBLOCK + +/* Timer operations */ +#if defined(AIX_TIMERS) +extern PRIntervalTime _MD_AixGetInterval(void); +#define _MD_GET_INTERVAL _MD_AixGetInterval + +extern PRIntervalTime _MD_AixIntervalPerSec(void); +#define _MD_INTERVAL_PER_SEC _MD_AixIntervalPerSec + +#else /* defined(AIX_TIMERS) */ +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond +#endif /* defined(AIX_TIMERS) */ + +#ifdef AIX_HAVE_ATOMIC_OP_H +/* The atomic operations */ +#include <sys/atomic_op.h> +#define _PR_HAVE_ATOMIC_OPS +#ifndef IS_64 +#define _PR_HAVE_ATOMIC_CAS +#endif +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_INCREMENT(val) ((PRInt32)fetch_and_add((atomic_p)val, 1) + 1) +#define _MD_ATOMIC_ADD(ptr, val) ((PRInt32)fetch_and_add((atomic_p)ptr, val) + val) +#define _MD_ATOMIC_DECREMENT(val) ((PRInt32)fetch_and_add((atomic_p)val, -1) - 1) +#define _MD_ATOMIC_SET(val, newval) _AIX_AtomicSet(val, newval) +#endif /* AIX_HAVE_ATOMIC_OP_H */ + +#define USE_SETJMP + +#include <setjmp.h> + +#define _MD_GET_SP(_t) (_t)->md.jb[3] +#define _MD_SET_THR_SP(_t, _sp) ((_t)->md.jb[3] = (int) (_sp - 2 * 64)) +#define PR_NUM_GCREGS _JBLEN + +#define CONTEXT(_th) ((_th)->md.jb) +#define SAVE_CONTEXT(_th) _setjmp(CONTEXT(_th)) +#define GOTO_CONTEXT(_th) _longjmp(CONTEXT(_th), 1) + +#ifdef PTHREADS_USER +#include "_nspr_pthread.h" +#else + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + *status = PR_TRUE; \ + if (setjmp(CONTEXT(_thread))) { \ + (*_main)(); \ + } \ + _MD_GET_SP(_thread) = (int) (_sp - 2 * 64); \ + PR_END_MACRO + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + longjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + jmp_buf jb; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#if !defined(_PR_PTHREADS) +#define _MD_INIT_LOCKS() +#endif + +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) +#endif /* PTHREADS_USER */ + +#ifdef AIX_RENAME_SELECT +#define _MD_SELECT select +#define _MD_POLL poll +#endif + +extern void _MD_aix_map_sendfile_error(int err); + +#endif /* nspr_aix_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_beos.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_beos.h new file mode 100644 index 00000000..38dd5fb8 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_beos.h @@ -0,0 +1,613 @@ +/* -*- Mode: C++; tab-width: 8; 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_beos_defs_h___ +#define nspr_beos_defs_h___ + +#include "prtypes.h" +#include "prio.h" +#include "prthread.h" +#include "prproces.h" +#include "prmem.h" +#include "obsolete/prsem.h" +#include <errno.h> + +#include <support/SupportDefs.h> +#include <kernel/OS.h> +#include <dirent.h> + +/* + * Internal configuration macros + */ + +#ifdef BONE_VERSION +#define _PR_HAVE_SOCKADDR_LEN +#endif + +#define PR_LINKER_ARCH "beos" +#define _PR_SI_SYSNAME "BEOS" +#ifdef __powerpc__ +#define _PR_SI_ARCHITECTURE "ppc" +#else +#define _PR_SI_ARCHITECTURE "x86" +#endif +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define _PR_NO_CLOCK_TIMER + +/* + * The Atomic operations + */ + +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC _MD_AtomicInit +#define _MD_ATOMIC_INCREMENT _MD_AtomicIncrement +#define _MD_ATOMIC_ADD _MD_AtomicAdd +#define _MD_ATOMIC_DECREMENT _MD_AtomicDecrement +#define _MD_ATOMIC_SET _MD_AtomicSet + +#define HAVE_CVAR_BUILT_ON_SEM +#define _PR_GLOBAL_THREADS_ONLY +#define _PR_BTHREADS +#define _PR_NEED_FAKE_POLL +#define _PR_HAVE_PEEK_BUFFER +#define _PR_PEEK_BUFFER_MAX (16 * 1024) +#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) 1 +#define _PR_CONNECT_DOES_NOT_BIND +#define _PR_HAVE_O_APPEND + +/* Define threading functions and objects as native BeOS */ +struct _MDThread { + thread_id tid; /* BeOS thread handle */ + sem_id joinSem; /* sems used to synchronzie joining */ + PRBool is_joining; /* TRUE if someone is currently waiting to + join this thread */ +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +/* + * Lock and Semaphore related definitions + */ + +struct _MDLock { + sem_id semaphoreID; + int32 benaphoreCount; +}; + +struct _MDCVar { + sem_id sem1; + sem_id sem2; + int16 count; +}; + +struct _MDSemaphore { + sem_id sid; +}; + +/* +** CPU-related definitions +*/ +struct _MDCPU { + int8 unused; +}; + +/* +** Process-related definitions +*/ +struct _MDProcess { + pid_t pid; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* +** File- and directory-related definitions +*/ + +#ifndef BONE_VERSION +#define BE_SOCK_SHUTDOWN_READ 0x01 +#define BE_SOCK_SHUTDOWN_WRITE 0x02 +#endif + +struct _MDFileDesc { + PRInt32 osfd; + PRInt32 sock_state; + PRBool accepted_socket; + PRNetAddr peer_addr; +#ifndef BONE_VERSION + PRBool connectValueValid; + int connectReturnValue; + int connectReturnError; +#endif +}; + +struct _MDDir { + DIR *d; +}; + +#define PR_DIRECTORY_SEPARATOR '/' +#define PR_DIRECTORY_SEPARATOR_STR "/" +#define PR_PATH_SEPARATOR ':' +#define PR_PATH_SEPARATOR_STR ":" + +#define GETTIMEOFDAY(tp) gettimeofday((tp), NULL) + +/* --- Memory-mapped files stuff --- not implemented on BeOS */ + +struct _MDFileMap { + PRInt8 unused; +}; + +/* + * Network related definitions. + */ + +#ifndef BONE_VERSION +#define IPPROTO_IP 0 +#define AF_UNIX 2 +#define TCP_NODELAY SO_NONBLOCK +#define SO_LINGER -1 +#define SO_ERROR 4 +#endif + +#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5 + +#ifndef BONE_VERSION +/* these aren't actually used. if they are, we're screwed */ +struct protoent { + char *p_name; /* official protocol name */ + char **p_aliases; /* alias list */ + int p_proto; /* protocol # */ +}; + +struct protoent* getprotobyname(const char* name); +struct protoent* getprotobynumber(int number); +#endif + +/* + * malloc() related definitions. + */ + +#undef _PR_OVERRIDE_MALLOC + +/* Miscellaneous */ + +#define _MD_ERRNO() (errno) + +#define _MD_CLEANUP_BEFORE_EXIT _MD_cleanup_before_exit +#define _MD_EXIT _MD_exit + +#define _MD_GET_ENV getenv +#define _MD_PUT_ENV putenv + +#define _MD_EARLY_INIT _MD_early_init +#define _MD_FINAL_INIT _MD_final_init + +/* CPU Stuff */ + +#define _MD_INIT_CPUS _MD_init_cpus +#define _MD_WAKEUP_CPUS _MD_wakeup_cpus +#define _MD_START_INTERRUPTS _MD_start_interrupts +#define _MD_STOP_INTERRUPTS _MD_stop_interrupts +#define _MD_DISABLE_CLOCK_INTERRUPTS _MD_disable_clock_interrupts +#define _MD_BLOCK_CLOCK_INTERRUPTS _MD_block_clock_interrupts +#define _MD_UNBLOCK_CLOCK_INTERRUPTS _MD_unblock_clock_interrupts +#define _MD_CLOCK_INTERRUPT _MD_clock_interrupt +#define _MD_INIT_STACK _MD_init_stack +#define _MD_CLEAR_STACK _MD_clear_stack +// #define _MD_GET_INTSOFF _MD_get_intsoff +// #define _MD_SET_INTSOFF _MD_set_intsoff +#define _MD_CURRENT_CPU _MD_current_cpu +#define _MD_SET_CURRENT_CPU _MD_set_current_cpu +#define _MD_INIT_RUNNING_CPU _MD_init_running_cpu +#define _MD_PAUSE_CPU _MD_pause_cpu + +/* Thread stuff */ + +#define _MD_CURRENT_THREAD() PR_GetCurrentThread() +// #define _MD_GET_ATTACHED_THREAD _MD_get_attached_thread +#define _MD_LAST_THREAD _MD_last_thread +#define _MD_SET_CURRENT_THREAD _MD_set_current_THREAD +#define _MD_SET_LAST_THREAD _MD_set_last_thread +#define _MD_INIT_THREAD _MD_init_thread +#define _MD_EXIT_THREAD _MD_exit_thread +#define _MD_INIT_ATTACHED_THREAD _MD_init_attached_thread + +#define _MD_SUSPEND_THREAD _MD_suspend_thread +#define _MD_RESUME_THREAD _MD_resume_thread +#define _MD_SUSPEND_CPU _MD_suspend_cpu +#define _MD_RESUME_CPU _MD_resume_cpu +#define _MD_BEGIN_SUSPEND_ALL _MD_begin_suspend_all +#define _MD_END_SUSPEND_ALL _MD_end_suspend_all +#define _MD_BEGIN_RESUME_ALL _MD_begin_resume_all +#define _MD_END_RESUME_ALL _MD_end_resume_all + +#define _MD_GET_SP _MD_get_sp + +#define _MD_CLEAN_THREAD _MD_clean_thread +#define _MD_CREATE_PRIMORDIAL_USER_THREAD _MD_create_primordial_user_thread +#define _MD_CREATE_USER_THREAD _MD_create_user_thread +#define _MD_INIT_PRIMORDIAL_THREAD _MD_init_primordial_thread +#define _MD_CREATE_THREAD _MD_create_thread +#define _MD_YIELD _MD_yield +#define _MD_SET_PRIORITY _MD_set_priority + +#define _MD_SUSPENDALL _MD_suspendall +#define _MD_RESUMEALL _MD_resumeall + +#define _MD_SWITCH_CONTEXT _MD_switch_context +#define _MD_RESTORE_CONTEXT _MD_restore_context + +#define _MD_WAIT _MD_wait +#define _MD_WAKEUP_WAITER _MD_wakeup_waiter + +#define _MD_SETTHREADAFFINITYMASK _MD_setthreadaffinitymask +#define _MD_GETTHREADAFFINITYMASK _MD_getthreadaffinitymask + +/* Thread Synchronization */ + +#define _MD_INIT_LOCKS _MD_init_locks +#define _MD_NEW_LOCK _MD_new_lock +#define _MD_FREE_LOCK _MD_free_lock +#define _MD_LOCK _MD_lock +#define _MD_TEST_AND_LOCK _MD_test_and_lock +#define _MD_UNLOCK _MD_unlock +#define _MD_IOQ_LOCK _MD_ioq_lock +#define _MD_IOQ_UNLOCK _MD_ioq_unlock +#define _MD_NEW_SEM _MD_new_sem +#define _MD_DESTROY_SEM _MD_destroy_sem +#define _MD_TIMED_WAIT_SEM _MD_timed_wait_sem +#define _MD_WAIT_SEM _MD_wait_sem +#define _MD_POST_SEM _MD_post_sem +// #define _MD_NEW_CV _MD_new_cv +// #define _MD_FREE_CV _MD_free_cv +// #define _MD_WAIT_CV _MD_wait_cv +// #define _MD_NOTIFY_CV _MD_notify_cv +// #define _MD_NOTIFYALL_CV _MD_notifyall_cv + +/* File I/O */ + +/* don't need any I/O initializations */ +#define _MD_INIT_IO() +#define _MD_INIT_FILEDESC(fd) + +#define _MD_OPEN_DIR _MD_open_dir +#define _MD_READ_DIR _MD_read_dir +#define _MD_CLOSE_DIR _MD_close_dir +#define _MD_MAKE_NONBLOCK _MD_make_nonblock +#define _MD_SET_FD_INHERITABLE _MD_set_fd_inheritable +#define _MD_INIT_FD_INHERITABLE _MD_init_fd_inheritable +#define _MD_QUERY_FD_INHERITABLE _MD_query_fd_inheritable +#define _MD_OPEN _MD_open +#define _MD_OPEN_FILE _MD_open +#define _MD_CLOSE_FILE _MD_close_file +#define _MD_READ _MD_read +#define _MD_WRITE _MD_write +#define _MD_WRITEV _MD_writev +#define _MD_LSEEK _MD_lseek +#define _MD_LSEEK64 _MD_lseek64 +#define _MD_FSYNC _MD_fsync +#define _MD_DELETE _MD_delete +#define _MD_GETFILEINFO _MD_getfileinfo +#define _MD_GETFILEINFO64 _MD_getfileinfo64 +#define _MD_GETOPENFILEINFO _MD_getopenfileinfo +#define _MD_GETOPENFILEINFO64 _MD_getopenfileinfo64 +#define _MD_RENAME _MD_rename +#define _MD_ACCESS _MD_access +#define _MD_STAT stat +#define _MD_MKDIR _MD_mkdir +#define _MD_MAKE_DIR _MD_mkdir +#define _MD_RMDIR _MD_rmdir +#define _MD_PR_POLL _MD_pr_poll + +/* Network I/O */ + +#define _MD_CLOSE_SOCKET _MD_close_socket +#define _MD_CONNECT _MD_connect +#define _MD_ACCEPT _MD_accept +#define _MD_BIND _MD_bind +#define _MD_LISTEN _MD_listen +#define _MD_SHUTDOWN _MD_shutdown +#define _MD_RECV _MD_recv +#define _MD_SEND _MD_send +#define _MD_ACCEPT_READ _MD_accept_read +#define _MD_GETSOCKNAME _MD_getsockname +#define _MD_GETPEERNAME _MD_getpeername +#define _MD_GETSOCKOPT _MD_getsockopt +#define _MD_SETSOCKOPT _MD_setsockopt +#define _MD_RECVFROM _MD_recvfrom +#define _MD_SENDTO _MD_sendto +#define _MD_SOCKETPAIR _MD_socketpair +#define _MD_SOCKET _MD_socket +#define _MD_SOCKETAVAILABLE _MD_socketavailable +#define _MD_PIPEAVAILABLE _MD_socketavailable + +#define _MD_GET_SOCKET_ERROR() (errno) +#define _MD_GETHOSTNAME _MD_gethostname + +#define _MD_SELECT select + +/* Process management */ + +#define _MD_CREATE_PROCESS _MD_create_process +#define _MD_DETACH_PROCESS _MD_detach_process +#define _MD_WAIT_PROCESS _MD_wait_process +#define _MD_KILL_PROCESS _MD_kill_process + +/* Atomic data operations */ + +// #define _MD_INIT_ATOMIC _MD_init_atomic +// #define _MD_ATOMIC_INCREMENT _MD_atomic_increment +// #define _MD_ATOMIC_DECREMENT _MD_atomic_decrement +// #define _MD_ATOMIC_SET _MD_atomic_set + +/* memory management */ + +#define _MD_INIT_SEGS _MD_init_segs +#define _MD_ALLOC_SEGMENT _MD_alloc_segment +#define _MD_FREE_SEGMENT _MD_free_segment + +/* Memory mapped file I/O */ + +#define _MD_CREATE_FILE_MAP _MD_create_file_map +#define _MD_GET_MEM_MAP_ALIGNMENT _MD_get_mem_map_alignment +#define _MD_MEM_MAP _MD_mem_map +#define _MD_MEM_UNMAP _MD_mem_unmap +#define _MD_CLOSE_FILE_MAP _MD_close_file_map + +/* Time related */ + +#define _MD_NOW _MD_now +#define _MD_INTERVAL_INIT _MD_interval_init +#define _MD_GET_INTERVAL _MD_get_interval +#define _MD_INTERVAL_PER_SEC _MD_interval_per_sec + +/* File locking */ + +#define _MD_LOCKFILE _MD_lockfile +#define _MD_TLOCKFILE _MD_tlockfile +#define _MD_UNLOCKFILE _MD_unlockfile + +/** + * Prototypes for machine dependent function implementations. (Too bad + * NSPR's MD system blows so much that we have to reiterate every stinking + * thing we implement here in our MD header file.) + */ + +/* Miscellaneous */ + +NSPR_API(void) _MD_cleanup_before_exit(void); +NSPR_API(void) _MD_exit(PRIntn status); + +NSPR_API(char*) _MD_get_env(const char *name); +NSPR_API(PRIntn) _MD_put_env(const char *name); + +NSPR_API(void) _MD_early_init(void); +NSPR_API(void) _MD_final_init(void); + +/* CPU Stuff */ + +NSPR_API(void) _MD_init_cpus(); +NSPR_API(void) _MD_wakeup_cpus(); +NSPR_API(void) _MD_start_interrupts(void); +NSPR_API(void) _MD_stop_interrupts(void); +NSPR_API(void) _MD_disable_clock_interrupts(void); +NSPR_API(void) _MD_block_clock_interrupts(void); +NSPR_API(void) _MD_unblock_clock_interrupts(void); +NSPR_API(void) _MD_clock_interrupt(void); +// NSPR_API(void) _MD_init_stack(PRThreadStack *ts, PRIntn redzone); +// NSPR_API(void) _MD_clear_stack(PRThreadStack* ts); +// NSPR_API(PRInt32) _MD_get_intsoff(void); +// NSPR_API(void) _MD_set_intsoff(PRInt32 _val); +// NSPR_API(_PRCPU*) _MD_current_cpu(void); +// NSPR_API(void) _MD_set_current_cpu(_PRCPU *cpu); +// NSPR_API(void) _MD_init_running_cpu(_PRCPU *cpu); +NSPR_API(PRInt32) _MD_pause_cpu(PRIntervalTime timeout); + +/* Thread stuff */ + +// NSPR_API(PRThread*) _MD_current_thread(void); +NSPR_API(PRThread*) _MD_get_attached_thread(void); +NSPR_API(PRThread*) _MD_last_thread(void); +NSPR_API(void) _MD_set_current_thread(PRThread *thread); +NSPR_API(void) _MD_set_last_thread(PRThread *thread); +NSPR_API(PRStatus) _MD_init_thread(PRThread *thread); +NSPR_API(void) _MD_exit_thread(PRThread *thread); +NSPR_API(PRStatus) _MD_init_attached_thread(PRThread *thread); + +NSPR_API(void) _MD_suspend_thread(PRThread *thread); +NSPR_API(void) _MD_resume_thread(PRThread *thread); +// NSPR_API(void) _MD_suspend_cpu(_PRCPU *cpu); +// NSPR_API(void) _MD_resume_cpu(_PRCPU *cpu); +NSPR_API(void) _MD_begin_suspend_all(void); +NSPR_API(void) _MD_end_suspend_all(void); +NSPR_API(void) _MD_begin_resume_all(void); +NSPR_API(void) _MD_end_resume_all(void); + +NSPR_API(void *) _MD_get_sp(PRThread *thread); + +NSPR_API(void) _MD_clean_thread(PRThread *thread); +NSPR_API(void) _MD_create_primordial_user_thread(PRThread *); +NSPR_API(PRThread*) _MD_create_user_thread(PRUint32 stacksize, void (*start)(void *), void *arg); +NSPR_API(void) _MD_init_primordial_thread(PRThread *thread); +NSPR_API(PRStatus) _MD_create_thread(PRThread *thread, void (*start)(void *), PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize); +NSPR_API(void) _MD_yield(void); +NSPR_API(void) _MD_set_priority(struct _MDThread *md, PRThreadPriority newPri); + +NSPR_API(void) _MD_suspendall(void); +NSPR_API(void) _MD_resumeall(void); + +NSPR_API(void) _MD_init_context(PRThread *thread, char *top, void (*start) (void), PRBool *status); +NSPR_API(void) _MD_switch_context(PRThread *thread); +NSPR_API(void) _MD_restore_context(PRThread *thread); + +NSPR_API(PRStatus) _MD_wait(PRThread *, PRIntervalTime timeout); +NSPR_API(PRStatus) _MD_wakeup_waiter(PRThread *); + +NSPR_API(PRInt32) _MD_setthreadaffinitymask(PRThread *thread, PRUint32 mask ); +NSPR_API(PRInt32) _MD_getthreadaffinitymask(PRThread *thread, PRUint32 *mask); + +/* Thread Synchronization */ + +NSPR_API(void) _MD_init_locks(void); +NSPR_API(PRStatus) _MD_new_lock(struct _MDLock *md); +NSPR_API(void) _MD_free_lock(struct _MDLock *md); +NSPR_API(void) _MD_lock(struct _MDLock *md); +NSPR_API(PRIntn) _MD_test_and_lock(struct _MDLock *md); +NSPR_API(void) _MD_unlock(struct _MDLock *md); +NSPR_API(void) _MD_ioq_lock(void); +NSPR_API(void) _MD_ioq_unlock(void); +NSPR_API(void) _MD_new_sem(struct _MDSemaphore *md, PRUintn value); +NSPR_API(void) _MD_destroy_sem(struct _MDSemaphore *md); +NSPR_API(PRStatus) _MD_timed_wait_sem(struct _MDSemaphore *md, PRIntervalTime timeout); +NSPR_API(PRStatus) _MD_wait_sem(struct _MDSemaphore *md); +NSPR_API(void) _MD_post_sem(struct _MDSemaphore *md); +// NSPR_API(PRInt32) _MD_new_cv(struct _MDCVar *md); +// NSPR_API(void) _MD_free_cv(struct _MDCVar *md); +// NSPR_API(void) _MD_wait_cv(struct _MDCVar *mdCVar, struct _MDLock *mdLock, PRIntervalTime timeout); +// NSPR_API(void) _MD_notify_cv(struct _MDCVar *md, struct _MDLock *lock); +// NSPR_API(void) _MD_notifyall_cv(struct _MDCVar *md, struct _MDLock *lock); + +/* File I/O */ + +// NSPR_API(void) _MD_init_io(void); +NSPR_API(PRStatus) _MD_open_dir(struct _MDDir *md,const char *name); +NSPR_API(char *) _MD_read_dir(struct _MDDir *md, PRIntn flags); +NSPR_API(PRInt32) _MD_close_dir(struct _MDDir *md); +NSPR_API(void) _MD_make_nonblock(PRFileDesc *fd); +NSPR_API(void) _MD_init_fd_inheritable(PRFileDesc *fd, PRBool imported); +NSPR_API(void) _MD_query_fd_inheritable(PRFileDesc *fd); +NSPR_API(PRInt32) _MD_open(const char *name, PRIntn osflags, PRIntn mode); +NSPR_API(PRInt32) _MD_close_file(PRInt32 osfd); +NSPR_API(PRInt32) _MD_read(PRFileDesc *fd, void *buf, PRInt32 amount); +NSPR_API(PRInt32) _MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount); +NSPR_API(PRInt32) _MD_writev(PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout); +NSPR_API(PRInt32) _MD_lseek(PRFileDesc *fd, PRInt32 offset, int whence); +NSPR_API(PRInt64) _MD_lseek64(PRFileDesc *fd, PRInt64 offset, int whence); +NSPR_API(PRInt32) _MD_fsync(PRFileDesc *fd); +NSPR_API(PRInt32) _MD_delete(const char *name); +NSPR_API(PRInt32) _MD_getfileinfo(const char *fn, PRFileInfo *info); +NSPR_API(PRInt32) _MD_getfileinfo64(const char *fn, PRFileInfo64 *info); +NSPR_API(PRInt32) _MD_getopenfileinfo(const PRFileDesc *fd, PRFileInfo *info); +NSPR_API(PRInt32) _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info); +NSPR_API(PRInt32) _MD_rename(const char *from, const char *to); +NSPR_API(PRInt32) _MD_access(const char *name, PRIntn how); +NSPR_API(PRInt32) _MD_stat(const char *name, struct stat *buf); +NSPR_API(PRInt32) _MD_mkdir(const char *name, PRIntn mode); +NSPR_API(PRInt32) _MD_rmdir(const char *name); +NSPR_API(PRInt32) _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout); + +/* Network I/O */ +NSPR_API(PRInt32) _MD_close_socket(PRInt32 osfd); +NSPR_API(PRInt32) _MD_connect(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout); +NSPR_API(PRInt32) _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout); +NSPR_API(PRInt32) _MD_bind(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen); +NSPR_API(PRInt32) _MD_listen(PRFileDesc *fd, PRIntn backlog); +NSPR_API(PRInt32) _MD_shutdown(PRFileDesc *fd, PRIntn how); +NSPR_API(PRInt32) _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); +NSPR_API(PRInt32) _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); +NSPR_API(PRInt32) _MD_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout); +// NSPR_API(PRInt32) _MD_fast_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg); +// NSPR_API(PRInt32) _MD_fast_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg); +// NSPR_API(void) _MD_update_accept_context(PRInt32 s, PRInt32 ls); +NSPR_API(PRStatus) _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen); +NSPR_API(PRStatus) _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen); +NSPR_API(PRStatus) _MD_getsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, char* optval, PRInt32* optlen); +NSPR_API(PRStatus) _MD_setsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, const char* optval, PRInt32 optlen); +NSPR_API(PRInt32) _MD_recvfrom(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout); +NSPR_API(PRInt32) _MD_sendto(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout); +NSPR_API(PRInt32) _MD_socketpair(int af, int type, int flags, PRInt32 *osfd); +NSPR_API(PRInt32) _MD_socket(int af, int type, int flags); +NSPR_API(PRInt32) _MD_socketavailable(PRFileDesc *fd); + +// NSPR_API(PRInt32) _MD_get_socket_error(void); +NSPR_API(PRStatus) _MD_gethostname(char *name, PRUint32 namelen); + +/* Process management */ + +NSPR_API(PRProcess *) _MD_create_process(const char *path, char *const *argv, char *const *envp, const PRProcessAttr *attr); +NSPR_API(PRStatus) _MD_detach_process(PRProcess *process); +NSPR_API(PRStatus) _MD_wait_process(PRProcess *process, PRInt32 *exitCode); +NSPR_API(PRStatus) _MD_kill_process(PRProcess *process); + +/* Atomic data operations */ + +// NSPR_API(void) _MD_init_atomic(void); +// NSPR_API(PRInt32) _MD_atomic_increment(PRInt32 *); +// NSPR_API(PRInt32) _MD_atomic_decrement(PRInt32 *); +// NSPR_API(PRInt32) _MD_atomic_set(PRInt32 *, PRInt32); + +/* Memory management */ + +NSPR_API(void) _MD_init_segs(void); +NSPR_API(PRStatus) _MD_alloc_segment(PRSegment *seg, PRUint32 size, void *vaddr); +NSPR_API(void) _MD_free_segment(PRSegment *seg); + +/* Memory mapped file I/O */ + +NSPR_API(PRStatus) _MD_create_file_map(PRFileMap *fmap, PRInt64 size); +NSPR_API(PRInt32) _MD_get_mem_map_alignment(void); +NSPR_API(void *) _MD_mem_map(PRFileMap *fmap, PRInt64 offset, PRUint32 len); +NSPR_API(PRStatus) _MD_mem_unmap(void *addr, PRUint32 size); +NSPR_API(PRStatus) _MD_close_file_map(PRFileMap *fmap); + +/* Time related */ + +NSPR_API(PRTime) _MD_now(void); +NSPR_API(void) _MD_interval_init(void); +NSPR_API(PRIntervalTime) _MD_get_interval(void); +NSPR_API(PRIntervalTime) _MD_interval_per_sec(void); + +/* File locking */ + +NSPR_API(PRStatus) _MD_lockfile(PRInt32 osfd); +NSPR_API(PRStatus) _MD_tlockfile(PRInt32 osfd); +NSPR_API(PRStatus) _MD_unlockfile(PRInt32 osfd); + +#endif /* _nspr_beos_defs_h___*/ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_bsdi.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_bsdi.h new file mode 100644 index 00000000..b59c9b0f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_bsdi.h @@ -0,0 +1,214 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_bsdi_defs_h___ +#define nspr_bsdi_defs_h___ + +/* + * Internal configuration macros + */ + +#include <sys/param.h> /* for _BSDI_VERSION */ + +#define PR_LINKER_ARCH "bsdi" +#define _PR_SI_SYSNAME "BSDI" +#if defined(__i386__) +#define _PR_SI_ARCHITECTURE "x86" +#elif defined(__sparc__) +#define _PR_SI_ARCHITECTURE "sparc" +#else +#error "Unknown CPU architecture" +#endif +#define PR_DLL_SUFFIX ".so" + +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#define HAVE_BSD_FLOCK +#define NEED_TIME_R +#define _PR_HAVE_SOCKADDR_LEN +#define _PR_NO_LARGE_FILES + +#define USE_SETJMP + +/* BSD/OS 4.3 and newer all have IPv6 support */ +#if _BSDI_VERSION >= 200105 +#define _PR_INET6 +#define _PR_HAVE_INET_NTOP +#define _PR_HAVE_GETIPNODEBYNAME +#define _PR_HAVE_GETIPNODEBYADDR +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#endif + +#ifndef _PR_PTHREADS + +#include <setjmp.h> + +#if defined(_PR_BSDI_JMPBUF_IS_ARRAY) +#define _MD_GET_SP(_t) (_t)->md.context[2] +#elif defined(_PR_BSDI_JMPBUF_IS_STRUCT) +#define _MD_GET_SP(_t) (_t)->md.context[0].jb_esp +#else +#error "Unknown BSDI jmp_buf type" +#endif + +#define PR_NUM_GCREGS _JBLEN +#define PR_CONTEXT_TYPE jmp_buf + +#define CONTEXT(_th) ((_th)->md.context) + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (setjmp(CONTEXT(_thread))) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (int) (_sp - 64); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + longjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +#endif /* ! _PR_PTHREADS */ + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit + +#include <sys/syscall.h> +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#endif /* nspr_bsdi_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_darwin.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_darwin.h new file mode 100644 index 00000000..6f409e36 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_darwin.h @@ -0,0 +1,276 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_darwin_defs_h___ +#define nspr_darwin_defs_h___ + +#include "prthread.h" + +#include <sys/syscall.h> + +#ifdef XP_MACOSX +#include <AvailabilityMacros.h> +#endif + +#define PR_LINKER_ARCH "darwin" +#define _PR_SI_SYSNAME "DARWIN" +#ifdef i386 +#define _PR_SI_ARCHITECTURE "x86" +#else +#define _PR_SI_ARCHITECTURE "ppc" +#endif +#define PR_DLL_SUFFIX ".dylib" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_MACH_DYLD +#define _PR_HAVE_SOCKADDR_LEN +#define _PR_STAT_HAS_ST_ATIMESPEC +#define _PR_NO_LARGE_FILES +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY + +#define _PR_INET6 +/* + * I'd prefer to use getipnodebyname and getipnodebyaddr but the + * getipnodebyname(3) man page on Mac OS X 10.2 says they are not + * thread-safe. AI_V4MAPPED|AI_ADDRCONFIG doesn't work either. + */ +#define _PR_HAVE_GETHOSTBYNAME2 +#define _PR_HAVE_GETADDRINFO +/* + * On Mac OS X 10.2, gethostbyaddr fails with h_errno=NO_RECOVERY + * if you pass an IPv4-mapped IPv6 address to it. + */ +#define _PR_GHBA_DISALLOW_V4MAPPED +#ifdef XP_MACOSX +#if !defined(MAC_OS_X_VERSION_10_3) || \ + MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 +/* + * socket(AF_INET6) fails with EPROTONOSUPPORT on Mac OS X 10.1. + * IPv6 under OS X 10.2 and below is not complete (see bug 222031). + */ +#define _PR_INET6_PROBE +#endif /* DT < 10.3 */ +#if defined(MAC_OS_X_VERSION_10_2) && \ + MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 +/* Mac OS X 10.2 has inet_ntop and inet_pton. */ +#define _PR_HAVE_INET_NTOP +#endif /* DT >= 10.2 */ +#endif /* XP_MACOSX */ +#define _PR_IPV6_V6ONLY_PROBE +/* The IPV6_V6ONLY socket option is not defined on Mac OS X 10.1. */ +#ifndef IPV6_V6ONLY +#define IPV6_V6ONLY 27 +#endif + +#if defined(__ppc__) +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +extern PRInt32 _PR_DarwinPPC_AtomicIncrement(PRInt32 *val); +#define _MD_ATOMIC_INCREMENT(val) _PR_DarwinPPC_AtomicIncrement(val) +extern PRInt32 _PR_DarwinPPC_AtomicDecrement(PRInt32 *val); +#define _MD_ATOMIC_DECREMENT(val) _PR_DarwinPPC_AtomicDecrement(val) +extern PRInt32 _PR_DarwinPPC_AtomicSet(PRInt32 *val, PRInt32 newval); +#define _MD_ATOMIC_SET(val, newval) _PR_DarwinPPC_AtomicSet(val, newval) +extern PRInt32 _PR_DarwinPPC_AtomicAdd(PRInt32 *ptr, PRInt32 val); +#define _MD_ATOMIC_ADD(ptr, val) _PR_DarwinPPC_AtomicAdd(ptr, val) +#endif /* __ppc__ */ + +#define USE_SETJMP + +#if !defined(_PR_PTHREADS) + +#include <setjmp.h> + +#define PR_CONTEXT_TYPE jmp_buf + +#define CONTEXT(_th) ((_th)->md.context) +#define _MD_GET_SP(_th) (((struct sigcontext *) (_th)->md.context)->sc_onstack) +#define PR_NUM_GCREGS _JBLEN + +/* +** Initialize a thread context to run "_main()" when started +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (setjmp(CONTEXT(_thread))) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + longjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +extern PRStatus _MD_InitializeThread(PRThread *thread); + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread +#define _MD_RESUME_THREAD(thread) _MD_resume_thread +#define _MD_CLEAN_THREAD(_thread) + +extern PRStatus _MD_CREATE_THREAD( + PRThread *thread, + void (*start) (void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +extern void _MD_SET_PRIORITY(struct _MDThread *thread, PRUintn newPri); +extern PRStatus _MD_WAIT(PRThread *, PRIntervalTime timeout); +extern PRStatus _MD_WAKEUP_WAITER(PRThread *); +extern void _MD_YIELD(void); + +#endif /* ! _PR_PTHREADS */ + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +extern void _MD_EarlyInit(void); +extern PRIntervalTime _PR_UNIX_GetInterval(void); +extern PRIntervalTime _PR_UNIX_TicksPerSecond(void); + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) + +/* For writev() */ +#include <sys/uio.h> + +#endif /* nspr_darwin_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_dgux.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_dgux.h new file mode 100644 index 00000000..f3f02e82 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_dgux.h @@ -0,0 +1,221 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_dgux_defs_h___ +#define nspr_dgux_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "dgux" +#define _PR_SI_SYSNAME "DGUX" +#define _PR_SI_ARCHITECTURE "x86" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#ifndef HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_IO_SYMBOLS +#endif + +#undef HAVE_STACK_GROWING_UP +#define HAVE_NETCONFIG +#define HAVE_DLL +#define USE_DLFCN +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define _PR_NEED_STRCASECMP +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ONLY_ST_ATIME + +#define USE_SETJMP + +#include <setjmp.h> + +#define _SETJMP setjmp +#define _LONGJMP longjmp +#define _PR_CONTEXT_TYPE jmp_buf +#define _MD_GET_SP(_t) (_t)->md.context[4] +#define _PR_NUM_GCREGS _JBLEN + +#define CONTEXT(_th) ((_th)->md.context) + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if(_SETJMP(CONTEXT(_thread))) (*_main)(); \ + _MD_GET_SP(_thread) = (int) ((_sp) - 128); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!_SETJMP(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + _LONGJMP(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures. + * Don't use SVR4 native threads (yet). + */ + +struct _MDThread { + _PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +/* + * The following are copied from _sunos.h, _aix.h. This means + * some of them should probably be moved into _unixos.h. But + * _irix.h seems to be quite different in regard to these macros. + */ +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#include <unistd.h> +#include <sys/types.h> +#include <sys/time.h> +extern int _select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *execptfds, struct timeval *timeout); +#define _MD_SELECT _select + +#define _MD_POLL _poll +#include <poll.h> +#include <stropts.h> +extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout); + +#endif /* nspr_dgux_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_freebsd.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_freebsd.h new file mode 100644 index 00000000..b684ef79 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_freebsd.h @@ -0,0 +1,278 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_freebsd_defs_h___ +#define nspr_freebsd_defs_h___ + +#include "prthread.h" + +#if __FreeBSD__ >= 2 +#include <osreldate.h> /* for __FreeBSD_version */ +#endif +#include <sys/syscall.h> + +#define PR_LINKER_ARCH "freebsd" +#define _PR_SI_SYSNAME "FREEBSD" +#if defined(__i386__) +#define _PR_SI_ARCHITECTURE "x86" +#elif defined(__alpha__) +#define _PR_SI_ARCHITECTURE "alpha" +#elif defined(__sparc__) +#define _PR_SI_ARCHITECTURE "sparc" +#elif defined(__ia64__) +#define _PR_SI_ARCHITECTURE "ia64" +#elif defined(__amd64__) +#define _PR_SI_ARCHITECTURE "amd64" +#else +#error "Unknown CPU architecture" +#endif +#if defined(__ELF__) +#define PR_DLL_SUFFIX ".so" +#else +#define PR_DLL_SUFFIX ".so.1.0" +#endif + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_DLFCN +#define _PR_HAVE_SOCKADDR_LEN +#define _PR_STAT_HAS_ST_ATIMESPEC +#define _PR_NO_LARGE_FILES + +#if defined(_PR_PTHREADS) +#if __FreeBSD_version >= 400008 +/* + * libc_r before this version of FreeBSD doesn't have poll(). + * Although libc has poll(), it is not thread-safe so we can't + * use it in the pthreads version. + */ +#define _PR_POLL_AVAILABLE +#endif +#else +#if __FreeBSD_version >= 300000 +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#endif +#endif + +#define _PR_HAVE_SYSV_SEMAPHORES +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY + +#if __FreeBSD_version >= 400014 +#define _PR_INET6 +#define _PR_HAVE_INET_NTOP +#define _PR_HAVE_GETHOSTBYNAME2 +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#define _PR_IPV6_V6ONLY_PROBE +#endif + +#define USE_SETJMP + +#ifndef _PR_PTHREADS +#include <setjmp.h> + +#define PR_CONTEXT_TYPE sigjmp_buf + +#define CONTEXT(_th) ((_th)->md.context) + +#define _MD_GET_SP(_th) (_th)->md.context[0]._sjb[2] +#define PR_NUM_GCREGS _JBLEN + +/* +** Initialize a thread context to run "_main()" when started +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (sigsetjmp(CONTEXT(_thread), 1)) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!sigsetjmp(CONTEXT(_thread), 1)) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + siglongjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +extern PRStatus _MD_InitializeThread(PRThread *thread); + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread +#define _MD_RESUME_THREAD(thread) _MD_resume_thread +#define _MD_CLEAN_THREAD(_thread) + +extern PRStatus _MD_CREATE_THREAD( + PRThread *thread, + void (*start) (void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +extern void _MD_SET_PRIORITY(struct _MDThread *thread, PRUintn newPri); +extern PRStatus _MD_WAIT(PRThread *, PRIntervalTime timeout); +extern PRStatus _MD_WAKEUP_WAITER(PRThread *); +extern void _MD_YIELD(void); + +#endif /* ! _PR_PTHREADS */ + +extern void _MD_EarlyInit(void); +extern PRIntervalTime _PR_UNIX_GetInterval(void); +extern PRIntervalTime _PR_UNIX_TicksPerSecond(void); + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) + +#if defined(_PR_POLL_AVAILABLE) +#include <poll.h> +#define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout) +#endif + +/* freebsd has INADDR_LOOPBACK defined, but in /usr/include/rpc/types.h, and I didn't + want to be including that.. */ +#ifndef INADDR_LOOPBACK +#define INADDR_LOOPBACK (u_long)0x7F000001 +#endif + +/* For writev() */ +#include <sys/uio.h> + +#endif /* nspr_freebsd_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_hpux.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_hpux.h new file mode 100644 index 00000000..73928313 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_hpux.h @@ -0,0 +1,257 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_xhppa_defs_h___ +#define nspr_xhppa_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "hpux" +#define _PR_SI_SYSNAME "HPUX" +#define _PR_SI_ARCHITECTURE "hppa1.1" +#define PR_DLL_SUFFIX ".sl" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +/* + * _USE_BIG_FDS increases the size of fd_set from 256 bytes to + * about 7500 bytes. PR_Poll allocates three fd_sets on the + * stack, so it is safer to also increase the default thread + * stack size. + */ +#define _MD_DEFAULT_STACK_SIZE (2*65536L) +#define _MD_MINIMUM_STACK_SIZE (2*65536L) +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#define NEED_TIME_R + +#define HAVE_STACK_GROWING_UP +#undef HAVE_WEAK_IO_SYMBOLS +#undef HAVE_WEAK_MALLOC_SYMBOLS +#define HAVE_DLL +#ifdef IS_64 +#define USE_DLFCN +#else +#define USE_HPSHL +#endif +#ifndef HAVE_STRERROR +#define HAVE_STRERROR +#endif +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_STAT_HAS_ONLY_ST_ATIME +#define _PR_HAVE_POSIX_SEMAPHORES +#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY +#define _PR_ACCEPT_INHERIT_NONBLOCK + +#undef _PR_HAVE_ATOMIC_OPS + +#ifdef _PR_INET6 +#define _PR_HAVE_INET_NTOP +#define _PR_HAVE_GETIPNODEBYNAME +#define _PR_HAVE_GETIPNODEBYADDR +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#endif + +#if !defined(_PR_PTHREADS) + +#include <syscall.h> +#include <setjmp.h> + +#define USE_SETJMP + +#define _MD_GET_SP(_t) (*((int *)((_t)->md.jb) + 1)) +#define PR_NUM_GCREGS _JBLEN +/* Caveat: This makes jmp_buf full of doubles. */ +#define CONTEXT(_th) ((_th)->md.jb) + + /* Stack needs two frames (64 bytes) at the bottom */ \ +#define _MD_SET_THR_SP(_t, _sp) ((_MD_GET_SP(_t)) = (int) (_sp + 64 *2)) +#define SAVE_CONTEXT(_th) _setjmp(CONTEXT(_th)) +#define GOTO_CONTEXT(_th) _longjmp(CONTEXT(_th), 1) + +#if !defined(PTHREADS_USER) + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *(status) = PR_TRUE; \ + if (_setjmp(CONTEXT(_thread))) (*_main)(); \ + /* Stack needs two frames (64 bytes) at the bottom */ \ + (_MD_GET_SP(_thread)) = (int) ((_sp) + 64*2); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!_setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + _longjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures. HP-UX has no native threads. */ + +struct _MDThread { + jmp_buf jb; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread +#define _MD_RESUME_THREAD(thread) _MD_resume_thread +#define _MD_CLEAN_THREAD(_thread) + +#else /* PTHREADS_USER */ + +#include "_nspr_pthread.h" + +#endif /* PTHREADS_USER */ + +#endif /* !defined(_PR_PTHREADS) */ + +#if !defined(PTHREADS_USER) +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#endif + +#if defined(HPUX_LW_TIMER) +extern void _PR_HPUX_LW_IntervalInit(void); +extern PRIntervalTime _PR_HPUX_LW_GetInterval(void); +#define _MD_INTERVAL_INIT _PR_HPUX_LW_IntervalInit +#define _MD_GET_INTERVAL _PR_HPUX_LW_GetInterval +#define _MD_INTERVAL_PER_SEC() 1000 +#else +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond +#endif + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) + +#include <poll.h> +#define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout) + +#ifdef HPUX11 +extern void _MD_hpux_map_sendfile_error(int err); +#endif /* HPUX11 */ + +#endif /* nspr_xhppa_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_irix.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_irix.h new file mode 100644 index 00000000..c38bb4bc --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_irix.h @@ -0,0 +1,470 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_irix_defs_h___ +#define nspr_irix_defs_h___ + +#define _PR_HAVE_ATOMIC_CAS + +/* + * MipsPro assembler defines _LANGUAGE_ASSEMBLY + */ +#ifndef _LANGUAGE_ASSEMBLY + +#include "prclist.h" +#include "prthread.h" +#include <sys/ucontext.h> + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "irix" +#define _PR_SI_SYSNAME "IRIX" +#define _PR_SI_ARCHITECTURE "mips" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _PR_NUM_GCREGS 9 +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MIN_STACK_SIZE 16384L + +#undef HAVE_STACK_GROWING_UP +#define HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_MALLOC_SYMBOLS +#define HAVE_DLL +#define USE_DLFCN +#define _PR_HAVE_ATOMIC_OPS +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_STAT_HAS_ST_ATIM +#define _PR_HAVE_OFF64_T +#define HAVE_POINTER_LOCALTIME_R +#define _PR_HAVE_POSIX_SEMAPHORES +#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY +#define _PR_ACCEPT_INHERIT_NONBLOCK + +#ifdef _PR_INET6 +#define _PR_HAVE_INET_NTOP +#define _PR_HAVE_GETIPNODEBYNAME +#define _PR_HAVE_GETIPNODEBYADDR +#define _PR_HAVE_GETADDRINFO +#endif + +/* Initialization entry points */ +NSPR_API(void) _MD_EarlyInit(void); +#define _MD_EARLY_INIT _MD_EarlyInit + +NSPR_API(void) _MD_IrixInit(void); +#define _MD_FINAL_INIT _MD_IrixInit + +#define _MD_INIT_IO() + +/* Timer operations */ +NSPR_API(PRIntervalTime) _MD_IrixGetInterval(void); +#define _MD_GET_INTERVAL _MD_IrixGetInterval + +NSPR_API(PRIntervalTime) _MD_IrixIntervalPerSec(void); +#define _MD_INTERVAL_PER_SEC _MD_IrixIntervalPerSec + +/* GC operations */ +NSPR_API(void *) _MD_GetSP(PRThread *thread); +#define _MD_GET_SP _MD_GetSP + +/* The atomic operations */ +#include <mutex.h> +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_INCREMENT(val) add_then_test((unsigned long*)val, 1) +#define _MD_ATOMIC_ADD(ptr, val) add_then_test((unsigned long*)ptr, (unsigned long)val) +#define _MD_ATOMIC_DECREMENT(val) add_then_test((unsigned long*)val, 0xffffffff) +#define _MD_ATOMIC_SET(val, newval) test_and_set((unsigned long*)val, newval) + +#if defined(_PR_PTHREADS) +#else /* defined(_PR_PTHREADS) */ + +/************************************************************************/ + +#include <setjmp.h> +#include <errno.h> +#include <unistd.h> +#include <bstring.h> +#include <sys/time.h> +#include <ulocks.h> +#include <sys/prctl.h> + + +/* + * Data region private to each sproc. This region is setup by calling + * mmap(...,MAP_LOCAL,...). The private data is mapped at the same + * address in every sproc, but every sproc gets a private mapping. + * + * Just make sure that this structure fits in a page, as only one page + * is allocated for the private region. + */ +struct sproc_private_data { + struct PRThread *me; + struct _PRCPU *cpu; + struct PRThread *last; + PRUintn intsOff; + int sproc_pid; +}; + +extern char *_nspr_sproc_private; + +#define _PR_PRDA() ((struct sproc_private_data *) _nspr_sproc_private) +#define _MD_SET_CURRENT_THREAD(_thread) _PR_PRDA()->me = (_thread) +#define _MD_THIS_THREAD() (_PR_PRDA()->me) +#define _MD_LAST_THREAD() (_PR_PRDA()->last) +#define _MD_SET_LAST_THREAD(_thread) _PR_PRDA()->last = (_thread) +#define _MD_CURRENT_CPU() (_PR_PRDA()->cpu) +#define _MD_SET_CURRENT_CPU(_cpu) _PR_PRDA()->cpu = (_cpu) +#define _MD_SET_INTSOFF(_val) (_PR_PRDA()->intsOff = _val) +#define _MD_GET_INTSOFF() (_PR_PRDA()->intsOff) + +#define _MD_SET_SPROC_PID(_val) (_PR_PRDA()->sproc_pid = _val) +#define _MD_GET_SPROC_PID() (_PR_PRDA()->sproc_pid) + +NSPR_API(struct PRThread*) _MD_get_attached_thread(void); +NSPR_API(struct PRThread*) _MD_get_current_thread(void); +#define _MD_GET_ATTACHED_THREAD() _MD_get_attached_thread() +#define _MD_CURRENT_THREAD() _MD_get_current_thread() + +#define _MD_CHECK_FOR_EXIT() { \ + if (_pr_irix_exit_now) { \ + _PR_POST_SEM(_pr_irix_exit_sem); \ + _MD_Wakeup_CPUs(); \ + _exit(0); \ + } \ + } + +#define _MD_ATTACH_THREAD(threadp) + +#define _MD_SAVE_ERRNO(_thread) (_thread)->md.errcode = errno; +#define _MD_RESTORE_ERRNO(_thread) errno = (_thread)->md.errcode; + +extern struct _PRCPU *_pr_primordialCPU; +extern usema_t *_pr_irix_exit_sem; +extern PRInt32 _pr_irix_exit_now; +extern int _pr_irix_primoridal_cpu_fd[]; +extern PRInt32 _pr_irix_process_exit; +extern PRInt32 _pr_irix_process_exit_code; + +/* Thread operations */ +#define _PR_LOCK_HEAP() { \ + PRIntn _is; \ + if (_pr_primordialCPU) { \ + if (_MD_GET_ATTACHED_THREAD() && \ + !_PR_IS_NATIVE_THREAD( \ + _MD_GET_ATTACHED_THREAD())) \ + _PR_INTSOFF(_is); \ + _PR_LOCK(_pr_heapLock); \ + } + +#define _PR_UNLOCK_HEAP() if (_pr_primordialCPU) { \ + _PR_UNLOCK(_pr_heapLock); \ + if (_MD_GET_ATTACHED_THREAD() && \ + !_PR_IS_NATIVE_THREAD( \ + _MD_GET_ATTACHED_THREAD())) \ + _PR_INTSON(_is); \ + } \ + } + +#define _PR_OPEN_POLL_SEM(_sem) usopenpollsema(_sem, 0666) +#define _PR_WAIT_SEM(_sem) uspsema(_sem) +#define _PR_POST_SEM(_sem) usvsema(_sem) + +#define _MD_CVAR_POST_SEM(threadp) usvsema((threadp)->md.cvar_pollsem) + +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +struct _MDLock { + ulock_t lock; + usptr_t *arena; +}; + +/* + * disable pre-emption for the LOCAL threads when calling the arena lock + * routines + */ + +#define _PR_LOCK(lock) { \ + PRIntn _is; \ + PRThread *me = _MD_GET_ATTACHED_THREAD(); \ + if (me && !_PR_IS_NATIVE_THREAD(me)) \ + _PR_INTSOFF(_is); \ + ussetlock(lock); \ + if (me && !_PR_IS_NATIVE_THREAD(me)) \ + _PR_FAST_INTSON(_is); \ + } + +#define _PR_UNLOCK(lock) { \ + PRIntn _is; \ + PRThread *me = _MD_GET_ATTACHED_THREAD(); \ + if (me && !_PR_IS_NATIVE_THREAD(me)) \ + _PR_INTSOFF(_is); \ + usunsetlock(lock); \ + if (me && !_PR_IS_NATIVE_THREAD(me)) \ + _PR_FAST_INTSON(_is); \ + } + +NSPR_API(PRStatus) _MD_NEW_LOCK(struct _MDLock *md); +NSPR_API(void) _MD_FREE_LOCK(struct _MDLock *lockp); + +#define _MD_LOCK(_lockp) _PR_LOCK((_lockp)->lock) +#define _MD_UNLOCK(_lockp) _PR_UNLOCK((_lockp)->lock) +#define _MD_TEST_AND_LOCK(_lockp) (uscsetlock((_lockp)->lock, 1) == 0) + +extern ulock_t _pr_heapLock; + +struct _MDThread { + jmp_buf jb; + usptr_t *pollsem_arena; + usema_t *cvar_pollsem; + PRInt32 cvar_pollsemfd; + PRInt32 cvar_pollsem_select; /* acquire sem by calling select */ + PRInt32 cvar_wait; /* if 1, thread is waiting on cvar Q */ + PRInt32 id; + PRInt32 suspending_id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDSemaphore { + usema_t *sem; +}; + +struct _MDCVar { + ulock_t mdcvar_lock; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + + +struct _MDCPU { + PRInt32 id; + PRInt32 suspending_id; + struct _MDCPU_Unix md_unix; +}; + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + int *jb = (_thread)->md.jb; \ + *status = PR_TRUE; \ + (void) setjmp(jb); \ + (_thread)->md.jb[JB_SP] = (int) ((_sp) - 64); \ + (_thread)->md.jb[JB_PC] = (int) _main; \ + _thread->no_sched = 0; \ + PR_END_MACRO + +/* +** Switch away from the current thread context by saving its state and +** calling the thread scheduler. Reload cpu when we come back from the +** context switch because it might have changed. +* +* XXX RUNQ lock needed before clearing _PR_NO_SCHED flag, because the +* thread may be unr RUNQ? +*/ +#define _MD_SWITCH_CONTEXT(_thread) \ + PR_BEGIN_MACRO \ + PR_ASSERT(_thread->no_sched); \ + if (!setjmp(_thread->md.jb)) { \ + _MD_SAVE_ERRNO(_thread) \ + _MD_SET_LAST_THREAD(_thread); \ + _PR_Schedule(); \ + } else { \ + PR_ASSERT(_MD_LAST_THREAD() !=_MD_CURRENT_THREAD()); \ + _MD_LAST_THREAD()->no_sched = 0; \ + } \ + PR_END_MACRO + +/* +** Restore a thread context that was saved by _MD_SWITCH_CONTEXT or +** initialized by _MD_INIT_CONTEXT. +*/ +#define _MD_RESTORE_CONTEXT(_newThread) \ + PR_BEGIN_MACRO \ + int *jb = (_newThread)->md.jb; \ + _MD_RESTORE_ERRNO(_newThread) \ + _MD_SET_CURRENT_THREAD(_newThread); \ + _newThread->no_sched = 1; \ + longjmp(jb, 1); \ + PR_END_MACRO + +NSPR_API(PRStatus) _MD_InitThread(struct PRThread *thread, + PRBool wakeup_parent); +NSPR_API(PRStatus) _MD_InitAttachedThread(struct PRThread *thread, + PRBool wakeup_parent); +#define _MD_INIT_THREAD(thread) _MD_InitThread(thread, PR_TRUE) +#define _MD_INIT_ATTACHED_THREAD(thread) \ + _MD_InitAttachedThread(thread, PR_FALSE) + +NSPR_API(void) _MD_ExitThread(struct PRThread *thread); +#define _MD_EXIT_THREAD _MD_ExitThread + +NSPR_API(void) _MD_SuspendThread(struct PRThread *thread); +#define _MD_SUSPEND_THREAD _MD_SuspendThread + +NSPR_API(void) _MD_ResumeThread(struct PRThread *thread); +#define _MD_RESUME_THREAD _MD_ResumeThread + +NSPR_API(void) _MD_SuspendCPU(struct _PRCPU *thread); +#define _MD_SUSPEND_CPU _MD_SuspendCPU + +NSPR_API(void) _MD_ResumeCPU(struct _PRCPU *thread); +#define _MD_RESUME_CPU _MD_ResumeCPU + +#define _MD_BEGIN_SUSPEND_ALL() +#define _MD_END_SUSPEND_ALL() +#define _MD_BEGIN_RESUME_ALL() +#define _MD_END_RESUME_ALL() + +NSPR_API(void) _MD_InitLocks(void); +#define _MD_INIT_LOCKS _MD_InitLocks + +NSPR_API(void) _MD_CleanThread(struct PRThread *thread); +#define _MD_CLEAN_THREAD _MD_CleanThread + +#define _MD_YIELD() sginap(0) + +/* The _PR_MD_WAIT_LOCK and _PR_MD_WAKEUP_WAITER functions put to sleep and + * awaken a thread which is waiting on a lock or cvar. + */ +NSPR_API(PRStatus) _MD_wait(struct PRThread *, PRIntervalTime timeout); +#define _MD_WAIT _MD_wait + +NSPR_API(void) _PR_MD_primordial_cpu(); +NSPR_API(void) _PR_MD_WAKEUP_PRIMORDIAL_CPU(); + +NSPR_API(PRStatus) _MD_WakeupWaiter(struct PRThread *); +#define _MD_WAKEUP_WAITER _MD_WakeupWaiter + +NSPR_API(void ) _MD_exit(PRIntn status); +#define _MD_EXIT _MD_exit + +#include "prthread.h" + +NSPR_API(void) _MD_SetPriority(struct _MDThread *thread, + PRThreadPriority newPri); +#define _MD_SET_PRIORITY _MD_SetPriority + +NSPR_API(PRStatus) _MD_CreateThread( + struct PRThread *thread, + void (*start) (void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +#define _MD_CREATE_THREAD _MD_CreateThread + +extern void _MD_CleanupBeforeExit(void); +#define _MD_CLEANUP_BEFORE_EXIT _MD_CleanupBeforeExit + +NSPR_API(void) _PR_MD_PRE_CLEANUP(PRThread *me); + + +/* The following defines the unwrapped versions of select() and poll(). */ +extern int _select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, struct timeval *timeout); +#define _MD_SELECT _select + +#include <stropts.h> +#include <poll.h> +#define _MD_POLL _poll +extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout); + + +#define HAVE_THREAD_AFFINITY 1 + +NSPR_API(PRInt32) _MD_GetThreadAffinityMask(PRThread *unused, PRUint32 *mask); +#define _MD_GETTHREADAFFINITYMASK _MD_GetThreadAffinityMask + +NSPR_API(void) _MD_InitRunningCPU(struct _PRCPU *cpu); +#define _MD_INIT_RUNNING_CPU _MD_InitRunningCPU + +#endif /* defined(_PR_PTHREADS) */ + +#endif /* _LANGUAGE_ASSEMBLY */ + +#endif /* nspr_irix_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_linux.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_linux.h new file mode 100644 index 00000000..92a5f38a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_linux.h @@ -0,0 +1,559 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_linux_defs_h___ +#define nspr_linux_defs_h___ + +#include "prthread.h" + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "linux" +#define _PR_SI_SYSNAME "LINUX" +#ifdef __powerpc64__ +#define _PR_SI_ARCHITECTURE "ppc64" +#elif defined(__powerpc__) +#define _PR_SI_ARCHITECTURE "ppc" +#elif defined(__alpha) +#define _PR_SI_ARCHITECTURE "alpha" +#elif defined(__ia64__) +#define _PR_SI_ARCHITECTURE "ia64" +#elif defined(__x86_64__) +#define _PR_SI_ARCHITECTURE "x86-64" +#elif defined(__mc68000__) +#define _PR_SI_ARCHITECTURE "m68k" +#elif defined(__sparc__) +#define _PR_SI_ARCHITECTURE "sparc" +#elif defined(__i386__) +#define _PR_SI_ARCHITECTURE "x86" +#elif defined(__mips__) +#define _PR_SI_ARCHITECTURE "mips" +#elif defined(__arm__) +#define _PR_SI_ARCHITECTURE "arm" +#elif defined(__hppa__) +#define _PR_SI_ARCHITECTURE "hppa" +#elif defined(__s390x__) +#define _PR_SI_ARCHITECTURE "s390x" +#elif defined(__s390__) +#define _PR_SI_ARCHITECTURE "s390" +#else +#error "Unknown CPU architecture" +#endif +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP + +/* + * Elf linux supports dl* functions + */ +#define HAVE_DLL +#define USE_DLFCN + +#if defined(__i386__) +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +extern PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val); +#define _MD_ATOMIC_INCREMENT _PR_x86_AtomicIncrement +extern PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val); +#define _MD_ATOMIC_DECREMENT _PR_x86_AtomicDecrement +extern PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val); +#define _MD_ATOMIC_ADD _PR_x86_AtomicAdd +extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval); +#define _MD_ATOMIC_SET _PR_x86_AtomicSet +#endif + +#if defined(__ia64__) +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +extern PRInt32 _PR_ia64_AtomicIncrement(PRInt32 *val); +#define _MD_ATOMIC_INCREMENT _PR_ia64_AtomicIncrement +extern PRInt32 _PR_ia64_AtomicDecrement(PRInt32 *val); +#define _MD_ATOMIC_DECREMENT _PR_ia64_AtomicDecrement +extern PRInt32 _PR_ia64_AtomicAdd(PRInt32 *ptr, PRInt32 val); +#define _MD_ATOMIC_ADD _PR_ia64_AtomicAdd +extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval); +#define _MD_ATOMIC_SET _PR_ia64_AtomicSet +#endif + +#if defined(__x86_64__) +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val); +#define _MD_ATOMIC_INCREMENT _PR_x86_64_AtomicIncrement +extern PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val); +#define _MD_ATOMIC_DECREMENT _PR_x86_64_AtomicDecrement +extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val); +#define _MD_ATOMIC_ADD _PR_x86_64_AtomicAdd +extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval); +#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet +#endif + +#if defined(__alpha) +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_ADD(ptr, i) ({ \ + PRInt32 __atomic_tmp, __atomic_ret; \ + __asm__ __volatile__( \ + "1: ldl_l %[ret], %[val] \n" \ + " addl %[ret], %[inc], %[tmp] \n" \ + " addl %[ret], %[inc], %[ret] \n" \ + " stl_c %[tmp], %[val] \n" \ + " beq %[tmp], 2f \n" \ + ".subsection 2 \n" \ + "2: br 1b \n" \ + ".previous" \ + : [ret] "=&r" (__atomic_ret), \ + [tmp] "=&r" (__atomic_tmp), \ + [val] "=m" (*ptr) \ + : [inc] "Ir" (i), "m" (*ptr)); \ + __atomic_ret; \ +}) +#define _MD_ATOMIC_INCREMENT(ptr) _MD_ATOMIC_ADD(ptr, 1) +#define _MD_ATOMIC_DECREMENT(ptr) ({ \ + PRInt32 __atomic_tmp, __atomic_ret; \ + __asm__ __volatile__( \ + "1: ldl_l %[ret], %[val] \n" \ + " subl %[ret], 1, %[tmp] \n" \ + " subl %[ret], 1, %[ret] \n" \ + " stl_c %[tmp], %[val] \n" \ + " beq %[tmp], 2f \n" \ + ".subsection 2 \n" \ + "2: br 1b \n" \ + ".previous" \ + : [ret] "=&r" (__atomic_ret), \ + [tmp] "=&r" (__atomic_tmp), \ + [val] "=m" (*ptr) \ + : "m" (*ptr)); \ + __atomic_ret; \ +}) +#define _MD_ATOMIC_SET(ptr, n) ({ \ + PRInt32 __atomic_tmp, __atomic_ret; \ + __asm__ __volatile__( \ + "1: ldl_l %[ret], %[val] \n" \ + " mov %[newval], %[tmp] \n" \ + " stl_c %[tmp], %[val] \n" \ + " beq %[tmp], 2f \n" \ + ".subsection 2 \n" \ + "2: br 1b \n" \ + ".previous" \ + : [ret] "=&r" (__atomic_ret), \ + [tmp] "=&r"(__atomic_tmp), \ + [val] "=m" (*ptr) \ + : [newval] "Ir" (n), "m" (*ptr)); \ + __atomic_ret; \ +}) +#endif + +#define USE_SETJMP +#if defined(__GLIBC__) && __GLIBC__ >= 2 +#define _PR_POLL_AVAILABLE +#endif +#undef _PR_USE_POLL +#define _PR_STAT_HAS_ONLY_ST_ATIME +#if defined(__alpha) || defined(__ia64__) +#define _PR_HAVE_LARGE_OFF_T +#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) +#define _PR_HAVE_OFF64_T +#else +#define _PR_NO_LARGE_FILES +#endif +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) +#define _PR_INET6 +#define _PR_HAVE_INET_NTOP +#define _PR_HAVE_GETHOSTBYNAME2 +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#endif +#define _PR_HAVE_SYSV_SEMAPHORES +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY +#if (__GLIBC__ >= 2) && defined(_PR_PTHREADS) +#define _PR_HAVE_GETHOST_R +#define _PR_HAVE_GETHOST_R_INT +#endif + +#ifdef _PR_PTHREADS + +extern void _MD_CleanupBeforeExit(void); +#define _MD_CLEANUP_BEFORE_EXIT _MD_CleanupBeforeExit + +#else /* ! _PR_PTHREADS */ + +#include <setjmp.h> + +#define PR_CONTEXT_TYPE sigjmp_buf + +#define CONTEXT(_th) ((_th)->md.context) + +#ifdef __powerpc__ +/* + * PowerPC based MkLinux + * + * On the PowerPC, the new style jmp_buf isn't used until glibc + * 2.1. + */ +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[JB_GPR1] +#else +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__misc[0] +#endif /* glibc 2.1 or later */ +#define _MD_SET_FP(_t, val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) ((void *) 0) +/* aix = 64, macos = 70 */ +#define PR_NUM_GCREGS 64 + +#elif defined(__alpha) +/* Alpha based Linux */ + +#if defined(__GLIBC__) && __GLIBC__ >= 2 +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[JB_SP] +#define _MD_SET_FP(_t, val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) ((void *) 0) +#define _MD_SP_TYPE long int +#else +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__sp +#define _MD_SET_FP(_t, val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) ((void *) 0) +#define _MD_SP_TYPE __ptr_t +#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ + +/* XXX not sure if this is correct, or maybe it should be 17? */ +#define PR_NUM_GCREGS 9 + +#elif defined(__ia64__) + +#define _MD_GET_SP(_t) ((long *)((_t)->md.context[0].__jmpbuf)[0]) +#define _MD_SET_FP(_t, val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) ((void *) 0) +#define _MD_SP_TYPE long int + +#define PR_NUM_GCREGS _JBLEN + +#elif defined(__mc68000__) +/* m68k based Linux */ + +/* + * On the m68k, glibc still uses the old style sigjmp_buf, even + * in glibc 2.0.7. + */ +#if defined(__GLIBC__) && __GLIBC__ >= 2 +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__sp +#define _MD_SET_FP(_t, val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) ((void *) 0) +#define _MD_SP_TYPE int +#else +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__sp +#define _MD_SET_FP(_t, val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) ((void *) 0) +#define _MD_SP_TYPE __ptr_t +#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ + +/* XXX not sure if this is correct, or maybe it should be 17? */ +#define PR_NUM_GCREGS 9 + +#elif defined(__sparc__) +/* Sparc */ +#if defined(__GLIBC__) && __GLIBC__ >= 2 +/* + * You need glibc2-2.0.7-25 or later. The libraries that came with + * Red Hat 5.1 are not new enough, but they are in 5.2. + */ +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[JB_SP] +#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[JB_FP] = val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[JB_FP]) +#define _MD_SP_TYPE int +#else +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__fp +#define _MD_SET_FP(_t, val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) ((void *) 0) +#define _MD_SP_TYPE __ptr_t +#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ + +#elif defined(__i386__) +/* Intel based Linux */ +#if defined(__GLIBC__) && __GLIBC__ >= 2 +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[JB_SP] +#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[JB_BP] = val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[JB_BP]) +#define _MD_SP_TYPE int +#else +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__sp +#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[0].__bp = val) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) &((_t)->md.context[0].__jmpbuf[0].__bp) +#define _MD_SP_TYPE __ptr_t +#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ +#define PR_NUM_GCREGS 6 + +#elif defined(__mips__) +/* Linux/MIPS */ +#if defined(__GLIBC__) && __GLIBC__ >= 2 +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[0].__sp +#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[0].__fp = (val)) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[0].__fp) +#define _MD_SP_TYPE __ptr_t +#else +#error "Linux/MIPS pre-glibc2 not supported yet" +#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ + +#elif defined(__arm__) +/* ARM/Linux */ +#if defined(__GLIBC__) && __GLIBC__ >= 2 +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20] +#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[19] = (val)) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[19]) +#define _MD_SP_TYPE __ptr_t +#else +#error "ARM/Linux pre-glibc2 not supported yet" +#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ + +#else + +#error "Unknown CPU architecture" + +#endif /*__powerpc__*/ + +/* +** Initialize a thread context to run "_main()" when started +*/ +#ifdef __powerpc__ + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (sigsetjmp(CONTEXT(_thread), 1)) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 128); \ + _thread->md.sp = _MD_GET_SP_PTR(_thread); \ + _thread->md.fp = _MD_GET_FP_PTR(_thread); \ + _MD_SET_FP(_thread, 0); \ +} + +#elif defined(__mips__) + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + (void) sigsetjmp(CONTEXT(_thread), 1); \ + _thread->md.context[0].__jmpbuf[0].__pc = (__ptr_t) _main; \ + _MD_GET_SP(_thread) = (_MD_SP_TYPE) ((_sp) - 64); \ + _thread->md.sp = _MD_GET_SP_PTR(_thread); \ + _thread->md.fp = _MD_GET_FP_PTR(_thread); \ + _MD_SET_FP(_thread, 0); \ +} + +#else + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (sigsetjmp(CONTEXT(_thread), 1)) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (_MD_SP_TYPE) ((_sp) - 64); \ + _thread->md.sp = _MD_GET_SP_PTR(_thread); \ + _thread->md.fp = _MD_GET_FP_PTR(_thread); \ + _MD_SET_FP(_thread, 0); \ +} + +#endif /*__powerpc__*/ + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!sigsetjmp(CONTEXT(_thread), 1)) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + siglongjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + void *sp; + void *fp; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#include <sys/time.h> /* for FD_SETSIZE */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +extern PRStatus _MD_InitializeThread(PRThread *thread); + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread +#define _MD_RESUME_THREAD(thread) _MD_resume_thread +#define _MD_CLEAN_THREAD(_thread) + +extern PRStatus _MD_CREATE_THREAD( + PRThread *thread, + void (*start) (void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +extern void _MD_SET_PRIORITY(struct _MDThread *thread, PRUintn newPri); +extern PRStatus _MD_WAIT(PRThread *, PRIntervalTime timeout); +extern PRStatus _MD_WAKEUP_WAITER(PRThread *); +extern void _MD_YIELD(void); + +#endif /* ! _PR_PTHREADS */ + +extern void _MD_EarlyInit(void); +extern PRIntervalTime _PR_UNIX_GetInterval(void); +extern PRIntervalTime _PR_UNIX_TicksPerSecond(void); + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT __select + +#ifdef _PR_POLL_AVAILABLE +#include <sys/poll.h> +extern int __syscall_poll(struct pollfd *ufds, unsigned long int nfds, + int timeout); +#define _MD_POLL __syscall_poll +#endif + +/* For writev() */ +#include <sys/uio.h> + +extern void _MD_linux_map_sendfile_error(int err); + +#endif /* nspr_linux_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_macos.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_macos.h new file mode 100644 index 00000000..dbcab409 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_macos.h @@ -0,0 +1,725 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prmacos_h___ +#define prmacos_h___ + +// +// This file contains all changes and additions which need to be made to the NSPR runtime +// for the Macintosh platform (specifically the Metrowerks environment). This file should +// only be incluced in Macintosh builds. +// + +#define PR_DLL_SUFFIX "" +#define _PR_LOCAL_THREADS_ONLY +#define _PR_NO_PREEMPT 1 +#define _PR_HAVE_ATOMIC_OPS 1 + +#include "prinit.h" +#include "prio.h" +#include "prlong.h" +#include "prlock.h" +#include "prcvar.h" +#include "prsem.h" +#include "prthread.h" +#include "prtime.h" +#include "prproces.h" + +#if !defined(MAC_NSPR_STANDALONE) +#include "macstdlibextras.h" +#endif + +#include <stddef.h> +#include <setjmp.h> + +#include <Errors.h> +#include <OpenTransport.h> +#include <DriverServices.h> + +#define _PR_HAVE_PEEK_BUFFER +#define _PR_PEEK_BUFFER_MAX (16 * 1024) +#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) 1 + +struct _MDProcess { + PRInt8 notused; +}; + +struct _MDThread { + jmp_buf jb; + int osErrCode; + PRLock * asyncIOLock; + PRCondVar * asyncIOCVar; + PRBool missedIONotify; + PRBool missedAsyncNotify; + PRBool asyncNotifyPending; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +struct _MDCPU { + AbsoluteTime lastThreadSwitch; + AbsoluteTime lastWakeUpProcess; + PRBool trackScheduling; +}; + +typedef struct _MDSocketCallerInfo { + PRThread * thread; + void * cookie; +} _MDSocketCallerInfo; + +struct _MDFileDesc { + PRInt32 osfd; + PRPackedBool orderlyDisconnect; + PRPackedBool readReady; + PRPackedBool writeReady; + PRPackedBool exceptReady; + PRLock * miscLock; + + /* Server sockets: listen bit tells the notifier func what to do */ + PRBool doListen; + + /* stored error for non-blocking connects, as a Unix-style error code */ + OTReason disconnectError; + + _MDSocketCallerInfo misc; + _MDSocketCallerInfo read; + _MDSocketCallerInfo write; +}; + +/* +** Iinitialization Related definitions +*/ + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _MD_FinalInit + +/* +** Interrupts Related definitions +*/ + +#define _MD_GET_INTSOFF() (_pr_intsOff) + +#define _MD_INTSOFF(_is) \ + PR_BEGIN_MACRO \ + ENTER_CRITICAL_REGION(); \ + (_is) = _PR_MD_GET_INTSOFF(); \ + _PR_MD_SET_INTSOFF(1); \ + LEAVE_CRITICAL_REGION(); \ + PR_END_MACRO + +#if TARGET_CARBON +extern void _MD_SetIntsOff(PRInt32 ints); +#define _MD_SET_INTSOFF(_val) _MD_SetIntsOff(_val) +#else /* not TARGET_CARBON */ +#define _MD_SET_INTSOFF(_val) (_pr_intsOff = _val) +#endif /* TARGET_CARBON */ + +#define _MD_START_INTERRUPTS _MD_StartInterrupts +#define _MD_STOP_INTERRUPTS _MD_StopInterrupts +#define _MD_BLOCK_CLOCK_INTERRUPTS() +#define _MD_UNBLOCK_CLOCK_INTERRUPTS() +#define _MD_DISABLE_CLOCK_INTERRUPTS() +#define _MD_ENABLE_CLOCK_INTERRUPTS() + +/* +** CPU Related definitions +*/ + +#define _MD_PAUSE_CPU _MD_PauseCPU +#define _MD_CLEANUP_BEFORE_EXIT() +#define _MD_EXIT(status) exit(status) +#define _MD_INIT_CPUS() +#define _MD_INIT_RUNNING_CPU(cpu) _MD_InitRunningCPU(cpu) + +/* +** Process Related definitions +*/ + +extern struct PRProcess * _MD_CreateProcess( + const char *path, + char *const *argv, + char *const *envp, + const PRProcessAttr *attr); +#define _MD_CREATE_PROCESS _MD_CreateProcess + +extern PRStatus _MD_DetachProcess(PRProcess *process); +#define _MD_DETACH_PROCESS _MD_DetachProcess + +extern PRStatus _MD_WaitProcess(PRProcess *process, PRInt32 *exitCode); +#define _MD_WAIT_PROCESS _MD_WaitProcess + +extern PRStatus _MD_KillProcess(PRProcess *process); +#define _MD_KILL_PROCESS _MD_KillProcess + +/* +** Memory Segments Related definitions +*/ + +#define _MD_INIT_SEGS() + +/* +** Thread Stacks Debugging Related definitions +*/ + +#define _MD_INIT_STACK _MD_InitStack +#define _MD_CLEAR_STACK _MD_ClearStack + +/* +** Locks Related definitions +*/ + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) (PR_SUCCESS) +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) + +/* +** Thread Related definitions +*/ + +NSPR_API(PRThread *) PR_GetPrimaryThread(); + +#if defined(powerc) || defined(__powerc) +#define _MD_GET_PC(_t) (*((PRUint32 *)((_t)->md.jb))) +#define _MD_GET_SP(_t) (*((PRUint32 *)((_t)->md.jb) + 2)) +#define _MD_GET_TOC(_t) (*((PRUint32 *)((_t)->md.jb) + 3)) +#define INIT_STACKPTR(stackTop) ((unsigned char*)stackTop - 128) +#define PR_NUM_GCREGS 70 +#else +#define _MD_GET_PC(_t) (*((PRUint32 *)((_t)->md.jb) + 6)) +#define _MD_GET_SP(_t) (*((PRUint32 *)((_t)->md.jb) + 12)) +#define INIT_STACKPTR(stackTop) ((unsigned char*)stackTop - 4) +#define PR_NUM_GCREGS 13 +#endif + +#define _MD_DEFAULT_STACK_SIZE (58 * 1024) +#define _MD_MINIMUM_STACK_SIZE (58 * 1024) + +/* +** Initialize the thread machine dependent data structure +*/ +extern PRStatus _MD_InitThread(PRThread *thread); +#define _MD_INIT_THREAD _MD_InitThread + +/* +** Clean-up the thread machine dependent data structure +*/ +#define _MD_CLEAN_THREAD(_thread) \ + PR_BEGIN_MACRO \ + PR_DestroyCondVar(_thread->md.asyncIOCVar); \ + PR_DestroyLock(_thread->md.asyncIOLock); \ + PR_END_MACRO + + +/* +** Initialize the thread context preparing it to execute _main. +** *sp = 0 zeros out the sp for the first stack frame so that +** stack walking code can find the top of the stack. +*/ +#if defined(powerc) || defined(__powerc) +#define _MD_INIT_CONTEXT(_thread, _sp, _main, _status) \ + PR_BEGIN_MACRO \ + unsigned char *sp; \ + unsigned long *tvect; \ + long **jb = (_thread)->md.jb; \ + *((PRBool *)_status) = PR_TRUE; \ + (void) setjmp(jb); \ + sp = INIT_STACKPTR(_sp); \ + *sp = 0; \ + (_MD_GET_SP(_thread)) = (long) sp; \ + tvect = (unsigned long *)_main; \ + (_MD_GET_PC(_thread)) = (int) *tvect; \ + (_MD_GET_TOC(_thread)) = (int) *(tvect+1); \ + _thread->no_sched = 0; \ + PR_END_MACRO +#else +#define _MD_INIT_CONTEXT(_thread, _sp, _main, _status) \ + PR_BEGIN_MACRO \ + unsigned char *sp; \ + long **jb = (_thread)->md.jb; \ + *((PRBool *)_status) = PR_TRUE; \ + (void) setjmp(jb); \ + sp = INIT_STACKPTR(_sp); \ + (_MD_GET_SP(_thread)) = (long) sp; \ + (_MD_GET_PC(_thread)) = (int) _main; \ + _thread->no_sched = 0; \ + PR_END_MACRO +#endif + +/* +** Switch away from the current thread context by saving its state and +** calling the thread scheduler. Reload cpu when we come back from the +** context switch because it might have changed. +*/ +/* ResetTimer(); before _PR_Schedule() */ + + +#define _MD_SWITCH_CONTEXT(_thread) \ + PR_BEGIN_MACRO \ + PR_ASSERT(_thread->no_sched); \ + if (!setjmp(_thread->md.jb)) { \ + _MD_SET_LAST_THREAD(_thread); \ + if (_PR_MD_CURRENT_CPU()->md.trackScheduling) \ + _PR_MD_CURRENT_CPU()->md.lastThreadSwitch = UpTime(); \ + _PR_Schedule(); \ + } else { \ + PR_ASSERT(_MD_LAST_THREAD() !=_MD_CURRENT_THREAD()); \ + _MD_LAST_THREAD()->no_sched = 0; \ + } \ + PR_END_MACRO + +/* +** Restore a thread context that was saved by _MD_SWITCH_CONTEXT or +** initialized by _MD_INIT_CONTEXT. +*/ +#define _MD_RESTORE_CONTEXT(_newThread) \ + PR_BEGIN_MACRO \ + long **jb = (_newThread)->md.jb; \ + _MD_SET_CURRENT_THREAD(_newThread); \ + _newThread->no_sched = 1; \ + longjmp(jb, 1); \ + PR_END_MACRO + + +#define _MD_ERRNO() _MD_CURRENT_THREAD()->md.osErrCode + +extern PRStatus _MD_wait(PRThread *thread, PRIntervalTime timeout); +#define _MD_WAIT _MD_wait + +/* +** Combined thread model related definitions +*/ + +#define _MD_CREATE_THREAD(a,b,c,d,e,f) (PR_SUCCESS) +#define _MD_WAKEUP_WAITER(a) +#define _MD_SET_PRIORITY(a,b) + +/* +** File I/O Related definitions +*/ + +extern PRInt32 _PR_MD_WRITE_SYNC(PRFileDesc *fd, void *buf, PRInt32 amount); +#define _PR_MD_WRITE_SYNC _MD_WRITE_SYNC + +struct _MDDir { + short ioVRefNum; + long ioDirID; + short ioFDirIndex; + char *currentEntryName; +}; + +#define PR_DIRECTORY_SEPARATOR '/' +#define PR_DIRECTORY_SEPARATOR_STR "/" +#define PR_PATH_SEPARATOR ':' +#define PR_PATH_SEPARATOR_STR ":" + +typedef enum IOOperation { + READ_ASYNC, + WRITE_ASYNC +} IOOperation; + + +#define _MD_INIT_IO() + +#define _MD_OPEN _MD_Open +#define _MD_OPEN_FILE _MD_Open +#define _MD_CLOSE_FILE FSClose +#define _MD_READ(fd,buf,amount) ReadWriteProc(fd,buf,amount,READ_ASYNC) +#define _MD_WRITE(fd,buf,amount) ReadWriteProc(fd,buf,amount,WRITE_ASYNC) +#define _MD_WRITE_SYNC(fd,buf,amount) WriteSyncProc(fd,buf,amount) +#define _MD_GET_FILE_ERROR() _PR_MD_CURRENT_THREAD()->md.osErrCode +#define _MD_LSEEK _MD_LSeek +#define _MD_FSYNC _MD_FSync + +/* to be implemented */ +#define _MD_LSEEK64(a,b,c) LL_ZERO +#define _MD_GETOPENFILEINFO64(fd,info) -1 +#define _MD_GETFILEINFO64(fd,info) -1 + +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +/* +** File Manipulation definitions +*/ + +#define _MD_RENAME _MD_Rename +#define _MD_ACCESS _MD_Access + +#define _MD_GETFILEINFO _MD_GetFileInfo +#define _MD_GETOPENFILEINFO _MD_GetOpenFileInfo + +#define _MD_STAT _MD_Stat + +#define _MD_DELETE _MD_Delete + +extern PRStatus _MD_LockFile(PRInt32 osfd); +#define _MD_LOCKFILE _MD_LockFile +extern PRStatus _MD_TLockFile(PRInt32 osfd); +#define _MD_TLOCKFILE _MD_TLockFile +extern PRStatus _MD_UnlockFile(PRInt32 osfd); +#define _MD_UNLOCKFILE _MD_UnlockFile + +/* +** Directory enumeration related definitions +*/ + +extern PRStatus _MD_OpenDir(struct _MDDir *md,const char *name); +#define _MD_OPEN_DIR _MD_OpenDir + +extern char* _MD_ReadDir(struct _MDDir *md,PRIntn flags); +#define _MD_READ_DIR _MD_ReadDir + +#define _MD_CLOSE_DIR _MD_CloseDir + +#define _MD_MKDIR _MD_MkDir +#define _MD_MAKE_DIR _MD_MkDir +#define _MD_RMDIR _MD_Delete + +/* +** Pipe I/O Related definitions (not implemented) +*/ + +#define _MD_PIPEAVAILABLE(fd) -1 + +/* +** Socket I/O Related definitions +*/ + +#if UNIVERSAL_INTERFACES_VERSION >= 0x0330 +/* In Universal Interfaces 3.3 and later, these are enums. */ +#define IP_TTL IP_TTL +#define IP_TOS IP_TOS +#define IP_ADD_MEMBERSHIP IP_ADD_MEMBERSHIP +#define IP_DROP_MEMBERSHIP IP_DROP_MEMBERSHIP +#define IP_MULTICAST_IF IP_MULTICAST_IF +#define IP_MULTICAST_TTL IP_MULTICAST_TTL +#define IP_MULTICAST_LOOP IP_MULTICAST_LOOP +#define TCP_NODELAY TCP_NODELAY +#define TCP_MAXSEG TCP_MAXSEG +#endif + +#define _MD_SOCKET _MD_socket +#define _MD_BIND _MD_bind +#define _MD_LISTEN _MD_listen +#define _MD_GETSOCKNAME _MD_getsockname + +extern PRStatus _MD_getsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, char* optval, PRInt32* optlen); +#define _MD_GETSOCKOPT _MD_getsockopt + +extern PRStatus _MD_setsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, const char* optval, PRInt32 optlen); +#define _MD_SETSOCKOPT _MD_setsockopt + +#define _MD_SOCKETAVAILABLE _MD_socketavailable +#define _MD_ACCEPT _MD_accept +#define _MD_CONNECT _MD_connect +#define _MD_SEND _MD_send +#define _MD_RECV _MD_recv +#define _MD_CLOSE_SOCKET _MD_closesocket +#define _MD_SENDTO _MD_sendto +#define _MD_RECVFROM _MD_recvfrom +#define _MD_PR_POLL _MD_poll +#define _MD_INIT_FILEDESC _MD_initfiledesc +#define _MD_FREE_FILEDESC _MD_freefiledesc +#define _MD_MAKE_NONBLOCK _MD_makenonblock +#define _MD_INIT_FD_INHERITABLE _MD_initfdinheritable +#define _MD_QUERY_FD_INHERITABLE _MD_queryfdinheritable + +#define _MD_GET_SOCKET_ERROR() _PR_MD_CURRENT_THREAD()->md.osErrCode + +#define _PR_MD_MAP_SELECT_ERROR(x) (x) +/* +** Netdb Related definitions +*/ +extern PRStatus _MD_gethostname(char *name, int namelen); +#define _MD_GETHOSTNAME _MD_gethostname +#define _PR_GET_HOST_ADDR_AS_NAME + +/* + XXX _MD_WRITEV, _MD_SHUTDOWN & _MD_GETPEERNAME not done yet!!! +*/ +#define _MD_WRITEV _MD_writev +#define _MD_SHUTDOWN _MD_shutdown +#define _MD_GETPEERNAME _MD_getpeername + + +#ifdef OLD_MACSOCK_LIBRARY +#define _MD_SOCKET macsock_socket +#define _MD_LISTEN macsock_listen +#define _MD_SEND(fd,buf,amount,flags,timeout) macsock_send(fd->secret->md.osfd,buf,amount,flags) +#define _MD_SENDTO(fd,buf,amount,flags,addr,addrlen,timeout) macsock_sendto(fd->secret->md.osfd,buf,amount,flags,(struct sockaddr *)addr,addrlen) +#define _MD_RECV(fd,buf,amount,flags,timeout) macsock_recv(fd->secret->md.osfd,buf,amount,flags) +#define _MD_RECVFROM(fd,buf,amount,flags,addr,addrlen,timeout) macsock_recvfrom(fd->secret->md.osfd,buf,amount,flags,(struct sockaddr *)addr,addrlen) +#define _MD_CLOSE_SOCKET macsock_close +#define _MD_SHUTDOWN(a,b) (0) + +#define _MD_ACCEPT(fd,addr,addrlen,timeout) macsock_accept(fd->secret->md.osfd,(struct sockaddr *)addr,addrlen) +#define _MD_CONNECT(fd,name,namelen,timeout) macsock_connect(fd->secret->md.osfd,(struct sockaddr *)name,namelen) +#define _MD_BIND(fd,name,namelen) macsock_bind(fd->secret->md.osfd,(struct sockaddr *)name,namelen) +#define _MD_GETSOCKNAME(fd,name,namelen) macsock_getsockname(fd->secret->md.osfd,(struct sockaddr *)name,namelen) +#define _MD_GETPEERNAME(fd,name,namelen) macsock_getpeername(fd->secret->md.osfd,(struct sockaddr *)name,namelen) +#define _MD_GETSOCKOPT(fd,level,optname,optval,optlen) macsock_getsockopt(fd->secret->md.osfd,level,optname,optval,optlen) +#define _MD_SETSOCKOPT(fd,level,optname,optval,optlen) macsock_setsockopt(fd->secret->md.osfd,level,optname,optval,optlen) +#define _MD_SOCKETAVAILABLE(fd,bytes) macsock_socketavailable(fd->secret->md.osfd,bytes) +#endif + +/* +** Memory Segements Related definitions +*/ + +#define _MD_INIT_SEGS() +#define _MD_ALLOC_SEGMENT _MD_AllocSegment +#define _MD_FREE_SEGMENT _MD_FreeSegment + +/* +** Time Related definitions +*/ + +#define _MD_GET_INTERVAL _MD_GetInterval +#define _MD_INTERVAL_PER_SEC() PR_MSEC_PER_SEC +#define _MD_INTERVAL_INIT() + +/* +** Environemnt Related definitions +*/ + +extern char *_MD_GetEnv(const char *name); +#define _MD_GET_ENV _MD_GetEnv + +extern int _MD_PutEnv(const char *variableCopy); +#define _MD_PUT_ENV _MD_PutEnv + +/* +** Following is old stuff to be looked at. +*/ + +#define GCPTR +#define CALLBACK +typedef int (*FARPROC)(); + + +#define MAX_NON_PRIMARY_TIME_SLICES 6 + +extern long gTimeSlicesOnNonPrimaryThread; +extern struct PRThread *gPrimaryThread; + +// Errors not found in the Mac StdCLib +#define EACCES 13 // Permission denied +#define ENOENT -43 // No such file or directory +#define _OS_INVALID_FD_VALUE -1 + +#define STDERR_FILENO 2 + +#if !defined(MAC_NSPR_STANDALONE) +#define PATH_SEPARATOR ':' +#define PATH_SEPARATOR_STR ":" +#define DIRECTORY_SEPARATOR '/' +#define DIRECTORY_SEPARATOR_STR "/" +#endif + +#define UNIX_THIS_DIRECTORY_STR "./" +#define UNIX_PARENT_DIRECTORY_STR "../" + + +// Alias a few names +#define getenv PR_GetEnv +#define putenv _MD_PutEnv + +#if defined(MAC_NSPR_STANDALONE) +typedef unsigned char (*MemoryCacheFlusherProc)(size_t size); +typedef void (*PreAllocationHookProc)(void); + +extern char *strdup(const char *source); + +extern void InstallPreAllocationHook(PreAllocationHookProc newHook); +extern void InstallMemoryCacheFlusher(MemoryCacheFlusherProc newFlusher); +#endif + +extern char *PR_GetDLLSearchPath(void); + +#if defined(MAC_NSPR_STANDALONE) +extern int strcmp(const char *str1, const char *str2); +extern int strcasecmp(const char *str1, const char *str2); +#endif + +extern void MapFullToPartialMacFile(char *); +extern char *MapPartialToFullMacFile(const char *); + +extern void ResetTimer(void); +extern void PR_PeriodicIdle(void); +extern void ActivateTimer(void); +extern void DeactivateTimer(void); +extern void PR_InitMemory(void); + +extern struct hostent *gethostbyaddr(const void *addr, int addrlen, int type); + +extern short GetVolumeRefNumFromName(const char *); + +#include <stdio.h> // Needed to get FILE typedef +extern FILE *_OS_FOPEN(const char *filename, const char *mode); +// +// Macintosh only private parts. +// + +#define dprintTrace ";dprintf;doTrace" +#define dprintNoTrace ";dprintf" +extern void dprintf(const char *format, ...); + + +// Entry into the memory system's cache flushing +#if defined(MAC_NSPR_STANDALONE) +extern PRUint8 CallCacheFlushers(size_t blockSize); +#endif + +#if defined(MAC_NSPR_STANDALONE) +extern void* reallocSmaller(void* block, size_t newSize); +#endif + + +/* +** PR_GetSystemInfo related definitions +*/ +#define _PR_SI_SYSNAME "MacOS" +#define _PR_SI_ARCHITECTURE "PowerPC" + +/* + * Memory-mapped files + */ + +struct _MDFileMap { + PRInt8 unused; +}; + +extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size); +#define _MD_CREATE_FILE_MAP _MD_CreateFileMap + +extern PRInt32 _MD_GetMemMapAlignment(void); +#define _MD_GET_MEM_MAP_ALIGNMENT _MD_GetMemMapAlignment + +extern void * _MD_MemMap(struct PRFileMap *fmap, PRInt64 offset, + PRUint32 len); +#define _MD_MEM_MAP _MD_MemMap + +extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size); +#define _MD_MEM_UNMAP _MD_MemUnmap + +extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap); +#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap + +extern void SetLogFileTypeCreator(const char *logFile); +extern int _MD_mac_get_nonblocking_connect_error(PRFileDesc* fd); + + +/* + * Critical section support + */ + +#define MAC_CRITICAL_REGIONS TARGET_CARBON + +#if MAC_CRITICAL_REGIONS + +extern void InitCriticalRegion(); +extern void TermCriticalRegion(); + +extern void EnterCritialRegion(); +extern void LeaveCritialRegion(); + +#define INIT_CRITICAL_REGION() InitCriticalRegion() +#define TERM_CRITICAL_REGION() TermCriticalRegion() + +#define ENTER_CRITICAL_REGION() EnterCritialRegion() +#define LEAVE_CRITICAL_REGION() LeaveCritialRegion() + +#else + +#define INIT_CRITICAL_REGION() +#define TERM_CRITICAL_REGION() + +#define ENTER_CRITICAL_REGION() +#define LEAVE_CRITICAL_REGION() + +#endif + + + +/* + * CPU Idle support + */ + +extern void InitIdleSemaphore(); +extern void TermIdleSemaphore(); + +extern void WaitOnIdleSemaphore(); +extern void SignalIdleSemaphore(); + + +/* + * Atomic operations + */ +#ifdef _PR_HAVE_ATOMIC_OPS + +extern PRInt32 _MD_AtomicSet(PRInt32 *val, PRInt32 newval); + +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_INCREMENT(val) OTAtomicAdd32(1, (SInt32 *)val) +#define _MD_ATOMIC_ADD(ptr, val) OTAtomicAdd32(val, (SInt32 *)ptr) +#define _MD_ATOMIC_DECREMENT(val) OTAtomicAdd32(-1, (SInt32 *)val) +#define _MD_ATOMIC_SET(val, newval) _MD_AtomicSet(val, newval) + +#endif /* _PR_HAVE_ATOMIC_OPS */ + + +#endif /* prmacos_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_ncr.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_ncr.h new file mode 100644 index 00000000..d094c2ee --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_ncr.h @@ -0,0 +1,230 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_unixware_defs_h___ +#define nspr_unixware_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "ncr" +#define _PR_SI_SYSNAME "NCR" +#define _PR_SI_ARCHITECTURE "x86" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#define HAVE_DLL +#define USE_DLFCN +#define _PR_RECV_BROKEN /* recv doesn't work on Unix Domain Sockets */ + +#if !defined (HAVE_STRERROR) +#define HAVE_STRERROR +#endif + +#ifndef HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_IO_SYMBOLS +#endif + +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_NO_LARGE_FILES + +#undef HAVE_STACK_GROWING_UP +#define HAVE_NETCONFIG +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define NEED_LOCALTIME_R +#define NEED_GMTIME_R +#define NEED_ASCTIME_R +#define NEED_STRTOK_R +#define NEED_CTIME_R +#define _PR_NEED_STRCASECMP + +#define USE_SETJMP + +#include <setjmp.h> + +#define _SETJMP setjmp +#define _LONGJMP longjmp +#define _PR_CONTEXT_TYPE jmp_buf +#define _MD_GET_SP(_t) (_t)->md.context[4] +#define _PR_NUM_GCREGS _JBLEN + +#define CONTEXT(_th) ((_th)->md.context) + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if(_SETJMP(CONTEXT(_thread))) (*_main)(); \ + _MD_GET_SP(_thread) = (int) ((_sp) - 128); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!_SETJMP(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + _LONGJMP(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures. + * Don't use SVR4 native threads (yet). + */ + +struct _MDThread { + _PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +/* + * The following are copied from _sunos.h, _aix.h. This means + * some of them should probably be moved into _unixos.h. But + * _irix.h seems to be quite different in regard to these macros. + */ +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#include <sys/time.h> +#include <sys/types.h> +#include <sys/select.h> +extern int _select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *execptfds, struct timeval *timeout); +#define _MD_SELECT _select + +#define _MD_POLL _poll +extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout); + +#endif /* nspr_ncr_defs_h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_nec.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_nec.h new file mode 100644 index 00000000..ed7e8a36 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_nec.h @@ -0,0 +1,196 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_nec_defs_h___ +#define nspr_nec_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "nec" +#define _PR_SI_SYSNAME "NEC" +#define _PR_SI_ARCHITECTURE "mips" +#define PR_DLL_SUFFIX ".so" + +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_DLFCN +#define NEED_TIME_R +#define NEED_STRFTIME_LOCK +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ST_ATIM_UNION + +#include <ucontext.h> +#include <sys/regset.h> + +#define PR_NUM_GCREGS NGREG +#define PR_CONTEXT_TYPE ucontext_t + +#define CONTEXT(_thread) (&(_thread)->md.context) + +#define _MD_GET_SP(_t) (_t)->md.context.uc_mcontext.gregs[CXT_SP] + +/* +** Initialize the thread context preparing it to execute "e(o,a)" +*/ +#define _MD_INIT_CONTEXT(thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + getcontext(CONTEXT(thread)); \ + CONTEXT(thread)->uc_stack.ss_sp = (char*) (thread)->stack->stackBottom; \ + CONTEXT(thread)->uc_stack.ss_size = (thread)->stack->stackSize; \ + _MD_GET_SP(thread) = (greg_t) _sp - 64; \ + makecontext(CONTEXT(thread), _main, 0); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!getcontext(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + ucontext_t *uc = CONTEXT(_thread); \ + uc->uc_mcontext.gregs[CXT_V0] = 1; \ + uc->uc_mcontext.gregs[CXT_A3] = 0; \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + setcontext(uc); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +#define _MD_SELECT _select +#define _MD_POLL _poll + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#endif /* nspr_nec_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_netbsd.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_netbsd.h new file mode 100644 index 00000000..cc16f105 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_netbsd.h @@ -0,0 +1,322 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* + * 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998-2000 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#ifndef nspr_netbsd_defs_h___ +#define nspr_netbsd_defs_h___ + +#include <sys/syscall.h> +#include <sys/param.h> /* for __NetBSD_Version__ */ + +#define PR_LINKER_ARCH "netbsd" +#define _PR_SI_SYSNAME "NetBSD" +#if defined(__i386__) +#define _PR_SI_ARCHITECTURE "x86" +#elif defined(__alpha__) +#define _PR_SI_ARCHITECTURE "alpha" +#elif defined(__m68k__) +#define _PR_SI_ARCHITECTURE "m68k" +#elif defined(__powerpc__) +#define _PR_SI_ARCHITECTURE "powerpc" +#elif defined(__sparc_v9__) +#define _PR_SI_ARCHITECTURE "sparc64" +#elif defined(__sparc__) +#define _PR_SI_ARCHITECTURE "sparc" +#elif defined(__mips__) +#define _PR_SI_ARCHITECTURE "mips" +#elif defined(__arm32__) || defined(__arm__) || defined(__armel__) \ + || defined(__armeb__) +#define _PR_SI_ARCHITECTURE "arm" +#endif + +#if defined(__ELF__) +#define PR_DLL_SUFFIX ".so" +#else +#define PR_DLL_SUFFIX ".so.1.0" +#endif + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_DLFCN +#define _PR_HAVE_SOCKADDR_LEN +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ST_ATIMESPEC +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_HAVE_SYSV_SEMAPHORES +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY + +#if __NetBSD_Version__ >= 105000000 +#define _PR_INET6 +#define _PR_HAVE_INET_NTOP +#define _PR_HAVE_GETHOSTBYNAME2 +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#endif + +#if __NetBSD_Version__ >= 106370000 +/* NetBSD 1.6ZK */ +#define _PR_HAVE_GETPROTO_R +#define _PR_HAVE_GETPROTO_R_INT +#endif + +#define USE_SETJMP + +#ifndef _PR_PTHREADS +#include <setjmp.h> + +#define PR_CONTEXT_TYPE sigjmp_buf + +#define CONTEXT(_th) ((_th)->md.context) + +/* +** Initialize a thread context to run "_main()" when started +*/ +#ifdef __i386__ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + sigsetjmp(CONTEXT(_thread), 1); \ + CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \ + CONTEXT(_thread)[0] = (int) _main; \ + *status = PR_TRUE; \ +} +#define _MD_GET_SP(_thread) CONTEXT(_thread)[2] +#endif +#ifdef __sparc_v9__ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + sigsetjmp(CONTEXT(_thread), 1); \ + CONTEXT(_thread)[1] = (unsigned char*) ((_sp) - 176 - 0x7ff); \ + CONTEXT(_thread)[2] = (long) _main; \ + CONTEXT(_thread)[3] = (long) _main + 4; \ + *status = PR_TRUE; \ +} +#define _MD_GET_SP(_thread) (CONTEXT(_thread)[2]+0x7ff) +#elif defined(__sparc__) +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + sigsetjmp(CONTEXT(_thread), 1); \ + CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \ + CONTEXT(_thread)[3] = (int) _main; \ + CONTEXT(_thread)[4] = (int) _main + 4; \ + *status = PR_TRUE; \ +} +#define _MD_GET_SP(_thread) CONTEXT(_thread)[2] +#endif +#ifdef __powerpc__ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + sigsetjmp(CONTEXT(_thread), 1); \ + CONTEXT(_thread)[3] = (unsigned char*) ((_sp) - 128); \ + CONTEXT(_thread)[4] = (int) _main; \ + *status = PR_TRUE; \ +} +#define _MD_GET_SP(_thread) CONTEXT(_thread)[3] +#endif +#ifdef __m68k__ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + sigsetjmp(CONTEXT(_thread), 1); \ + CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \ + CONTEXT(_thread)[5] = (int) _main; \ + *status = PR_TRUE; \ +} +#define _MD_GET_SP(_thread) CONTEXT(_thread)[2] +#endif +#ifdef __mips__ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + sigsetjmp(CONTEXT(_thread), 1); \ + CONTEXT(_thread)[32] = (unsigned char*) ((_sp) - 128); \ + CONTEXT(_thread)[2] = (int) _main; \ + CONTEXT(_thread)[28] = (int) _main; \ + *status = PR_TRUE; \ +} +#define _MD_GET_SP(_thread) CONTEXT(_thread)[32] +#endif +#if defined(__arm32__) || defined(__arm__) || defined(__armel__) \ + || defined(__armeb__) +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + sigsetjmp(CONTEXT(_thread), 1); \ + CONTEXT(_thread)[23] = (unsigned char*) ((_sp) - 128); \ + CONTEXT(_thread)[24] = (int) _main; \ + *status = PR_TRUE; \ +} +#define _MD_GET_SP(_thread) CONTEXT(_thread)[23] +#endif +#ifdef __alpha__ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + sigsetjmp(CONTEXT(_thread), 1); \ + CONTEXT(_thread)[34] = (unsigned char*) ((_sp) - 128); \ + CONTEXT(_thread)[2] = (long) _main; \ + CONTEXT(_thread)[30] = (long) _main; \ + CONTEXT(_thread)[31] = (long) _main; \ + *status = PR_TRUE; \ +} +#define _MD_GET_SP(_thread) CONTEXT(_thread)[34] +#endif +#ifndef _MD_INIT_CONTEXT +#error "Need to define _MD_INIT_CONTEXT for this platform" +#endif + +#define PR_NUM_GCREGS _JBLEN + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!sigsetjmp(CONTEXT(_thread), 1)) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + siglongjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread +#define _MD_RESUME_THREAD(thread) _MD_resume_thread +#define _MD_CLEAN_THREAD(_thread) + +#endif /* ! _PR_PTHREADS */ + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) +#if defined(_PR_POLL_AVAILABLE) +#include <poll.h> +#define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout) +#endif + +#if NetBSD1_3 == 1L +typedef unsigned int nfds_t; +#endif + +#endif /* nspr_netbsd_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_nextstep.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_nextstep.h new file mode 100644 index 00000000..e7e4c055 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_nextstep.h @@ -0,0 +1,299 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_nextstep_defs_h___ +#define nspr_nextstep_defs_h___ + +#include "prthread.h" + +#include <bsd/libc.h> +#include <bsd/syscall.h> + +/* syscall() is not declared in NEXTSTEP's syscall.h ... +*/ +extern int syscall(int number, ...); + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "nextstep" +#define _PR_SI_SYSNAME "NEXTSTEP" +#if defined(__sparc__) +#define _PR_SI_ARCHITECTURE "sparc" +#elif defined(__m68k__) +#define _PR_SI_ARCHITECTURE "m68k" +#elif defined(__i386__) +#define _PR_SI_ARCHITECTURE "x86" +#else +error Unknown NEXTSTEP architecture +#endif +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP + +#define HAVE_WEAK_MALLOC_SYMBOLS + +#define HAVE_DLL +#define USE_MACH_DYLD +#define _PR_STAT_HAS_ONLY_ST_ATIME +#define _PR_NO_LARGE_FILES + +#define USE_SETJMP + +#ifndef _PR_PTHREADS + +#include <setjmp.h> + +#define PR_CONTEXT_TYPE jmp_buf + +#define CONTEXT(_th) ((_th)->md.context) + +/* balazs.pataki@sztaki.hu: +** __sparc__ is checked +** __m68k__ is checked +** __i386__ is a guess (one of the two defines should work) +*/ +#if defined(__sparc__) +#define _MD_GET_SP(_th) (_th)->md.context[2] +#elif defined(__m68k__) +#define _MD_GET_SP(_th) (_th)->md.context[2] +#elif defined(__i386__) +/* One of this two must be OK ... try using sc_onstack +*/ +#define _MD_GET_SP(_th) (((struct sigcontext *) (_th)->md.context)->sc_onstack) +//#define _MD_GET_SP(_th) (_th)->md.context[0].sc_esp +#else +error Unknown NEXTSTEP architecture +#endif + +#define PR_NUM_GCREGS _JBLEN + +/* +** Initialize a thread context to run "_main()" when started +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (setjmp(CONTEXT(_thread))) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (int) ((_sp) - 64); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + longjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +extern PRStatus _MD_InitializeThread(PRThread *thread); + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread +#define _MD_RESUME_THREAD(thread) _MD_resume_thread +#define _MD_CLEAN_THREAD(_thread) + +extern PRStatus _MD_CREATE_THREAD( + PRThread *thread, + void (*start) (void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +extern void _MD_SET_PRIORITY(struct _MDThread *thread, PRUintn newPri); +extern PRStatus _MD_WAIT(PRThread *, PRIntervalTime timeout); +extern PRStatus _MD_WAKEUP_WAITER(PRThread *); +extern void _MD_YIELD(void); + +#endif /* ! _PR_PTHREADS */ + +extern void _MD_EarlyInit(void); +extern PRIntervalTime _PR_UNIX_GetInterval(void); +extern PRIntervalTime _PR_UNIX_TicksPerSecond(void); + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) + +/* For writev() */ +#include <sys/uio.h> + +/* signal.h */ +/* balazs.pataki@sztaki.hu: this is stolen from sunos4.h. The things is that +** NEXTSTEP doesn't support these flags for `struct sigaction's sa_flags, so +** I have to fake them ... +*/ +#define SA_RESTART 0 + +/* mmap */ +/* balazs.pataki@sztaki.hu: NEXTSTEP doesn't have mmap, at least not +** publically. We have sys/mman.h, but it doesn't declare mmap(), and +** PROT_NONE is also missing. syscall.h has entries for mmap, munmap, and +** mprotect so I wrap these in nextstep.c as mmap(), munmap() and mprotect() +** and pray for it to work. +** +*/ +caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, + int fildes, off_t off); +int munmap(caddr_t addr, size_t len); +int mprotect(caddr_t addr, size_t len, int prot); + +/* my_mmap() is implemented in nextstep.c and is based on map_fd() of mach. +*/ +caddr_t my_mmap(caddr_t addr, size_t len, int prot, int flags, + int fildes, off_t off); +int my_munmap(caddr_t addr, size_t len); + + +/* string.h +*/ +/* balazs.pataki@sztaki.hu: this is missing so implemenetd in nextstep.c ... +*/ +char *strdup(const char *s1); + +/* unistd.h +*/ +/* balazs.pataki@sztaki.hu: these functions are hidden, though correctly +** implemented in NEXTSTEP. Here I give the declaration for them to be used +** by prmalloc.c, and I have a wrapped syscall() version of them in nextstep.c +*/ +int brk(void *endds); +void *sbrk(int incr); + +#endif /* nspr_nextstep_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_nspr_pthread.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_nspr_pthread.h new file mode 100644 index 00000000..b7a0481e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_nspr_pthread.h @@ -0,0 +1,283 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_pthread_defs_h___ +#define nspr_pthread_defs_h___ + +#include <pthread.h> +#include "prthread.h" + +#if defined(PTHREADS_USER) +/* +** Thread Local Storage +*/ +extern pthread_key_t current_thread_key; +extern pthread_key_t current_cpu_key; +extern pthread_key_t last_thread_key; +extern pthread_key_t intsoff_key; + +#define _MD_CURRENT_THREAD() \ + ((struct PRThread *) pthread_getspecific(current_thread_key)) +#define _MD_CURRENT_CPU() \ + ((struct _PRCPU *) pthread_getspecific(current_cpu_key)) +#define _MD_LAST_THREAD() \ + ((struct PRThread *) pthread_getspecific(last_thread_key)) + +#define _MD_SET_CURRENT_THREAD(newval) \ + pthread_setspecific(current_thread_key, (void *)newval) + +#define _MD_SET_CURRENT_CPU(newval) \ + pthread_setspecific(current_cpu_key, (void *)newval) + +#define _MD_SET_LAST_THREAD(newval) \ + pthread_setspecific(last_thread_key, (void *)newval) + +#define _MD_SET_INTSOFF(_val) +#define _MD_GET_INTSOFF() 1 + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + *status = PR_TRUE; \ + if (SAVE_CONTEXT(_thread)) { \ + (*_main)(); \ + } \ + _MD_SET_THR_SP(_thread, _sp); \ + _thread->no_sched = 0; \ + PR_END_MACRO + +#define _MD_SWITCH_CONTEXT(_thread) \ + PR_BEGIN_MACRO \ + PR_ASSERT(_thread->no_sched); \ + if (!SAVE_CONTEXT(_thread)) { \ + (_thread)->md.errcode = errno; \ + _MD_SET_LAST_THREAD(_thread); \ + _PR_Schedule(); \ + } else { \ + (_MD_LAST_THREAD())->no_sched = 0; \ + } \ + PR_END_MACRO + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ + PR_BEGIN_MACRO \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + _thread->no_sched = 1; \ + GOTO_CONTEXT(_thread); \ + PR_END_MACRO + + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + jmp_buf jb; + int id; + int errcode; + pthread_t pthread; + pthread_mutex_t pthread_mutex; + pthread_cond_t pthread_cond; + int wait; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + pthread_mutex_t mutex; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + pthread_mutex_t mutex; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + jmp_buf jb; + pthread_t pthread; + struct _MDCPU_Unix md_unix; +}; + +/* +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +*/ + +extern pthread_mutex_t _pr_heapLock; + +#define _PR_LOCK(lock) pthread_mutex_lock(lock) + +#define _PR_UNLOCK(lock) pthread_mutex_unlock(lock) + + +#define _PR_LOCK_HEAP() { \ + if (_pr_primordialCPU) { \ + _PR_LOCK(_pr_heapLock); \ + } + +#define _PR_UNLOCK_HEAP() if (_pr_primordialCPU) { \ + _PR_UNLOCK(_pr_heapLock); \ + } \ + } + +NSPR_API(PRStatus) _MD_NEW_LOCK(struct _MDLock *md); +NSPR_API(void) _MD_FREE_LOCK(struct _MDLock *lockp); + +#define _MD_LOCK(_lockp) _PR_LOCK(&(_lockp)->mutex) +#define _MD_UNLOCK(_lockp) _PR_UNLOCK(&(_lockp)->mutex) + +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() +#define _MD_CHECK_FOR_EXIT() + +NSPR_API(PRStatus) _MD_InitThread(struct PRThread *thread); +#define _MD_INIT_THREAD _MD_InitThread +#define _MD_INIT_ATTACHED_THREAD _MD_InitThread + +NSPR_API(void) _MD_ExitThread(struct PRThread *thread); +#define _MD_EXIT_THREAD _MD_ExitThread + +NSPR_API(void) _MD_SuspendThread(struct PRThread *thread); +#define _MD_SUSPEND_THREAD _MD_SuspendThread + +NSPR_API(void) _MD_ResumeThread(struct PRThread *thread); +#define _MD_RESUME_THREAD _MD_ResumeThread + +NSPR_API(void) _MD_SuspendCPU(struct _PRCPU *thread); +#define _MD_SUSPEND_CPU _MD_SuspendCPU + +NSPR_API(void) _MD_ResumeCPU(struct _PRCPU *thread); +#define _MD_RESUME_CPU _MD_ResumeCPU + +#define _MD_BEGIN_SUSPEND_ALL() +#define _MD_END_SUSPEND_ALL() +#define _MD_BEGIN_RESUME_ALL() +#define _MD_END_RESUME_ALL() + +NSPR_API(void) _MD_EarlyInit(void); +#define _MD_EARLY_INIT _MD_EarlyInit + +#define _MD_FINAL_INIT _PR_UnixInit + +NSPR_API(void) _MD_InitLocks(void); +#define _MD_INIT_LOCKS _MD_InitLocks + +NSPR_API(void) _MD_CleanThread(struct PRThread *thread); +#define _MD_CLEAN_THREAD _MD_CleanThread + +NSPR_API(PRStatus) _MD_CreateThread( + struct PRThread *thread, + void (*start) (void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +#define _MD_CREATE_THREAD _MD_CreateThread + +extern void _MD_CleanupBeforeExit(void); +#define _MD_CLEANUP_BEFORE_EXIT _MD_CleanupBeforeExit + +NSPR_API(void) _MD_InitRunningCPU(struct _PRCPU *cpu); +#define _MD_INIT_RUNNING_CPU _MD_InitRunningCPU + +/* The _PR_MD_WAIT_LOCK and _PR_MD_WAKEUP_WAITER functions put to sleep and + * awaken a thread which is waiting on a lock or cvar. + */ +NSPR_API(PRStatus) _MD_wait(struct PRThread *, PRIntervalTime timeout); +#define _MD_WAIT _MD_wait + +NSPR_API(PRStatus) _MD_WakeupWaiter(struct PRThread *); +#define _MD_WAKEUP_WAITER _MD_WakeupWaiter + +NSPR_API(void) _MD_SetPriority(struct _MDThread *thread, + PRThreadPriority newPri); +#define _MD_SET_PRIORITY _MD_SetPriority + +#endif /* PTHREADS_USER */ + +#endif /* nspr_pthread_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_nto.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_nto.h new file mode 100644 index 00000000..97f4d38f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_nto.h @@ -0,0 +1,221 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1999-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_nto_defs_h___ +#define nspr_nto_defs_h___ + +/* +** Internal configuration macros +*/ +#define PR_LINKER_ARCH "nto" +#define _PR_SI_SYSNAME "NTO" +#define _PR_SI_ARCHITECTURE "x86" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MINIMUM_STACK_SIZE 131072L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#ifndef HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_IO_SYMBOLS +#endif + +#undef _PR_POLL_AVAILABLE +#undef _PR_USE_POLL +#define _PR_HAVE_SOCKADDR_LEN +#undef HAVE_BSD_FLOCK +#define HAVE_FCNTL_FILE_LOCKING +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ONLY_ST_ATIME +#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY +#define _PR_HAVE_POSIX_SEMAPHORES + +#undef FD_SETSIZE +#define FD_SETSIZE 4096 +#include <sys/time.h> +#include <sys/types.h> +#include <sys/select.h> + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_DLFCN +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define _PR_NEED_STRCASECMP + +#ifndef HAVE_STRERROR +#define HAVE_STRERROR +#endif + +#define USE_SETJMP + +#include <setjmp.h> + +#define _SETJMP setjmp +#define _LONGJMP longjmp +#define _PR_CONTEXT_TYPE jmp_buf +#define _PR_NUM_GCREGS _JBLEN +#define _MD_GET_SP(_t) (_t)->md.context[7] + +#define CONTEXT(_th) ((_th)->md.context) + + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if(_SETJMP(CONTEXT(_thread))) (*_main)(); \ + _MD_GET_SP(_thread) = (int) ((_sp) - 128); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!_SETJMP(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + _LONGJMP(CONTEXT(_thread), 1); \ +} + +/* +** Machine-dependent (MD) data structures. +*/ +struct _MDThread { + _PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* +** md-specific cpu structure field +*/ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD], fd_write_cnt[_PR_MD_MAX_OSFD], fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* +** We wrapped the select() call. _MD_SELECT refers to the built-in, +** unwrapped version. +*/ +#define _MD_SELECT select + +#define SA_RESTART 0 + +#endif /* nspr_nto_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_openbsd.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_openbsd.h new file mode 100644 index 00000000..ccd75306 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_openbsd.h @@ -0,0 +1,238 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_openbsd_defs_h___ +#define nspr_openbsd_defs_h___ + +#include <sys/syscall.h> + +#define PR_LINKER_ARCH "openbsd" +#define _PR_SI_SYSNAME "OPENBSD" +#if defined(__i386__) +#define _PR_SI_ARCHITECTURE "x86" +#elif defined(__alpha__) +#define _PR_SI_ARCHITECTURE "alpha" +#elif defined(__amd64__) +#define _PR_SI_ARCHITECTURE "amd64" +#elif defined(__m68k__) +#define _PR_SI_ARCHITECTURE "m68k" +#elif defined(__powerpc__) +#define _PR_SI_ARCHITECTURE "powerpc" +#elif defined(__sparc__) +#define _PR_SI_ARCHITECTURE "sparc" +#endif + +#define PR_DLL_SUFFIX ".so.1.0" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_DLFCN +#define _PR_HAVE_SOCKADDR_LEN +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ST_ATIMESPEC +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_HAVE_SYSV_SEMAPHORES +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY + +#define _PR_INET6 +#define _PR_HAVE_INET_NTOP +#define _PR_HAVE_GETHOSTBYNAME2 +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE + +#define USE_SETJMP + +#ifndef _PR_PTHREADS +#include <setjmp.h> + +#define PR_CONTEXT_TYPE sigjmp_buf + +#define CONTEXT(_th) ((_th)->md.context) + +#if defined(__i386__) || defined(__sparc__) || defined(__m68k__) +#define JB_SP_INDEX 2 +#elif defined(__powerpc__) +#define JB_SP_INDEX 1 +#elif defined(__alpha__) +#define JB_SP_INDEX 34 +#elif defined(__amd64__) +#define JB_SP_INDEX 6 +#else +#error "Need to define SP index in jmp_buf here" +#endif +#define _MD_GET_SP(_th) (_th)->md.context[JB_SP_INDEX] + +#define PR_NUM_GCREGS _JBLEN + +/* +** Initialize a thread context to run "_main()" when started +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (sigsetjmp(CONTEXT(_thread), 1)) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!sigsetjmp(CONTEXT(_thread), 1)) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + siglongjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread +#define _MD_RESUME_THREAD(thread) _MD_resume_thread +#define _MD_CLEAN_THREAD(_thread) + +#endif /* ! _PR_PTHREADS */ + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) +#include <poll.h> +#define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout) + +#if OpenBSD1_3 == 1L +typedef unsigned int nfds_t; +#endif + +#endif /* nspr_openbsd_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_openvms.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_openvms.h new file mode 100644 index 00000000..1ee7e428 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_openvms.h @@ -0,0 +1,332 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 the OpenVMS machine dependant configuration file. It is based +** on the OSF/1 machine dependant file. +*/ + +#ifndef nspr_openvms_defs_h___ +#define nspr_openvms_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "OpenVMS" +#define _PR_SI_SYSNAME "OpenVMS" +#ifdef __alpha +#define _PR_SI_ARCHITECTURE "alpha" +#else +#define _PR_SI_ARCHITECTURE "vax" +#endif +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 131072L +#define _MD_MINIMUM_STACK_SIZE 131072L + +/* +** This is not defined on OpenVMS. I believe its only used in GC code, and +** isn't that only used in Java? Anyway, for now, let's keep the compiler +** happy. +*/ +#define SA_RESTART 0 + +/* +** OpenVMS doesn't have these in socket.h. +** Does in later versions! +*/ +#if 0 +struct ip_mreq { + struct in_addr imr_multiaddr; /* IP multicast address of group */ + struct in_addr imr_interface; /* local IP address of interface */ +}; +#endif + +/* + * OSF1 needs the MAP_FIXED flag to ensure that mmap returns a pointer + * with the upper 32 bits zero. This is because Java sticks a pointer + * into an int. + */ +#define _MD_MMAP_FLAGS MAP_PRIVATE|MAP_FIXED + +#undef HAVE_STACK_GROWING_UP +#undef HAVE_WEAK_IO_SYMBOLS +#undef HAVE_WEAK_MALLOC_SYMBOLS +#undef HAVE_BSD_FLOCK + +#define NEED_TIME_R + +#define HAVE_DLL +#define USE_DLFCN + +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_STAT_HAS_ONLY_ST_ATIME +#define _PR_NO_LARGE_FILES +#define _PR_STRICT_ADDR_LEN + +/* IPv6 support */ +#ifdef _SOCKADDR_LEN +#define _PR_HAVE_SOCKADDR_LEN +#endif +#define _PR_HAVE_GETIPNODEBYNAME +#define _PR_HAVE_GETIPNODEBYADDR +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#ifdef _PR_INET6 +#define _PR_HAVE_INET_NTOP +#else +#define AF_INET6 26 +#ifndef AI_CANONNAME +#define AI_CANONNAME 0x00000002 +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct addrinfo *ai_next; +}; +#endif +#define AI_V4MAPPED 0x00000010 +#define AI_ALL 0x00000008 +#define AI_ADDRCONFIG 0x00000020 +#endif + +#define _PR_HAVE_MD_SOCKADDR_IN6 +/* if we have a quadword field defined in the structure, then its length */ +/* will be a multiple of 8, and connect() won't accept 32 (it wants 28) */ +struct _md_in6_addr { + union { + PRUint8 _S6_u8[16]; + PRUint16 _S6_u16[8]; + PRUint32 _S6_u32[4]; + } _S6_un; +}; +struct _md_sockaddr_in6 { + PRUint16 sin6_family; + PRUint16 sin6_port; + PRUint32 sin6_flowinfo; + struct _md_in6_addr sin6_addr; + PRUint32 sin6_scope_id; +}; + +#undef USE_SETJMP + +#include <setjmp.h> + +/* + * A jmp_buf is actually a struct sigcontext. The sc_sp field of + * struct sigcontext is the stack pointer. + */ +#define _MD_GET_SP(_t) (((struct sigcontext *) (_t)->md.context)->sc_sp) +#define PR_NUM_GCREGS _JBLEN +#define CONTEXT(_th) ((_th)->md.context) + +/* +** I am ifdef'ing these out because that's the way they are in FT. +*/ +#ifndef __VMS + +/* +** Initialize a thread context to run "_main()" when started +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (setjmp(CONTEXT(_thread))) { \ + (*_main)(); \ + } \ + _MD_GET_SP(_thread) = (long) ((_sp) - 64); \ + _MD_GET_SP(_thread) &= ~15; \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + longjmp(CONTEXT(_thread), 1); \ +} + +#endif /* __VMS */ + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + jmp_buf context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#ifndef _PR_PTHREADS +#define _MD_INIT_LOCKS() +#endif +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +/* + * The following are copied from _sunos.h, _aix.h. This means + * some of them should probably be moved into _unixos.h. But + * _irix.h seems to be quite different in regard to these macros. + */ +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +extern PRIntervalTime _PR_UNIX_GetInterval(void); +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond +extern PRIntervalTime _PR_UNIX_TicksPerSecond(void); + +#define _MD_EARLY_INIT _MD_EarlyInit +void _MD_EarlyInit(void); +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#ifdef _VMS_NOT_YET +NSPR_API(void) _PR_InitThreads( + PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs); +#endif +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* The following defines unwrapped versions of select() and poll(). */ +extern int __select (int, fd_set *, fd_set *, fd_set *, struct timeval *); +#define _MD_SELECT __select + +#ifndef __VMS +#define _MD_POLL __poll +extern int __poll(struct pollfd filedes[], unsigned int nfds, int timeout); +#endif + +#ifdef __VMS +NSPR_API(void) _PR_InitCPUs(void); +NSPR_API(void) _PR_MD_START_INTERRUPTS(void); +#endif + +/* + * Atomic operations + */ +#include <machine/builtins.h> +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_ADD(ptr,val) (__ATOMIC_ADD_LONG(ptr,val) + val) +#define _MD_ATOMIC_INCREMENT(val) (__ATOMIC_INCREMENT_LONG(val) + 1) +#define _MD_ATOMIC_DECREMENT(val) (__ATOMIC_DECREMENT_LONG(val) - 1) +#define _MD_ATOMIC_SET(val, newval) __ATOMIC_EXCH_LONG(val, newval) + +extern int thread_suspend(PRThread *thr_id); +extern int thread_resume(PRThread *thr_id); + +#endif /* nspr_openvms_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_os2.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_os2.h new file mode 100644 index 00000000..c012e32e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_os2.h @@ -0,0 +1,594 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_os2_defs_h___ +#define nspr_os2_defs_h___ + +#ifndef NO_LONG_LONG +#define INCL_LONGLONG +#endif +#define INCL_DOS +#define INCL_DOSPROCESS +#define INCL_DOSERRORS +#define INCL_WIN +#define INCL_WPS +#include <os2.h> +#include <sys/select.h> + +#include "prio.h" + +#include <errno.h> + +#ifdef XP_OS2_VACPP +/* TODO RAMSEMs need to be written for GCC/EMX */ +#define USE_RAMSEM +#endif + +#ifdef USE_RAMSEM +#pragma pack(4) + +#pragma pack(2) +typedef struct _RAMSEM +{ + ULONG ulTIDPID; + ULONG hevSem; + ULONG cLocks; + USHORT cWaiting; + USHORT cPosts; +} RAMSEM, *PRAMSEM; + +typedef struct _CRITICAL_SECTION +{ + ULONG ulReserved[4]; /* Same size as RAMSEM */ +} CRITICAL_SECTION, *PCRITICAL_SECTION, *LPCRITICAL_SECTION; +#pragma pack(4) + +APIRET _Optlink SemRequest486(PRAMSEM, ULONG); +APIRET _Optlink SemReleasex86(PRAMSEM, ULONG); +#endif + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "os2" +#define _PR_SI_SYSNAME "OS2" +#define _PR_SI_ARCHITECTURE "x86" /* XXXMB hardcode for now */ + +#define HAVE_DLL +#define _PR_GLOBAL_THREADS_ONLY +#undef HAVE_THREAD_AFFINITY +#define _PR_HAVE_THREADSAFE_GETHOST +#define _PR_HAVE_ATOMIC_OPS + +#define HANDLE unsigned long +#define HINSTANCE HMODULE + +/* --- Common User-Thread/Native-Thread Definitions --------------------- */ + +/* --- Globals --- */ +extern struct PRLock *_pr_schedLock; + +/* --- Typedefs --- */ +typedef void (*FiberFunc)(void *); + +#define PR_NUM_GCREGS 8 +typedef PRInt32 PR_CONTEXT_TYPE[PR_NUM_GCREGS]; +#define GC_VMBASE 0x40000000 +#define GC_VMLIMIT 0x00FFFFFF +typedef int (*FARPROC)(); + +#define _MD_MAGIC_THREAD 0x22222222 +#define _MD_MAGIC_THREADSTACK 0x33333333 +#define _MD_MAGIC_SEGMENT 0x44444444 +#define _MD_MAGIC_DIR 0x55555555 +#define _MD_MAGIC_CV 0x66666666 + +struct _MDSemaphore { + HEV sem; +}; + +struct _MDCPU { + int unused; +}; + +struct _MDThread { + HEV blocked_sema; /* Threads block on this when waiting + * for IO or CondVar. + */ + PRBool inCVWaitQueue; /* PR_TRUE if the thread is in the + * wait queue of some cond var. + * PR_FALSE otherwise. */ + TID handle; /* OS/2 thread handle */ + void *sp; /* only valid when suspended */ + PRUint32 magic; /* for debugging */ + PR_CONTEXT_TYPE gcContext; /* Thread context for GC */ + struct PRThread *prev, *next; /* used by the cvar wait queue to + * chain the PRThread structures + * together */ +}; + +struct _MDThreadStack { + PRUint32 magic; /* for debugging */ +}; + +struct _MDSegment { + PRUint32 magic; /* for debugging */ +}; + +#undef PROFILE_LOCKS + +struct _MDDir { + HDIR d_hdl; + union { + FILEFINDBUF3 small; + FILEFINDBUF3L large; + } d_entry; + PRBool firstEntry; /* Is this the entry returned + * by FindFirstFile()? */ + PRUint32 magic; /* for debugging */ +}; + +struct _MDCVar { + PRUint32 magic; + struct PRThread *waitHead, *waitTail; /* the wait queue: a doubly- + * linked list of threads + * waiting on this condition + * variable */ + PRIntn nwait; /* number of threads in the + * wait queue */ +}; + +#define _MD_CV_NOTIFIED_LENGTH 6 +typedef struct _MDNotified _MDNotified; +struct _MDNotified { + PRIntn length; /* # of used entries in this + * structure */ + struct { + struct _MDCVar *cv; /* the condition variable notified */ + PRIntn times; /* and the number of times notified */ + struct PRThread *notifyHead; /* list of threads to wake up */ + } cv[_MD_CV_NOTIFIED_LENGTH]; + _MDNotified *link; /* link to another of these, or NULL */ +}; + +struct _MDLock { +#ifdef USE_RAMSEM + CRITICAL_SECTION mutex; /* this is recursive on NT */ +#else + HMTX mutex; /* this is recursive on NT */ +#endif + + /* + * When notifying cvars, there is no point in actually + * waking up the threads waiting on the cvars until we've + * released the lock. So, we temporarily record the cvars. + * When doing an unlock, we'll then wake up the waiting threads. + */ + struct _MDNotified notified; /* array of conditions notified */ +#ifdef PROFILE_LOCKS + PRInt32 hitcount; + PRInt32 misscount; +#endif +}; + +struct _MDFileDesc { + PRInt32 osfd; /* The osfd can come from one of three spaces: + * - For stdin, stdout, and stderr, we are using + * the libc file handle (0, 1, 2), which is an int. + * - For files and pipes, we are using OS/2 handles, + * which is a void*. + * - For sockets, we are using int + */ +}; + +struct _MDProcess { + PID pid; +}; + +/* --- Misc stuff --- */ +#define _MD_GET_SP(thread) (thread)->md.gcContext[6] + +/* --- IO stuff --- */ + +#define _MD_OPEN (_PR_MD_OPEN) +#define _MD_OPEN_FILE (_PR_MD_OPEN) +#define _MD_READ (_PR_MD_READ) +#define _MD_WRITE (_PR_MD_WRITE) +#define _MD_WRITEV (_PR_MD_WRITEV) +#define _MD_LSEEK (_PR_MD_LSEEK) +#define _MD_LSEEK64 (_PR_MD_LSEEK64) +extern PRInt32 _MD_CloseFile(PRInt32 osfd); +#define _MD_CLOSE_FILE _MD_CloseFile +#define _MD_GETFILEINFO (_PR_MD_GETFILEINFO) +#define _MD_GETFILEINFO64 (_PR_MD_GETFILEINFO64) +#define _MD_GETOPENFILEINFO (_PR_MD_GETOPENFILEINFO) +#define _MD_GETOPENFILEINFO64 (_PR_MD_GETOPENFILEINFO64) +#define _MD_STAT (_PR_MD_STAT) +#define _MD_RENAME (_PR_MD_RENAME) +#define _MD_ACCESS (_PR_MD_ACCESS) +#define _MD_DELETE (_PR_MD_DELETE) +#define _MD_MKDIR (_PR_MD_MKDIR) +#define _MD_MAKE_DIR (_PR_MD_MKDIR) +#define _MD_RMDIR (_PR_MD_RMDIR) +#define _MD_LOCKFILE (_PR_MD_LOCKFILE) +#define _MD_TLOCKFILE (_PR_MD_TLOCKFILE) +#define _MD_UNLOCKFILE (_PR_MD_UNLOCKFILE) + +/* --- Socket IO stuff --- */ + +/* The ones that don't map directly may need to be re-visited... */ +#ifdef XP_OS2_VACPP +#define EPIPE EBADF +#define EIO ECONNREFUSED +#endif +#define _MD_EACCES EACCES +#define _MD_EADDRINUSE EADDRINUSE +#define _MD_EADDRNOTAVAIL EADDRNOTAVAIL +#define _MD_EAFNOSUPPORT EAFNOSUPPORT +#define _MD_EAGAIN EWOULDBLOCK +#define _MD_EALREADY EALREADY +#define _MD_EBADF EBADF +#define _MD_ECONNREFUSED ECONNREFUSED +#define _MD_ECONNRESET ECONNRESET +#define _MD_EFAULT SOCEFAULT +#define _MD_EINPROGRESS EINPROGRESS +#define _MD_EINTR EINTR +#define _MD_EINVAL EINVAL +#define _MD_EISCONN EISCONN +#define _MD_ENETUNREACH ENETUNREACH +#define _MD_ENOENT ENOENT +#define _MD_ENOTCONN ENOTCONN +#define _MD_ENOTSOCK ENOTSOCK +#define _MD_EOPNOTSUPP EOPNOTSUPP +#define _MD_EWOULDBLOCK EWOULDBLOCK +#define _MD_GET_SOCKET_ERROR() sock_errno() +#ifndef INADDR_LOOPBACK /* For some reason this is not defined in OS2 tcpip */ +/* #define INADDR_LOOPBACK INADDR_ANY */ +#endif + +#define _MD_INIT_FILEDESC(fd) +extern void _MD_MakeNonblock(PRFileDesc *f); +#define _MD_MAKE_NONBLOCK _MD_MakeNonblock +#define _MD_INIT_FD_INHERITABLE (_PR_MD_INIT_FD_INHERITABLE) +#define _MD_QUERY_FD_INHERITABLE (_PR_MD_QUERY_FD_INHERITABLE) +#define _MD_SHUTDOWN (_PR_MD_SHUTDOWN) +#define _MD_LISTEN _PR_MD_LISTEN +extern PRInt32 _MD_CloseSocket(PRInt32 osfd); +#define _MD_CLOSE_SOCKET _MD_CloseSocket +#define _MD_SENDTO (_PR_MD_SENDTO) +#define _MD_RECVFROM (_PR_MD_RECVFROM) +#ifdef XP_OS2_VACPP +#define _MD_SOCKETPAIR(s, type, proto, sv) -1 +#else +#define _MD_SOCKETPAIR (_PR_MD_SOCKETPAIR) +#endif +#define _MD_GETSOCKNAME (_PR_MD_GETSOCKNAME) +#define _MD_GETPEERNAME (_PR_MD_GETPEERNAME) +#define _MD_GETSOCKOPT (_PR_MD_GETSOCKOPT) +#define _MD_SETSOCKOPT (_PR_MD_SETSOCKOPT) + +#define _MD_FSYNC _PR_MD_FSYNC +#define _MD_SET_FD_INHERITABLE (_PR_MD_SET_FD_INHERITABLE) + +#ifdef _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_INCREMENT _PR_MD_ATOMIC_INCREMENT +#define _MD_ATOMIC_ADD _PR_MD_ATOMIC_ADD +#define _MD_ATOMIC_DECREMENT _PR_MD_ATOMIC_DECREMENT +#define _MD_ATOMIC_SET _PR_MD_ATOMIC_SET +#endif + +#define _MD_INIT_IO (_PR_MD_INIT_IO) +#define _MD_PR_POLL (_PR_MD_PR_POLL) + +#define _MD_SOCKET (_PR_MD_SOCKET) +extern PRInt32 _MD_SocketAvailable(PRFileDesc *fd); +#define _MD_SOCKETAVAILABLE _MD_SocketAvailable +#define _MD_PIPEAVAILABLE _MD_SocketAvailable +#define _MD_CONNECT (_PR_MD_CONNECT) +extern PRInt32 _MD_Accept(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen, + PRIntervalTime timeout); +#define _MD_ACCEPT _MD_Accept +#define _MD_BIND (_PR_MD_BIND) +#define _MD_RECV (_PR_MD_RECV) +#define _MD_SEND (_PR_MD_SEND) + +/* --- Scheduler stuff --- */ +/* #define _MD_PAUSE_CPU _PR_MD_PAUSE_CPU */ +#define _MD_PAUSE_CPU + +/* --- DIR stuff --- */ +#define PR_DIRECTORY_SEPARATOR '\\' +#define PR_DIRECTORY_SEPARATOR_STR "\\" +#define PR_PATH_SEPARATOR ';' +#define PR_PATH_SEPARATOR_STR ";" +#define _MD_ERRNO() errno +#define _MD_OPEN_DIR (_PR_MD_OPEN_DIR) +#define _MD_CLOSE_DIR (_PR_MD_CLOSE_DIR) +#define _MD_READ_DIR (_PR_MD_READ_DIR) + +/* --- Segment stuff --- */ +#define _MD_INIT_SEGS() +#define _MD_ALLOC_SEGMENT(seg, size, vaddr) 0 +#define _MD_FREE_SEGMENT(seg) + +/* --- Environment Stuff --- */ +#define _MD_GET_ENV (_PR_MD_GET_ENV) +#define _MD_PUT_ENV (_PR_MD_PUT_ENV) + +/* --- Threading Stuff --- */ +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_INIT_THREAD (_PR_MD_INIT_THREAD) +#define _MD_INIT_ATTACHED_THREAD (_PR_MD_INIT_THREAD) +#define _MD_CREATE_THREAD (_PR_MD_CREATE_THREAD) +#define _MD_YIELD (_PR_MD_YIELD) +#define _MD_SET_PRIORITY (_PR_MD_SET_PRIORITY) +#define _MD_CLEAN_THREAD (_PR_MD_CLEAN_THREAD) +#define _MD_SETTHREADAFFINITYMASK (_PR_MD_SETTHREADAFFINITYMASK) +#define _MD_GETTHREADAFFINITYMASK (_PR_MD_GETTHREADAFFINITYMASK) +#define _MD_EXIT_THREAD (_PR_MD_EXIT_THREAD) +#define _MD_SUSPEND_THREAD (_PR_MD_SUSPEND_THREAD) +#define _MD_RESUME_THREAD (_PR_MD_RESUME_THREAD) +#define _MD_SUSPEND_CPU (_PR_MD_SUSPEND_CPU) +#define _MD_RESUME_CPU (_PR_MD_RESUME_CPU) +#define _MD_WAKEUP_CPUS (_PR_MD_WAKEUP_CPUS) +#define _MD_BEGIN_SUSPEND_ALL() +#define _MD_BEGIN_RESUME_ALL() +#define _MD_END_SUSPEND_ALL() +#define _MD_END_RESUME_ALL() + +/* --- Lock stuff --- */ +#define _PR_LOCK _MD_LOCK +#define _PR_UNLOCK _MD_UNLOCK + +#ifdef USE_RAMSEM +#define _MD_NEW_LOCK (_PR_MD_NEW_LOCK) +#define _MD_FREE_LOCK(lock) (DosCloseEventSem(((PRAMSEM)(&((lock)->mutex)))->hevSem)) +#define _MD_LOCK(lock) (SemRequest486(&((lock)->mutex), -1)) +#define _MD_TEST_AND_LOCK(lock) (SemRequest486(&((lock)->mutex), -1),0) +#define _MD_UNLOCK(lock) \ + PR_BEGIN_MACRO \ + if (0 != (lock)->notified.length) { \ + md_UnlockAndPostNotifies((lock), NULL, NULL); \ + } else { \ + SemReleasex86( &(lock)->mutex, 0 ); \ + } \ + PR_END_MACRO +#else +#define _MD_NEW_LOCK (_PR_MD_NEW_LOCK) +#define _MD_FREE_LOCK(lock) (DosCloseMutexSem((lock)->mutex)) +#define _MD_LOCK(lock) (DosRequestMutexSem((lock)->mutex, SEM_INDEFINITE_WAIT)) +#define _MD_TEST_AND_LOCK(lock) (DosRequestMutexSem((lock)->mutex, SEM_INDEFINITE_WAIT),0) +#define _MD_UNLOCK(lock) \ + PR_BEGIN_MACRO \ + if (0 != (lock)->notified.length) { \ + md_UnlockAndPostNotifies((lock), NULL, NULL); \ + } else { \ + DosReleaseMutexSem((lock)->mutex); \ + } \ + PR_END_MACRO +#endif + +/* --- lock and cv waiting --- */ +#define _MD_WAIT (_PR_MD_WAIT) +#define _MD_WAKEUP_WAITER (_PR_MD_WAKEUP_WAITER) + +/* --- CVar ------------------- */ +#define _MD_WAIT_CV (_PR_MD_WAIT_CV) +#define _MD_NEW_CV (_PR_MD_NEW_CV) +#define _MD_FREE_CV (_PR_MD_FREE_CV) +#define _MD_NOTIFY_CV (_PR_MD_NOTIFY_CV ) +#define _MD_NOTIFYALL_CV (_PR_MD_NOTIFYALL_CV) + + /* XXXMB- the IOQ stuff is certainly not working correctly yet. */ +/* extern struct _MDLock _pr_ioq_lock; */ +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + + +/* --- Initialization stuff --- */ +#define _MD_START_INTERRUPTS() +#define _MD_STOP_INTERRUPTS() +#define _MD_DISABLE_CLOCK_INTERRUPTS() +#define _MD_ENABLE_CLOCK_INTERRUPTS() +#define _MD_BLOCK_CLOCK_INTERRUPTS() +#define _MD_UNBLOCK_CLOCK_INTERRUPTS() +#define _MD_EARLY_INIT (_PR_MD_EARLY_INIT) +#define _MD_FINAL_INIT() +#define _MD_INIT_CPUS() +#define _MD_INIT_RUNNING_CPU(cpu) + +struct PRProcess; +struct PRProcessAttr; + +#define _MD_CREATE_PROCESS _PR_CreateOS2Process +extern struct PRProcess * _PR_CreateOS2Process( + const char *path, + char *const *argv, + char *const *envp, + const struct PRProcessAttr *attr +); + +#define _MD_DETACH_PROCESS _PR_DetachOS2Process +extern PRStatus _PR_DetachOS2Process(struct PRProcess *process); + +/* --- Wait for a child process to terminate --- */ +#define _MD_WAIT_PROCESS _PR_WaitOS2Process +extern PRStatus _PR_WaitOS2Process(struct PRProcess *process, + PRInt32 *exitCode); + +#define _MD_KILL_PROCESS _PR_KillOS2Process +extern PRStatus _PR_KillOS2Process(struct PRProcess *process); + +#define _MD_CLEANUP_BEFORE_EXIT() +#define _MD_EXIT (_PR_MD_EXIT) +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + *status = PR_TRUE; \ + PR_END_MACRO +#define _MD_SWITCH_CONTEXT +#define _MD_RESTORE_CONTEXT + +/* --- Intervals --- */ +#define _MD_INTERVAL_INIT (_PR_MD_INTERVAL_INIT) +#define _MD_GET_INTERVAL (_PR_MD_GET_INTERVAL) +#define _MD_INTERVAL_PER_SEC (_PR_MD_INTERVAL_PER_SEC) +#define _MD_INTERVAL_PER_MILLISEC() (_PR_MD_INTERVAL_PER_SEC() / 1000) +#define _MD_INTERVAL_PER_MICROSEC() (_PR_MD_INTERVAL_PER_SEC() / 1000000) + +/* --- Native-Thread Specific Definitions ------------------------------- */ + +typedef struct __NSPR_TLS +{ + struct PRThread *_pr_thread_last_run; + struct PRThread *_pr_currentThread; + struct _PRCPU *_pr_currentCPU; +} _NSPR_TLS; + +extern _NSPR_TLS* pThreadLocalStorage; +NSPR_API(void) _PR_MD_ENSURE_TLS(void); + +#define _MD_GET_ATTACHED_THREAD() pThreadLocalStorage->_pr_currentThread +extern struct PRThread * _MD_CURRENT_THREAD(void); +#define _MD_SET_CURRENT_THREAD(_thread) _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_currentThread = (_thread) + +#define _MD_LAST_THREAD() pThreadLocalStorage->_pr_thread_last_run +#define _MD_SET_LAST_THREAD(_thread) _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_thread_last_run = (_thread) + +#define _MD_CURRENT_CPU() pThreadLocalStorage->_pr_currentCPU +#define _MD_SET_CURRENT_CPU(_cpu) _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_currentCPU = (_cpu) + +/* lth. #define _MD_SET_INTSOFF(_val) (_pr_ints_off = (_val)) */ +/* lth. #define _MD_GET_INTSOFF() _pr_ints_off */ +/* lth. #define _MD_INCREMENT_INTSOFF() (_pr_ints_off++) */ +/* lth. #define _MD_DECREMENT_INTSOFF() (_pr_ints_off--) */ + +/* --- Scheduler stuff --- */ +#define LOCK_SCHEDULER() 0 +#define UNLOCK_SCHEDULER() 0 +#define _PR_LockSched() 0 +#define _PR_UnlockSched() 0 + +/* --- Initialization stuff --- */ +#define _MD_INIT_LOCKS() + +/* --- Stack stuff --- */ +#define _MD_INIT_STACK(stack, redzone) +#define _MD_CLEAR_STACK(stack) + +/* --- Memory-mapped files stuff --- not implemented on OS/2 */ + +struct _MDFileMap { + PRInt8 unused; +}; + +extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size); +#define _MD_CREATE_FILE_MAP _MD_CreateFileMap + +extern PRInt32 _MD_GetMemMapAlignment(void); +#define _MD_GET_MEM_MAP_ALIGNMENT _MD_GetMemMapAlignment + +extern void * _MD_MemMap(struct PRFileMap *fmap, PRInt64 offset, + PRUint32 len); +#define _MD_MEM_MAP _MD_MemMap + +extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size); +#define _MD_MEM_UNMAP _MD_MemUnmap + +extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap); +#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap + +/* Some stuff for setting up thread contexts */ +typedef ULONG DWORD, *PDWORD; + +/* The following definitions and two structures are new in OS/2 Warp 4.0. + */ +#ifndef CONTEXT_CONTROL +#define CONTEXT_CONTROL 0x00000001 +#define CONTEXT_INTEGER 0x00000002 +#define CONTEXT_SEGMENTS 0x00000004 +#define CONTEXT_FLOATING_POINT 0x00000008 +#define CONTEXT_FULL 0x0000000F + +#pragma pack(2) +typedef struct _FPREG { + ULONG losig; /* Low 32-bits of the significand. */ + ULONG hisig; /* High 32-bits of the significand. */ + USHORT signexp; /* Sign and exponent. */ +} FPREG; +typedef struct _CONTEXTRECORD { + ULONG ContextFlags; + ULONG ctx_env[7]; + FPREG ctx_stack[8]; + ULONG ctx_SegGs; /* GS register. */ + ULONG ctx_SegFs; /* FS register. */ + ULONG ctx_SegEs; /* ES register. */ + ULONG ctx_SegDs; /* DS register. */ + ULONG ctx_RegEdi; /* EDI register. */ + ULONG ctx_RegEsi; /* ESI register. */ + ULONG ctx_RegEax; /* EAX register. */ + ULONG ctx_RegEbx; /* EBX register. */ + ULONG ctx_RegEcx; /* ECX register. */ + ULONG ctx_RegEdx; /* EDX register. */ + ULONG ctx_RegEbp; /* EBP register. */ + ULONG ctx_RegEip; /* EIP register. */ + ULONG ctx_SegCs; /* CS register. */ + ULONG ctx_EFlags; /* EFLAGS register. */ + ULONG ctx_RegEsp; /* ESP register. */ + ULONG ctx_SegSs; /* SS register. */ +} CONTEXTRECORD, *PCONTEXTRECORD; +#pragma pack() +#endif + +extern APIRET (* APIENTRY QueryThreadContext)(TID, ULONG, PCONTEXTRECORD); + +/* +#define _pr_tid (((PTIB2)_getTIBvalue(offsetof(TIB, tib_ptib2)))->tib2_ultid) +#define _pr_current_Thread (_system_tls[_pr_tid-1].__pr_current_thread) +*/ + +/* Some simple mappings of Windows API's to OS/2 API's to make our lives a + * little bit easier. Only add one here if it is a DIRECT mapping. We are + * not emulating anything. Just mapping. + */ +#define FreeLibrary(x) DosFreeModule((HMODULE)x) +#define OutputDebugString(x) + +extern int _MD_os2_get_nonblocking_connect_error(int osfd); + +#endif /* nspr_os2_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_os2_errors.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_os2_errors.h new file mode 100644 index 00000000..628b058a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_os2_errors.h @@ -0,0 +1,162 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_os2_errors_h___ +#define nspr_os2_errors_h___ + +#include "md/_os2.h" +#ifndef assert + #include <assert.h> +#endif + +NSPR_API(void) _MD_os2_map_default_error(PRInt32 err); +#define _PR_MD_MAP_DEFAULT_ERROR _MD_os2_map_default_error + +NSPR_API(void) _MD_os2_map_opendir_error(PRInt32 err); +#define _PR_MD_MAP_OPENDIR_ERROR _MD_os2_map_opendir_error + +NSPR_API(void) _MD_os2_map_closedir_error(PRInt32 err); +#define _PR_MD_MAP_CLOSEDIR_ERROR _MD_os2_map_closedir_error + +NSPR_API(void) _MD_os2_readdir_error(PRInt32 err); +#define _PR_MD_MAP_READDIR_ERROR _MD_os2_readdir_error + +NSPR_API(void) _MD_os2_map_delete_error(PRInt32 err); +#define _PR_MD_MAP_DELETE_ERROR _MD_os2_map_delete_error + +NSPR_API(void) _MD_os2_map_stat_error(PRInt32 err); +#define _PR_MD_MAP_STAT_ERROR _MD_os2_map_stat_error + +NSPR_API(void) _MD_os2_map_fstat_error(PRInt32 err); +#define _PR_MD_MAP_FSTAT_ERROR _MD_os2_map_fstat_error + +NSPR_API(void) _MD_os2_map_rename_error(PRInt32 err); +#define _PR_MD_MAP_RENAME_ERROR _MD_os2_map_rename_error + +NSPR_API(void) _MD_os2_map_access_error(PRInt32 err); +#define _PR_MD_MAP_ACCESS_ERROR _MD_os2_map_access_error + +NSPR_API(void) _MD_os2_map_mkdir_error(PRInt32 err); +#define _PR_MD_MAP_MKDIR_ERROR _MD_os2_map_mkdir_error + +NSPR_API(void) _MD_os2_map_rmdir_error(PRInt32 err); +#define _PR_MD_MAP_RMDIR_ERROR _MD_os2_map_rmdir_error + +NSPR_API(void) _MD_os2_map_read_error(PRInt32 err); +#define _PR_MD_MAP_READ_ERROR _MD_os2_map_read_error + +NSPR_API(void) _MD_os2_map_transmitfile_error(PRInt32 err); +#define _PR_MD_MAP_TRANSMITFILE_ERROR _MD_os2_map_transmitfile_error + +NSPR_API(void) _MD_os2_map_write_error(PRInt32 err); +#define _PR_MD_MAP_WRITE_ERROR _MD_os2_map_write_error + +NSPR_API(void) _MD_os2_map_lseek_error(PRInt32 err); +#define _PR_MD_MAP_LSEEK_ERROR _MD_os2_map_lseek_error + +NSPR_API(void) _MD_os2_map_fsync_error(PRInt32 err); +#define _PR_MD_MAP_FSYNC_ERROR _MD_os2_map_fsync_error + +NSPR_API(void) _MD_os2_map_close_error(PRInt32 err); +#define _PR_MD_MAP_CLOSE_ERROR _MD_os2_map_close_error + +NSPR_API(void) _MD_os2_map_socket_error(PRInt32 err); +#define _PR_MD_MAP_SOCKET_ERROR _MD_os2_map_socket_error + +NSPR_API(void) _MD_os2_map_recv_error(PRInt32 err); +#define _PR_MD_MAP_RECV_ERROR _MD_os2_map_recv_error + +NSPR_API(void) _MD_os2_map_recvfrom_error(PRInt32 err); +#define _PR_MD_MAP_RECVFROM_ERROR _MD_os2_map_recvfrom_error + +NSPR_API(void) _MD_os2_map_send_error(PRInt32 err); +#define _PR_MD_MAP_SEND_ERROR _MD_os2_map_send_error + +NSPR_API(void) _MD_os2_map_sendto_error(PRInt32 err); +#define _PR_MD_MAP_SENDTO_ERROR _MD_os2_map_sendto_error + +NSPR_API(void) _MD_os2_map_writev_error(int err); +#define _PR_MD_MAP_WRITEV_ERROR _MD_os2_map_writev_error + +NSPR_API(void) _MD_os2_map_accept_error(PRInt32 err); +#define _PR_MD_MAP_ACCEPT_ERROR _MD_os2_map_accept_error + +NSPR_API(void) _MD_os2_map_acceptex_error(PRInt32 err); +#define _PR_MD_MAP_ACCEPTEX_ERROR _MD_os2_map_acceptex_error + +NSPR_API(void) _MD_os2_map_connect_error(PRInt32 err); +#define _PR_MD_MAP_CONNECT_ERROR _MD_os2_map_connect_error + +NSPR_API(void) _MD_os2_map_bind_error(PRInt32 err); +#define _PR_MD_MAP_BIND_ERROR _MD_os2_map_bind_error + +NSPR_API(void) _MD_os2_map_listen_error(PRInt32 err); +#define _PR_MD_MAP_LISTEN_ERROR _MD_os2_map_listen_error + +NSPR_API(void) _MD_os2_map_shutdown_error(PRInt32 err); +#define _PR_MD_MAP_SHUTDOWN_ERROR _MD_os2_map_shutdown_error + +#ifndef XP_OS2_VACPP +NSPR_API(void) _MD_os2_map_socketpair_error(int err); +#define _PR_MD_MAP_SOCKETPAIR_ERROR _MD_os2_map_socketpair_error +#endif + +NSPR_API(void) _MD_os2_map_getsockname_error(PRInt32 err); +#define _PR_MD_MAP_GETSOCKNAME_ERROR _MD_os2_map_getsockname_error + +NSPR_API(void) _MD_os2_map_getpeername_error(PRInt32 err); +#define _PR_MD_MAP_GETPEERNAME_ERROR _MD_os2_map_getpeername_error + +NSPR_API(void) _MD_os2_map_getsockopt_error(PRInt32 err); +#define _PR_MD_MAP_GETSOCKOPT_ERROR _MD_os2_map_getsockopt_error + +NSPR_API(void) _MD_os2_map_setsockopt_error(PRInt32 err); +#define _PR_MD_MAP_SETSOCKOPT_ERROR _MD_os2_map_setsockopt_error + +NSPR_API(void) _MD_os2_map_open_error(PRInt32 err); +#define _PR_MD_MAP_OPEN_ERROR _MD_os2_map_open_error + +NSPR_API(void) _MD_os2_map_gethostname_error(PRInt32 err); +#define _PR_MD_MAP_GETHOSTNAME_ERROR _MD_os2_map_gethostname_error + +NSPR_API(void) _MD_os2_map_select_error(PRInt32 err); +#define _PR_MD_MAP_SELECT_ERROR _MD_os2_map_select_error + +NSPR_API(void) _MD_os2_map_lockf_error(int err); +#define _PR_MD_MAP_LOCKF_ERROR _MD_os2_map_lockf_error + +#endif /* nspr_os2_errors_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_osf1.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_osf1.h new file mode 100644 index 00000000..9767b873 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_osf1.h @@ -0,0 +1,255 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_osf1_defs_h___ +#define nspr_osf1_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "osf" +#define _PR_SI_SYSNAME "OSF" +#define _PR_SI_ARCHITECTURE "alpha" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 131072L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#undef HAVE_WEAK_IO_SYMBOLS +#undef HAVE_WEAK_MALLOC_SYMBOLS +#define HAVE_DLL +#define HAVE_BSD_FLOCK + +#define NEED_TIME_R +#define USE_DLFCN + +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_STAT_HAS_ONLY_ST_ATIME +#define _PR_HAVE_LARGE_OFF_T +#define _PR_HAVE_GETIPNODEBYNAME +#define _PR_HAVE_GETIPNODEBYADDR +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#ifdef _PR_INET6 +#define _PR_HAVE_INET_NTOP +#else +#define AF_INET6 26 +#ifndef AI_CANONNAME +#define AI_CANONNAME 0x00000002 +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct addrinfo *ai_next; +}; +#endif +#define AI_V4MAPPED 0x00000010 +#define AI_ALL 0x00000008 +#define AI_ADDRCONFIG 0x00000020 +#endif +#define _PR_HAVE_POSIX_SEMAPHORES +#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY + +#define USE_SETJMP + +#include <setjmp.h> + +/* + * A jmp_buf is actually a struct sigcontext. The sc_sp field of + * struct sigcontext is the stack pointer. + */ +#define _MD_GET_SP(_t) (((struct sigcontext *) (_t)->md.context)->sc_sp) +#define PR_NUM_GCREGS _JBLEN +#define CONTEXT(_th) ((_th)->md.context) + +/* +** Initialize a thread context to run "_main()" when started +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (setjmp(CONTEXT(_thread))) { \ + (*_main)(); \ + } \ + _MD_GET_SP(_thread) = (long) ((_sp) - 64); \ + _MD_GET_SP(_thread) &= ~15; \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + longjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + jmp_buf context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#ifndef _PR_PTHREADS +#define _MD_INIT_LOCKS() +#endif +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +/* + * The following are copied from _sunos.h, _aix.h. This means + * some of them should probably be moved into _unixos.h. But + * _irix.h seems to be quite different in regard to these macros. + */ +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* The following defines unwrapped versions of select() and poll(). */ +#include <sys/time.h> +extern int __select (int, fd_set *, fd_set *, fd_set *, struct timeval *); +#define _MD_SELECT __select + +#include <sys/poll.h> +#define _MD_POLL __poll +extern int __poll(struct pollfd filedes[], unsigned int nfds, int timeout); + +/* + * Atomic operations + */ +#ifdef OSF1_HAVE_MACHINE_BUILTINS_H +#include <machine/builtins.h> +#define _PR_HAVE_ATOMIC_OPS +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_INCREMENT(val) (__ATOMIC_INCREMENT_LONG(val) + 1) +#define _MD_ATOMIC_ADD(ptr, val) (__ATOMIC_ADD_LONG(ptr, val) + val) +#define _MD_ATOMIC_DECREMENT(val) (__ATOMIC_DECREMENT_LONG(val) - 1) +#define _MD_ATOMIC_SET(val, newval) __ATOMIC_EXCH_LONG(val, newval) +#endif /* OSF1_HAVE_MACHINE_BUILTINS_H */ + +#endif /* nspr_osf1_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_pcos.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_pcos.h new file mode 100644 index 00000000..64bd8405 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_pcos.h @@ -0,0 +1,89 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prpcos_h___ +#define prpcos_h___ + +#define PR_DLL_SUFFIX ".dll" + +#include <stdlib.h> + +#define DIRECTORY_SEPARATOR '\\' +#define DIRECTORY_SEPARATOR_STR "\\" +#define PATH_SEPARATOR ';' + +#ifdef WIN16 +#define GCPTR __far +#else +#define GCPTR +#endif + +/* +** Routines for processing command line arguments +*/ +PR_BEGIN_EXTERN_C +#ifndef XP_OS2_EMX +extern char *optarg; +extern int optind; +extern int getopt(int argc, char **argv, char *spec); +#endif +PR_END_EXTERN_C + + +/* +** Definitions of directory structures amd functions +** These definitions are from: +** <dirent.h> +*/ +#ifdef XP_OS2_EMX +#include <sys/types.h> +#endif +#include <sys/stat.h> +#include <io.h> +#include <fcntl.h> /* O_BINARY */ + +#ifdef OS2 +extern PRStatus _MD_OS2GetHostName(char *name, PRUint32 namelen); +#define _MD_GETHOSTNAME _MD_OS2GetHostName +#else +extern PRStatus _MD_WindowsGetHostName(char *name, PRUint32 namelen); +#define _MD_GETHOSTNAME _MD_WindowsGetHostName +extern PRStatus _MD_WindowsGetSysInfo(PRSysInfo cmd, char *name, PRUint32 namelen); +#define _MD_GETSYSINFO _MD_WindowsGetSysInfo +#endif + +#endif /* prpcos_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_pth.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_pth.h new file mode 100644 index 00000000..aadb45e0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_pth.h @@ -0,0 +1,303 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_pth_defs_h_ +#define nspr_pth_defs_h_ + +/* +** Appropriate definitions of entry points not used in a pthreads world +*/ +#define _PR_MD_BLOCK_CLOCK_INTERRUPTS() +#define _PR_MD_UNBLOCK_CLOCK_INTERRUPTS() +#define _PR_MD_DISABLE_CLOCK_INTERRUPTS() +#define _PR_MD_ENABLE_CLOCK_INTERRUPTS() + +/* In good standards fashion, the DCE threads (based on posix-4) are not + * quite the same as newer posix implementations. These are mostly name + * changes and small differences, so macros usually do the trick + */ +#ifdef _PR_DCETHREADS +#define _PT_PTHREAD_MUTEXATTR_INIT pthread_mutexattr_create +#define _PT_PTHREAD_MUTEXATTR_DESTROY pthread_mutexattr_delete +#define _PT_PTHREAD_MUTEX_INIT(m, a) pthread_mutex_init(&(m), a) +#define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (0 == pthread_mutex_trylock(&(m))) +#define _PT_PTHREAD_CONDATTR_INIT pthread_condattr_create +#define _PT_PTHREAD_COND_INIT(m, a) pthread_cond_init(&(m), a) +#define _PT_PTHREAD_CONDATTR_DESTROY pthread_condattr_delete + +/* Notes about differences between DCE threads and pthreads 10: + * 1. pthread_mutex_trylock returns 1 when it locks the mutex + * 0 when it does not. The latest pthreads has a set of errno-like + * return values. + * 2. return values from pthread_cond_timedwait are different. + * + * + * + */ +#elif defined(BSDI) +/* + * Mutex and condition attributes are not supported. The attr + * argument to pthread_mutex_init() and pthread_cond_init() must + * be passed as NULL. + * + * The memset calls in _PT_PTHREAD_MUTEX_INIT and _PT_PTHREAD_COND_INIT + * are to work around BSDI's using a single bit to indicate a mutex + * or condition variable is initialized. This entire BSDI section + * will go away when BSDI releases updated threads libraries for + * BSD/OS 3.1 and 4.0. + */ +#define _PT_PTHREAD_MUTEXATTR_INIT(x) 0 +#define _PT_PTHREAD_MUTEXATTR_DESTROY(x) /* */ +#define _PT_PTHREAD_MUTEX_INIT(m, a) (memset(&(m), 0, sizeof(m)), \ + pthread_mutex_init(&(m), NULL)) +#define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m))) +#define _PT_PTHREAD_CONDATTR_INIT(x) 0 +#define _PT_PTHREAD_CONDATTR_DESTROY(x) /* */ +#define _PT_PTHREAD_COND_INIT(m, a) (memset(&(m), 0, sizeof(m)), \ + pthread_cond_init(&(m), NULL)) +#else +#define _PT_PTHREAD_MUTEXATTR_INIT pthread_mutexattr_init +#define _PT_PTHREAD_MUTEXATTR_DESTROY pthread_mutexattr_destroy +#define _PT_PTHREAD_MUTEX_INIT(m, a) pthread_mutex_init(&(m), &(a)) +#if defined(FREEBSD) +#define _PT_PTHREAD_MUTEX_IS_LOCKED(m) pt_pthread_mutex_is_locked(&(m)) +#else +#define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m))) +#endif +#if defined(DARWIN) +#define _PT_PTHREAD_CONDATTR_INIT(x) 0 +#else +#define _PT_PTHREAD_CONDATTR_INIT pthread_condattr_init +#endif +#define _PT_PTHREAD_CONDATTR_DESTROY pthread_condattr_destroy +#define _PT_PTHREAD_COND_INIT(m, a) pthread_cond_init(&(m), &(a)) +#endif + +/* The pthreads standard does not specify an invalid value for the + * pthread_t handle. (0 is usually an invalid pthread identifier + * but there are exceptions, for example, DG/UX.) These macros + * define a way to set the handle to or compare the handle with an + * invalid identifier. These macros are not portable and may be + * more of a problem as we adapt to more pthreads implementations. + * They are only used in the PRMonitor functions. Do not use them + * in new code. + * + * Unfortunately some of our clients depend on certain properties + * of our PRMonitor implementation, preventing us from replacing + * it by a portable implementation. + * - High-performance servers like the fact that PR_EnterMonitor + * only calls PR_Lock and PR_ExitMonitor only calls PR_Unlock. + * (A portable implementation would use a PRLock and a PRCondVar + * to implement the recursive lock in a monitor and call both + * PR_Lock and PR_Unlock in PR_EnterMonitor and PR_ExitMonitor.) + * Unfortunately this forces us to read the monitor owner field + * without holding a lock. + * - One way to make it safe to read the monitor owner field + * without holding a lock is to make that field a PRThread* + * (one should be able to read a pointer with a single machine + * instruction). However, PR_GetCurrentThread calls calloc if + * it is called by a thread that was not created by NSPR. The + * malloc tracing tools in the Mozilla client use PRMonitor for + * locking in their malloc, calloc, and free functions. If + * PR_EnterMonitor calls any of these functions, infinite + * recursion ensues. + */ +#if defined(_PR_DCETHREADS) +#define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t) \ + memset(&(t), 0, sizeof(pthread_t)) +#define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t) \ + (!memcmp(&(t), &pt_zero_tid, sizeof(pthread_t))) +#define _PT_PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) +#elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \ + || defined(HPUX) || defined(LINUX) || defined(FREEBSD) \ + || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \ + || defined(VMS) || defined(NTO) || defined(DARWIN) \ + || defined(UNIXWARE) || defined(RISCOS) +#define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t) (t) = 0 +#define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t) (t) == 0 +#define _PT_PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) +#else +#error "pthreads is not supported for this architecture" +#endif + +#if defined(_PR_DCETHREADS) +#define _PT_PTHREAD_ATTR_INIT pthread_attr_create +#define _PT_PTHREAD_ATTR_DESTROY pthread_attr_delete +#define _PT_PTHREAD_CREATE(t, a, f, r) pthread_create(t, a, f, r) +#define _PT_PTHREAD_KEY_CREATE pthread_keycreate +#define _PT_PTHREAD_ATTR_SETSCHEDPOLICY pthread_attr_setsched +#define _PT_PTHREAD_ATTR_GETSTACKSIZE(a, s) \ + (*(s) = pthread_attr_getstacksize(*(a)), 0) +#define _PT_PTHREAD_GETSPECIFIC(k, r) \ + pthread_getspecific((k), (pthread_addr_t *) &(r)) +#elif defined(_PR_PTHREADS) +#define _PT_PTHREAD_ATTR_INIT pthread_attr_init +#define _PT_PTHREAD_ATTR_DESTROY pthread_attr_destroy +#define _PT_PTHREAD_CREATE(t, a, f, r) pthread_create(t, &a, f, r) +#define _PT_PTHREAD_KEY_CREATE pthread_key_create +#define _PT_PTHREAD_ATTR_SETSCHEDPOLICY pthread_attr_setschedpolicy +#define _PT_PTHREAD_ATTR_GETSTACKSIZE(a, s) pthread_attr_getstacksize(a, s) +#define _PT_PTHREAD_GETSPECIFIC(k, r) (r) = pthread_getspecific(k) +#else +#error "Cannot determine pthread strategy" +#endif + +#if defined(_PR_DCETHREADS) +#define _PT_PTHREAD_EXPLICIT_SCHED _PT_PTHREAD_DEFAULT_SCHED +#endif + +/* + * pthread_mutex_trylock returns different values in DCE threads and + * pthreads. + */ +#if defined(_PR_DCETHREADS) +#define PT_TRYLOCK_SUCCESS 1 +#define PT_TRYLOCK_BUSY 0 +#else +#define PT_TRYLOCK_SUCCESS 0 +#define PT_TRYLOCK_BUSY EBUSY +#endif + +/* + * These platforms don't have sigtimedwait() + */ +#if (defined(AIX) && !defined(AIX4_3_PLUS)) || defined(LINUX) \ + || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ + || defined(BSDI) || defined(VMS) || defined(UNIXWARE) \ + || defined(DARWIN) +#define PT_NO_SIGTIMEDWAIT +#endif + +/* + * These platforms don't have pthread_kill() + */ +#if defined(DARWIN) +#define pthread_kill(thread, sig) ENOSYS +#endif + +#if defined(OSF1) || defined(VMS) +#define PT_PRIO_MIN PRI_OTHER_MIN +#define PT_PRIO_MAX PRI_OTHER_MAX +#elif defined(IRIX) +#include <sys/sched.h> +#define PT_PRIO_MIN PX_PRIO_MIN +#define PT_PRIO_MAX PX_PRIO_MAX +#elif defined(AIX) +#include <sys/priv.h> +#include <sys/sched.h> +#ifndef PTHREAD_CREATE_JOINABLE +#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED +#endif +#define PT_PRIO_MIN DEFAULT_PRIO +#define PT_PRIO_MAX DEFAULT_PRIO +#elif defined(HPUX) + +#if defined(_PR_DCETHREADS) +#define PT_PRIO_MIN PRI_OTHER_MIN +#define PT_PRIO_MAX PRI_OTHER_MAX +#else /* defined(_PR_DCETHREADS) */ +#include <sys/sched.h> +#define PT_PRIO_MIN sched_get_priority_min(SCHED_OTHER) +#define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER) +#endif /* defined(_PR_DCETHREADS) */ + +#elif defined(LINUX) || defined(FREEBSD) +#define PT_PRIO_MIN sched_get_priority_min(SCHED_OTHER) +#define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER) +#elif defined(NTO) +/* + * Neutrino has functions that return the priority range but + * they return invalid numbers, so I just hard coded these here + * for now. Jerry.Kirk@Nexarecorp.com + */ +#define PT_PRIO_MIN 0 +#define PT_PRIO_MAX 30 +#elif defined(SOLARIS) +/* + * Solaris doesn't seem to have macros for the min/max priorities. + * The range of 0-127 is mentioned in the pthread_setschedparam(3T) + * man pages, and pthread_setschedparam indeed allows 0-127. However, + * pthread_attr_setschedparam does not allow 0; it allows 1-127. + */ +#define PT_PRIO_MIN 1 +#define PT_PRIO_MAX 127 +#elif defined(OPENBSD) +#define PT_PRIO_MIN 0 +#define PT_PRIO_MAX 31 +#elif defined(NETBSD) \ + || defined(BSDI) || defined(DARWIN) || defined(UNIXWARE) \ + || defined(RISCOS) /* XXX */ +#define PT_PRIO_MIN 0 +#define PT_PRIO_MAX 126 +#else +#error "pthreads is not supported for this architecture" +#endif + +/* + * The _PT_PTHREAD_YIELD function is called from a signal handler. + * Needed for garbage collection -- Look at PR_Suspend/PR_Resume + * implementation. + */ +#if defined(_PR_DCETHREADS) +#define _PT_PTHREAD_YIELD() pthread_yield() +#elif defined(OSF1) || defined(VMS) +/* + * sched_yield can't be called from a signal handler. Must use + * the _np version. + */ +#define _PT_PTHREAD_YIELD() pthread_yield_np() +#elif defined(AIX) +extern int (*_PT_aix_yield_fcn)(); +#define _PT_PTHREAD_YIELD() (*_PT_aix_yield_fcn)() +#elif defined(IRIX) +#include <time.h> +#define _PT_PTHREAD_YIELD() \ + PR_BEGIN_MACRO \ + struct timespec onemillisec = {0}; \ + onemillisec.tv_nsec = 1000000L; \ + nanosleep(&onemillisec,NULL); \ + PR_END_MACRO +#elif defined(HPUX) || defined(LINUX) || defined(SOLARIS) \ + || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ + || defined(BSDI) || defined(NTO) || defined(DARWIN) \ + || defined(UNIXWARE) || defined(RISCOS) +#define _PT_PTHREAD_YIELD() sched_yield() +#else +#error "Need to define _PT_PTHREAD_YIELD for this platform" +#endif + +#endif /* nspr_pth_defs_h_ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_qnx.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_qnx.h new file mode 100644 index 00000000..f7593c6a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_qnx.h @@ -0,0 +1,215 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_qnx_defs_h___ +#define nspr_qnx_defs_h___ + +/* +** Internal configuration macros +*/ +#define PR_LINKER_ARCH "qnx" +#define _PR_SI_SYSNAME "QNX" +#define _PR_SI_ARCHITECTURE "x86" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#ifndef HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_IO_SYMBOLS +#endif + +#undef _PR_POLL_AVAILABLE +#undef _PR_USE_POLL +#define _PR_HAVE_SOCKADDR_LEN +#define HAVE_BSD_FLOCK +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ONLY_ST_ATIME + +#include <sys/select.h> + +#undef HAVE_STACK_GROWING_UP +#undef HAVE_DLL +#undef USE_DLFCN +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define _PR_NEED_STRCASECMP + +#ifndef HAVE_STRERROR +#define HAVE_STRERROR +#endif + +#define USE_SETJMP + +#include <setjmp.h> + +#define _SETJMP setjmp +#define _LONGJMP longjmp +#define _PR_CONTEXT_TYPE jmp_buf +#define _PR_NUM_GCREGS _JBLEN +#define _MD_GET_SP(_t) (_t)->md.context[7] + +#define CONTEXT(_th) ((_th)->md.context) + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if(_SETJMP(CONTEXT(_thread))) (*_main)(); \ + _MD_GET_SP(_thread) = (int) ((_sp) - 128); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!_SETJMP(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + _LONGJMP(CONTEXT(_thread), 1); \ +} + +/* +** Machine-dependent (MD) data structures. +*/ +struct _MDThread { + _PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* +** md-specific cpu structure field +*/ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD], fd_write_cnt[_PR_MD_MAX_OSFD], fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* +** We wrapped the select() call. _MD_SELECT refers to the built-in, +** unwrapped version. +*/ +#include <sys/time.h> +#include <sys/types.h> +#include <sys/select.h> +#define _MD_SELECT select + +#define SA_RESTART 0 + +#endif /* nspr_qnx_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_reliantunix.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_reliantunix.h new file mode 100644 index 00000000..a924e2f9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_reliantunix.h @@ -0,0 +1,270 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* + * reliantunix.h + * 5/18/96 Taken from nec.h -- chrisk@netscape.com + * 3/14/97 Modified for nspr20 -- chrisk@netscape.com + */ +#ifndef nspr_reliantunix_defs_h___ +#define nspr_reliantunix_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "sinix" +#define _PR_SI_SYSNAME "SINIX" +#define _PR_SI_ARCHITECTURE "mips" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE (2*65536L) +#define _MD_MMAP_FLAGS MAP_PRIVATE|MAP_FIXED + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_DLFCN +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define HAVE_NETCONFIG +#define HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_MALLOC_SYMBOLS +#define _PR_RECV_BROKEN /* recv doesn't work on Unix Domain Sockets */ +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_STAT_HAS_ST_ATIM +#define _PR_NO_LARGE_FILES + +/* + * Mike Patnode indicated that it is possibly safe now to use context-switching + * calls that do not change the signal mask, like setjmp vs. sigsetjmp. + * So we'll use our homegrown, getcontext/setcontext-compatible stuff which + * will save us the getcontext/setcontext system calls at each context switch. + * It already works in FastTrack 2.01, so it should do it here :-) + * - chrisk 040497 + */ +#define USE_SETCXT /* temporarily disabled... */ + +#include <ucontext.h> + +#ifdef USE_SETCXT +/* use non-syscall machine language replacement */ +#define _GETCONTEXT getcxt +#define _SETCONTEXT setcxt +/* defined in os_ReliantUNIX.s */ +extern int getcxt(ucontext_t *); +extern int setcxt(ucontext_t *); +#else +#define _GETCONTEXT getcontext +#define _SETCONTEXT setcontext +#endif + +#define _MD_GET_SP(_t) (_t)->md.context.uc_mcontext.gpregs[CXT_SP] +#define _PR_CONTEXT_TYPE ucontext_t +#define _PR_NUM_GCREGS NGREG + +#define CONTEXT(_thread) (&(_thread)->md.context) + +#define _PR_IS_NATIVE_THREAD_SUPPORTED() 0 + +/* +** Machine-dependent (MD) data structures. +*/ +struct _MDThread { + _PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +/* +** Initialize the thread context preparing it to execute "_main()" +** - get a nice, fresh context +** - set its SP to the stack we allcoated for it +** - set it to start things at "e" +*/ +#define _MD_INIT_CONTEXT(thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + *status = PR_TRUE; \ + _GETCONTEXT(CONTEXT(thread)); \ + /* this is supposed to point to the stack BASE, not to SP */ \ + CONTEXT(thread)->uc_stack.ss_sp = thread->stack->stackBottom; \ + CONTEXT(thread)->uc_stack.ss_size = thread->stack->stackSize; \ + CONTEXT(thread)->uc_mcontext.gpregs[CXT_SP] = ((unsigned long)_sp - 128) & 0xfffffff8; \ + CONTEXT(thread)->uc_mcontext.gpregs[CXT_T9] = _main; \ + CONTEXT(thread)->uc_mcontext.gpregs[CXT_EPC] = _main; \ + CONTEXT(thread)->uc_mcontext.gpregs[CXT_RA] = 0; \ + thread->no_sched = 0; \ + PR_END_MACRO + +/* +** Save current context as it is scheduled away +*/ +#define _MD_SWITCH_CONTEXT(_thread) \ + PR_BEGIN_MACRO \ + if (!_GETCONTEXT(CONTEXT(_thread))) { \ + _MD_SAVE_ERRNO(_thread); \ + _MD_SET_LAST_THREAD(_thread); \ + _PR_Schedule(); \ + } \ + PR_END_MACRO + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT or set up +** by _MD_INIT_CONTEXT +** CXT_V0 is the register that holds the return value. +** We must set it to 1 so that we can see if the return from +** getcontext() is the result of calling getcontext() or +** setcontext()... +** setting a context got with getcontext() appears to +** return from getcontext(), too! +** CXT_A3 is the register that holds status when returning +** from a syscall. It is set to 0 to indicate success, +** because we want getcontext() on the other side of the magic +** door to be ok. +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ + PR_BEGIN_MACRO \ + ucontext_t *uc = CONTEXT(_thread); \ + uc->uc_mcontext.gpregs[CXT_V0] = 1;\ + uc->uc_mcontext.gpregs[CXT_A3] = 0;\ + _MD_RESTORE_ERRNO(_thread); \ + _MD_SET_CURRENT_THREAD(_thread); \ + _SETCONTEXT(uc); \ + PR_END_MACRO + +#define _MD_SAVE_ERRNO(t) (t)->md.errcode = errno; +#define _MD_RESTORE_ERRNO(t) errno = (t)->md.errcode; + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +#if !defined(S_ISSOCK) && defined(S_IFSOCK) +#define S_ISSOCK(mode) ((mode&0xF000) == 0xC000) +#endif +#if !defined(S_ISLNK) && defined(S_IFLNK) +#define S_ISLNK(mode) ((mode&0xA000) == 0xC000) +#endif + +#include <sys/time.h> +#include <sys/types.h> +#include <sys/select.h> +extern int _select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *execptfds, struct timeval *timeout); +#define _MD_SELECT(nfds,r,w,e,tv) _select(nfds,r,w,e,tv) +#define _MD_POLL _poll + +#endif /* nspr_reliantunix_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_rhapsody.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_rhapsody.h new file mode 100644 index 00000000..fa9903ed --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_rhapsody.h @@ -0,0 +1,225 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_rhapsody_defs_h___ +#define nspr_rhapsody_defs_h___ + +#include "prthread.h" + +#include <sys/syscall.h> + +#define PR_LINKER_ARCH "rhapsody" +#define _PR_SI_SYSNAME "RHAPSODY" +#ifdef i386 +#define _PR_SI_ARCHITECTURE "x86" +#else +#define _PR_SI_ARCHITECTURE "ppc" +#endif +#define PR_DLL_SUFFIX ".dylib" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_MACH_DYLD +#define _PR_HAVE_SOCKADDR_LEN +#define _PR_STAT_HAS_ST_ATIMESPEC +#define _PR_NO_LARGE_FILES +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY + +#define USE_SETJMP + +#if !defined(_PR_PTHREADS) + +#include <setjmp.h> + +#define PR_CONTEXT_TYPE jmp_buf + +#define CONTEXT(_th) ((_th)->md.context) +#define _MD_GET_SP(_th) (((struct sigcontext *) (_th)->md.context)->sc_onstack) +#define PR_NUM_GCREGS _JBLEN + +/* +** Initialize a thread context to run "_main()" when started +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (setjmp(CONTEXT(_thread))) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + longjmp(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +extern PRStatus _MD_InitializeThread(PRThread *thread); + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread +#define _MD_RESUME_THREAD(thread) _MD_resume_thread +#define _MD_CLEAN_THREAD(_thread) + +extern PRStatus _MD_CREATE_THREAD( + PRThread *thread, + void (*start) (void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +extern void _MD_SET_PRIORITY(struct _MDThread *thread, PRUintn newPri); +extern PRStatus _MD_WAIT(PRThread *, PRIntervalTime timeout); +extern PRStatus _MD_WAKEUP_WAITER(PRThread *); +extern void _MD_YIELD(void); + +#endif /* ! _PR_PTHREADS */ + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +extern void _MD_EarlyInit(void); +extern PRIntervalTime _PR_UNIX_GetInterval(void); +extern PRIntervalTime _PR_UNIX_TicksPerSecond(void); + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) + +/* For writev() */ +#include <sys/uio.h> + +#endif /* nspr_rhapsody_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_riscos.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_riscos.h new file mode 100644 index 00000000..5a0309eb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_riscos.h @@ -0,0 +1,209 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): Peter Naulls <peter@chocky.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 ***** */ + +#ifndef nspr_riscos_defs_h___ +#define nspr_riscos_defs_h___ + +/* +** Internal configuration macros +*/ +#define PR_LINKER_ARCH "riscos" +#define _PR_SI_SYSNAME "RISCOS" +#define _PR_SI_ARCHITECTURE "arm" +#define PR_DLL_SUFFIX ".a" + +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_HAVE_SOCKADDR_LEN +#undef HAVE_BSD_FLOCK +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ONLY_ST_ATIME +#define _PR_HAVE_POSIX_SEMAPHORES + +#include <sys/select.h> +#include <sys/poll.h> +#include <kernel.h> + + +#undef HAVE_STACK_GROWING_UP +#undef HAVE_DLL +#undef USE_DLFCN +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define PT_NO_SIGTIMEDWAIT + +#ifndef HAVE_STRERROR +#define HAVE_STRERROR +#endif + +#define USE_SETJMP + +#include <setjmp.h> + +#define _SETJMP setjmp +#define _LONGJMP longjmp +#define _PR_CONTEXT_TYPE jmp_buf +#define _PR_NUM_GCREGS _JBLEN +#define _MD_GET_SP(_t) (_t)->md.context[7] + +#define CONTEXT(_th) ((_th)->md.context) + + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if(_SETJMP(CONTEXT(_thread))) (*_main)(); \ + _MD_GET_SP(_thread) = (int) ((_sp) - 128); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!_SETJMP(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + _LONGJMP(CONTEXT(_thread), 1); \ +} + +/* +** Machine-dependent (MD) data structures. +*/ +struct _MDThread { + _PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* +** md-specific cpu structure field +*/ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD], fd_write_cnt[_PR_MD_MAX_OSFD], fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif +}; + +#define _PR_IOQ(_cpu) /* */ ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* +** We wrapped the select() call. _MD_SELECT refers to the built-in, +** unwrapped version. +*/ +#include <sys/time.h> +#include <sys/types.h> +#include <sys/select.h> +#define _MD_SELECT select + +#endif /* nspr_riscos_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_scoos.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_scoos.h new file mode 100644 index 00000000..6efaa7ea --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_scoos.h @@ -0,0 +1,204 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_scoos5_defs_h___ +#define nspr_scoos5_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "scoos5" +#define PR_DLL_SUFFIX ".so" + +#define _PR_SI_SYSNAME "SCO" +#define _PR_SI_ARCHITECTURE "x86" +#define _PR_STACK_VMBASE 0x50000000 + +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_DLFCN + +#if !defined (HAVE_STRERROR) +#define HAVE_STRERROR +#endif + +#ifndef HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_IO_SYMBOLS +#endif + +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ONLY_ST_ATIME + +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define _PR_RECV_BROKEN /* recv doesn't work on Unix Domain Sockets */ + +#define USE_SETJMP + +#ifdef _PR_LOCAL_THREADS_ONLY +#include <setjmp.h> + +#define _MD_GET_SP(_t) (_t)->md.jb[4] +#define PR_NUM_GCREGS _SIGJBLEN +#define PR_CONTEXT_TYPE sigjmp_buf + +#define CONTEXT(_th) ((_th)->md.jb) + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if (sigsetjmp(CONTEXT(_thread),1)) { \ + (*_main)(); \ + } \ + _MD_GET_SP(_thread) = (int) ((_sp) - 64); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!sigsetjmp(CONTEXT(_thread), 1)) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->osErrorCode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + siglongjmp(CONTEXT(_thread), 1); \ +} + +#endif /* _PR_LOCAL_THREADS_ONLY */ + +struct _MDThread { + jmp_buf jb; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#define _MD_SELECT _select +#define _MD_POLL _poll + +#endif /* nspr_scoos5_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_solaris.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_solaris.h new file mode 100644 index 00000000..aed078fc --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_solaris.h @@ -0,0 +1,806 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_solaris_defs_h___ +#define nspr_solaris_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "solaris" +#define _PR_SI_SYSNAME "SOLARIS" +#ifdef sparc +#define _PR_SI_ARCHITECTURE "sparc" +#elif defined(__x86_64) +#define _PR_SI_ARCHITECTURE "x86-64" +#elif defined(i386) +#define _PR_SI_ARCHITECTURE "x86" +#else +#error unknown processor +#endif +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE (2*65536L) +#define _MD_MMAP_FLAGS MAP_SHARED + +#undef HAVE_STACK_GROWING_UP + +#ifndef HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_IO_SYMBOLS +#endif + +#undef HAVE_WEAK_MALLOC_SYMBOLS +#define HAVE_DLL +#define USE_DLFCN +#define NEED_STRFTIME_LOCK + +/* + * Intel x86 has atomic instructions. + * + * Sparc v8 does not have instructions to efficiently implement + * atomic increment/decrement operations. In the local threads + * only and pthreads versions, we use the default atomic routine + * implementation in pratom.c. The obsolete global threads only + * version uses a global mutex_t to implement the atomic routines + * in solaris.c, which is actually equivalent to the default + * implementation. + * + * 64-bit Solaris requires sparc v9, which has atomic instructions. + */ +#if defined(i386) || defined(_PR_GLOBAL_THREADS_ONLY) || defined(IS_64) +#define _PR_HAVE_ATOMIC_OPS +#endif + +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_STAT_HAS_ST_ATIM +#ifdef SOLARIS2_5 +#define _PR_HAVE_SYSV_SEMAPHORES +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY +#else +#define _PR_HAVE_POSIX_SEMAPHORES +#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY +#endif +#define _PR_HAVE_GETIPNODEBYNAME +#define _PR_HAVE_GETIPNODEBYADDR +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#define _PR_ACCEPT_INHERIT_NONBLOCK +#ifdef _PR_INET6 +#define _PR_HAVE_INET_NTOP +#else +#define AF_INET6 26 +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct addrinfo *ai_next; +}; +#define AI_CANONNAME 0x0010 +#define AI_V4MAPPED 0x0001 +#define AI_ALL 0x0002 +#define AI_ADDRCONFIG 0x0004 +#define _PR_HAVE_MD_SOCKADDR_IN6 +/* isomorphic to struct in6_addr on Solaris 8 */ +struct _md_in6_addr { + union { + PRUint8 _S6_u8[16]; + PRUint32 _S6_u32[4]; + PRUint32 __S6_align; + } _S6_un; +}; +/* isomorphic to struct sockaddr_in6 on Solaris 8 */ +struct _md_sockaddr_in6 { + PRUint16 sin6_family; + PRUint16 sin6_port; + PRUint32 sin6_flowinfo; + struct _md_in6_addr sin6_addr; + PRUint32 sin6_scope_id; + PRUint32 __sin6_src_id; +}; +#endif +#if defined(_PR_GLOBAL_THREADS_ONLY) || defined(_PR_PTHREADS) +#define _PR_HAVE_GETHOST_R +#define _PR_HAVE_GETHOST_R_POINTER +#endif + +#include "prinrval.h" +NSPR_API(PRIntervalTime) _MD_Solaris_GetInterval(void); +#define _MD_GET_INTERVAL _MD_Solaris_GetInterval +NSPR_API(PRIntervalTime) _MD_Solaris_TicksPerSecond(void); +#define _MD_INTERVAL_PER_SEC _MD_Solaris_TicksPerSecond + +#if defined(_PR_HAVE_ATOMIC_OPS) +/* +** Atomic Operations +*/ +#define _MD_INIT_ATOMIC() + +NSPR_API(PRInt32) _MD_AtomicIncrement(PRInt32 *val); +#define _MD_ATOMIC_INCREMENT _MD_AtomicIncrement + +NSPR_API(PRInt32) _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val); +#define _MD_ATOMIC_ADD _MD_AtomicAdd + +NSPR_API(PRInt32) _MD_AtomicDecrement(PRInt32 *val); +#define _MD_ATOMIC_DECREMENT _MD_AtomicDecrement + +NSPR_API(PRInt32) _MD_AtomicSet(PRInt32 *val, PRInt32 newval); +#define _MD_ATOMIC_SET _MD_AtomicSet +#endif /* _PR_HAVE_ATOMIC_OPS */ + +#if defined(_PR_PTHREADS) + +NSPR_API(void) _MD_EarlyInit(void); + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit + +#elif defined(_PR_GLOBAL_THREADS_ONLY) + +#include "prthread.h" + +#include <ucontext.h> + +/* +** Iinitialization Related definitions +*/ + +NSPR_API(void) _MD_EarlyInit(void); + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit + +#define _MD_GET_SP(threadp) threadp->md.sp + +/* +** Clean-up the thread machine dependent data structure +*/ +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_INIT_ATTACHED_THREAD _MD_InitializeThread + +NSPR_API(PRStatus) _MD_CreateThread(PRThread *thread, + void (*start)(void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +#define _MD_CREATE_THREAD _MD_CreateThread + +#define _PR_CONTEXT_TYPE ucontext_t + +#define CONTEXT(_thread) (&(_thread)->md.context) + +#include <thread.h> +#include <sys/lwp.h> +#include <synch.h> + +extern struct PRLock *_pr_schedLock; + +/* +** Thread Local Storage +*/ + +#define THREAD_KEY_T thread_key_t + +extern struct PRThread *_pr_attached_thread_tls(); +extern struct PRThread *_pr_current_thread_tls(); +extern struct _PRCPU *_pr_current_cpu_tls(); +extern struct PRThread *_pr_last_thread_tls(); + +extern THREAD_KEY_T threadid_key; +extern THREAD_KEY_T cpuid_key; +extern THREAD_KEY_T last_thread_key; + +#define _MD_GET_ATTACHED_THREAD() _pr_attached_thread_tls() +#define _MD_CURRENT_THREAD() _pr_current_thread_tls() +#define _MD_CURRENT_CPU() _pr_current_cpu_tls() +#define _MD_LAST_THREAD() _pr_last_thread_tls() + +#define _MD_SET_CURRENT_THREAD(newval) \ + PR_BEGIN_MACRO \ + thr_setspecific(threadid_key, (void *)newval); \ + PR_END_MACRO + +#define _MD_SET_CURRENT_CPU(newval) \ + PR_BEGIN_MACRO \ + thr_setspecific(cpuid_key, (void *)newval); \ + PR_END_MACRO + +#define _MD_SET_LAST_THREAD(newval) \ + PR_BEGIN_MACRO \ + thr_setspecific(last_thread_key, (void *)newval); \ + PR_END_MACRO + +#define _MD_CLEAN_THREAD(_thread) _MD_cleanup_thread(_thread) +extern void _MD_exit_thread(PRThread *thread); +#define _MD_EXIT_THREAD(thread) _MD_exit_thread(thread) + +#define _MD_SUSPEND_THREAD(thread) _MD_Suspend(thread) +#define _MD_RESUME_THREAD(thread) thr_continue((thread)->md.handle) + +/* XXXX Needs to be defined - Prashant */ +#define _MD_SUSPEND_CPU(cpu) +#define _MD_RESUME_CPU(cpu) + +extern void _MD_Begin_SuspendAll(void); +extern void _MD_End_SuspendAll(void); +extern void _MD_End_ResumeAll(void); +#define _MD_BEGIN_SUSPEND_ALL() _MD_Begin_SuspendAll() +#define _MD_BEGIN_RESUME_ALL() +#define _MD_END_SUSPEND_ALL() _MD_End_SuspendAll() +#define _MD_END_RESUME_ALL() _MD_End_ResumeAll() + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(md_lockp) (mutex_init(&((md_lockp)->lock),USYNC_THREAD,NULL) ? PR_FAILURE : PR_SUCCESS) +#define _MD_FREE_LOCK(md_lockp) mutex_destroy(&((md_lockp)->lock)) +#define _MD_UNLOCK(md_lockp) mutex_unlock(&((md_lockp)->lock)) +#define _MD_TEST_AND_LOCK(md_lockp) mutex_trylock(&((md_lockp)->lock)) +struct _MDLock; +NSPR_API(void) _MD_lock(struct _MDLock *md_lock); +#undef PROFILE_LOCKS +#ifndef PROFILE_LOCKS +#define _MD_LOCK(md_lockp) _MD_lock(md_lockp) +#else +#define _MD_LOCK(md_lockp) \ + PR_BEGIN_MACRO \ + int rv = _MD_TEST_AND_LOCK(md_lockp); \ + if (rv == 0) { \ + (md_lockp)->hitcount++; \ + } else { \ + (md_lockp)->misscount++; \ + _MD_lock(md_lockp); \ + } \ + PR_END_MACRO +#endif + +#define _PR_LOCK_HEAP() if (_pr_heapLock) _MD_LOCK(&_pr_heapLock->md) +#define _PR_UNLOCK_HEAP() if (_pr_heapLock) _MD_UNLOCK(&_pr_heapLock->md) + +#define _MD_ATTACH_THREAD(threadp) + + +#define THR_KEYCREATE thr_keycreate +#define THR_SELF thr_self +#define _MD_NEW_CV(condp) cond_init(&((condp)->cv), USYNC_THREAD, 0) +#define COND_WAIT(condp, mutexp) cond_wait(condp, mutexp) +#define COND_TIMEDWAIT(condp, mutexp, tspec) \ + cond_timedwait(condp, mutexp, tspec) +#define _MD_NOTIFY_CV(condp, lockp) cond_signal(&((condp)->cv)) +#define _MD_NOTIFYALL_CV(condp,unused) cond_broadcast(&((condp)->cv)) +#define _MD_FREE_CV(condp) cond_destroy(&((condp)->cv)) +#define _MD_YIELD() thr_yield() +#include <time.h> +/* + * Because clock_gettime() on Solaris/x86 2.4 always generates a + * segmentation fault, we use an emulated version _pr_solx86_clock_gettime(), + * which is implemented using gettimeofday(). + */ +#if defined(i386) && defined(SOLARIS2_4) +extern int _pr_solx86_clock_gettime(clockid_t clock_id, struct timespec *tp); +#define GETTIME(tt) _pr_solx86_clock_gettime(CLOCK_REALTIME, (tt)) +#else +#define GETTIME(tt) clock_gettime(CLOCK_REALTIME, (tt)) +#endif /* i386 && SOLARIS2_4 */ + +#define MUTEX_T mutex_t +#define COND_T cond_t + +#define _MD_NEW_SEM(md_semp,_val) sema_init(&((md_semp)->sem),_val,USYNC_THREAD,NULL) +#define _MD_DESTROY_SEM(md_semp) sema_destroy(&((md_semp)->sem)) +#define _MD_WAIT_SEM(md_semp) sema_wait(&((md_semp)->sem)) +#define _MD_POST_SEM(md_semp) sema_post(&((md_semp)->sem)) + +#define _MD_SAVE_ERRNO(_thread) +#define _MD_RESTORE_ERRNO(_thread) +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) + +extern struct _MDLock _pr_ioq_lock; +#define _MD_IOQ_LOCK() _MD_LOCK(&_pr_ioq_lock) +#define _MD_IOQ_UNLOCK() _MD_UNLOCK(&_pr_ioq_lock) + +extern PRStatus _MD_wait(struct PRThread *, PRIntervalTime timeout); +#define _MD_WAIT _MD_wait + +extern PRStatus _MD_WakeupWaiter(struct PRThread *); +#define _MD_WAKEUP_WAITER _MD_WakeupWaiter + +NSPR_API(void) _MD_InitIO(void); +#define _MD_INIT_IO _MD_InitIO + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + *status = PR_TRUE; \ + PR_END_MACRO +#define _MD_SWITCH_CONTEXT(_thread) +#define _MD_RESTORE_CONTEXT(_newThread) + +struct _MDLock { + MUTEX_T lock; +#ifdef PROFILE_LOCKS + PRInt32 hitcount; + PRInt32 misscount; +#endif +}; + +struct _MDCVar { + COND_T cv; +}; + +struct _MDSemaphore { + sema_t sem; +}; + +struct _MDThread { + _PR_CONTEXT_TYPE context; + thread_t handle; + lwpid_t lwpid; + uint_t sp; /* stack pointer */ + uint_t threadID; /* ptr to solaris-internal thread id structures */ + struct _MDSemaphore waiter_sem; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field, common to all Unix platforms + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +/* The following defines the unwrapped versions of select() and poll(). */ +extern int _select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, struct timeval *timeout); +#define _MD_SELECT _select + +#include <poll.h> +#define _MD_POLL _poll +extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout); + +PR_BEGIN_EXTERN_C + +/* +** Missing function prototypes +*/ +extern int gethostname (char *name, int namelen); + +PR_END_EXTERN_C + +#else /* _PR_GLOBAL_THREADS_ONLY */ + +/* + * LOCAL_THREADS_ONLY implementation on Solaris + */ + +#include "prthread.h" + +#include <errno.h> +#include <ucontext.h> +#include <sys/stack.h> +#include <synch.h> + +/* +** Iinitialization Related definitions +*/ + +NSPR_API(void) _MD_EarlyInit(void); +NSPR_API(void) _MD_SolarisInit(); +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _MD_SolarisInit +#define _MD_INIT_THREAD _MD_InitializeThread + +#ifdef USE_SETJMP + +#include <setjmp.h> + +#define _PR_CONTEXT_TYPE jmp_buf + +#ifdef sparc +#define _MD_GET_SP(_t) (_t)->md.context[2] +#else +#define _MD_GET_SP(_t) (_t)->md.context[4] +#endif + +#define PR_NUM_GCREGS _JBLEN +#define CONTEXT(_thread) (_thread)->md.context + +#else /* ! USE_SETJMP */ + +#ifdef sparc +#define _PR_CONTEXT_TYPE ucontext_t +#define _MD_GET_SP(_t) (_t)->md.context.uc_mcontext.gregs[REG_SP] +/* +** Sparc's use register windows. the _MD_GetRegisters for the sparc's +** doesn't actually store anything into the argument buffer; instead the +** register windows are homed to the stack. I assume that the stack +** always has room for the registers to spill to... +*/ +#define PR_NUM_GCREGS 0 +#else +#define _PR_CONTEXT_TYPE unsigned int edi; sigset_t oldMask, blockMask; ucontext_t +#define _MD_GET_SP(_t) (_t)->md.context.uc_mcontext.gregs[USP] +#define PR_NUM_GCREGS _JBLEN +#endif + +#define CONTEXT(_thread) (&(_thread)->md.context) + +#endif /* ! USE_SETJMP */ + +#include <time.h> +/* + * Because clock_gettime() on Solaris/x86 always generates a + * segmentation fault, we use an emulated version _pr_solx86_clock_gettime(), + * which is implemented using gettimeofday(). + */ +#ifdef i386 +#define GETTIME(tt) _pr_solx86_clock_gettime(CLOCK_REALTIME, (tt)) +#else +#define GETTIME(tt) clock_gettime(CLOCK_REALTIME, (tt)) +#endif /* i386 */ + +#define _MD_SAVE_ERRNO(_thread) (_thread)->md.errcode = errno; +#define _MD_RESTORE_ERRNO(_thread) errno = (_thread)->md.errcode; + +#ifdef sparc + +#ifdef USE_SETJMP +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + int *context = (_thread)->md.context; \ + *status = PR_TRUE; \ + (void) setjmp(context); \ + (_thread)->md.context[1] = (int) ((_sp) - 64); \ + (_thread)->md.context[2] = (int) _main; \ + (_thread)->md.context[3] = (int) _main + 4; \ + _thread->no_sched = 0; \ + PR_END_MACRO + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + _MD_SAVE_ERRNO(_thread) \ + _MD_SET_LAST_THREAD(_thread); \ + _MD_SET_CURRENT_THREAD(_thread); \ + _PR_Schedule(); \ + } + +#define _MD_RESTORE_CONTEXT(_newThread) \ +{ \ + _MD_RESTORE_ERRNO(_newThread) \ + _MD_SET_CURRENT_THREAD(_newThread); \ + longjmp(CONTEXT(_newThread), 1); \ +} + +#else +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + ucontext_t *uc = CONTEXT(_thread); \ + *status = PR_TRUE; \ + getcontext(uc); \ + uc->uc_stack.ss_sp = (char *) ((unsigned long)(_sp - WINDOWSIZE - SA(MINFRAME)) & 0xfffffff8); \ + uc->uc_stack.ss_size = _thread->stack->stackSize; \ + uc->uc_stack.ss_flags = 0; /* ? */ \ + uc->uc_mcontext.gregs[REG_SP] = (unsigned int) uc->uc_stack.ss_sp; \ + uc->uc_mcontext.gregs[REG_PC] = (unsigned int) _main; \ + uc->uc_mcontext.gregs[REG_nPC] = (unsigned int) ((char*)_main)+4; \ + uc->uc_flags = UC_ALL; \ + _thread->no_sched = 0; \ + PR_END_MACRO + +/* +** Switch away from the current thread context by saving its state and +** calling the thread scheduler. Reload cpu when we come back from the +** context switch because it might have changed. +*/ +#define _MD_SWITCH_CONTEXT(_thread) \ + PR_BEGIN_MACRO \ + if (!getcontext(CONTEXT(_thread))) { \ + _MD_SAVE_ERRNO(_thread); \ + _MD_SET_LAST_THREAD(_thread); \ + _PR_Schedule(); \ + } \ + PR_END_MACRO + +/* +** Restore a thread context that was saved by _MD_SWITCH_CONTEXT or +** initialized by _MD_INIT_CONTEXT. +*/ +#define _MD_RESTORE_CONTEXT(_newThread) \ + PR_BEGIN_MACRO \ + ucontext_t *uc = CONTEXT(_newThread); \ + uc->uc_mcontext.gregs[11] = 1; \ + _MD_RESTORE_ERRNO(_newThread); \ + _MD_SET_CURRENT_THREAD(_newThread); \ + setcontext(uc); \ + PR_END_MACRO +#endif + +#else /* x86 solaris */ + +#ifdef USE_SETJMP + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + *status = PR_TRUE; \ + if (setjmp(CONTEXT(_thread))) _main(); \ + _MD_GET_SP(_thread) = (int) ((_sp) - 64); \ + PR_END_MACRO + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!setjmp(CONTEXT(_thread))) { \ + _MD_SAVE_ERRNO(_thread) \ + _PR_Schedule(); \ + } + +#define _MD_RESTORE_CONTEXT(_newThread) \ +{ \ + _MD_RESTORE_ERRNO(_newThread) \ + _MD_SET_CURRENT_THREAD(_newThread); \ + longjmp(CONTEXT(_newThread), 1); \ +} + +#else /* USE_SETJMP */ + +#define WINDOWSIZE 0 + +int getedi(void); +void setedi(int); + +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + ucontext_t *uc = CONTEXT(_thread); \ + *status = PR_TRUE; \ + getcontext(uc); \ + /* Force sp to be double aligned! */ \ + uc->uc_mcontext.gregs[USP] = (int) ((unsigned long)(_sp - WINDOWSIZE - SA(MINFRAME)) & 0xfffffff8); \ + uc->uc_mcontext.gregs[PC] = (int) _main; \ + (_thread)->no_sched = 0; \ + PR_END_MACRO + +/* getcontext() may return 1, contrary to what the man page says */ +#define _MD_SWITCH_CONTEXT(_thread) \ + PR_BEGIN_MACRO \ + ucontext_t *uc = CONTEXT(_thread); \ + PR_ASSERT(_thread->no_sched); \ + sigfillset(&((_thread)->md.blockMask)); \ + sigprocmask(SIG_BLOCK, &((_thread)->md.blockMask), \ + &((_thread)->md.oldMask)); \ + (_thread)->md.edi = getedi(); \ + if (! getcontext(uc)) { \ + sigprocmask(SIG_SETMASK, &((_thread)->md.oldMask), NULL); \ + uc->uc_mcontext.gregs[EDI] = (_thread)->md.edi; \ + _MD_SAVE_ERRNO(_thread) \ + _MD_SET_LAST_THREAD(_thread); \ + _PR_Schedule(); \ + } else { \ + sigprocmask(SIG_SETMASK, &((_thread)->md.oldMask), NULL); \ + setedi((_thread)->md.edi); \ + PR_ASSERT(_MD_LAST_THREAD() !=_MD_CURRENT_THREAD()); \ + _MD_LAST_THREAD()->no_sched = 0; \ + } \ + PR_END_MACRO + +/* +** Restore a thread context, saved by _PR_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_newthread) \ + PR_BEGIN_MACRO \ + ucontext_t *uc = CONTEXT(_newthread); \ + uc->uc_mcontext.gregs[EAX] = 1; \ + _MD_RESTORE_ERRNO(_newthread) \ + _MD_SET_CURRENT_THREAD(_newthread); \ + (_newthread)->no_sched = 1; \ + setcontext(uc); \ + PR_END_MACRO +#endif /* USE_SETJMP */ + +#endif /* sparc */ + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDThread { + _PR_CONTEXT_TYPE context; + int errcode; + int id; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#ifndef _PR_PTHREADS +#define _MD_INIT_LOCKS() +#endif +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +extern PRStatus _MD_WAIT(struct PRThread *, PRIntervalTime timeout); +extern PRStatus _MD_WAKEUP_WAITER(struct PRThread *); +extern void _MD_YIELD(void); +extern PRStatus _MD_InitializeThread(PRThread *thread); +extern void _MD_SET_PRIORITY(struct _MDThread *thread, + PRThreadPriority newPri); +extern PRStatus _MD_CREATE_THREAD(PRThread *thread, void (*start) (void *), + PRThreadPriority priority, PRThreadScope scope, PRThreadState state, + PRUint32 stackSize); + +NSPR_API(PRIntervalTime) _MD_Solaris_GetInterval(void); +#define _MD_GET_INTERVAL _MD_Solaris_GetInterval +NSPR_API(PRIntervalTime) _MD_Solaris_TicksPerSecond(void); +#define _MD_INTERVAL_PER_SEC _MD_Solaris_TicksPerSecond + +/* The following defines the unwrapped versions of select() and poll(). */ +extern int _select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, struct timeval *timeout); +#define _MD_SELECT _select + +#include <stropts.h> +#include <poll.h> +#define _MD_POLL _poll +extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout); + +PR_BEGIN_EXTERN_C + +/* +** Missing function prototypes +*/ +extern int gethostname (char *name, int namelen); + +PR_END_EXTERN_C + +#endif /* _PR_GLOBAL_THREADS_ONLY */ + +extern void _MD_solaris_map_sendfile_error(int err); + +#endif /* nspr_solaris_defs_h___ */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_sony.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_sony.h new file mode 100644 index 00000000..3d17e04d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_sony.h @@ -0,0 +1,204 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_sony_defs_h___ +#define nspr_sony_defs_h___ + +#define PR_LINKER_ARCH "sony" +#define _PR_SI_SYSNAME "SONY" +#define _PR_SI_ARCHITECTURE "mips" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#if defined(_PR_LOCAL_THREADS_ONLY) +#include <ucontext.h> +#include <sys/regset.h> + +#define PR_NUM_GCREGS NGREG +#define PR_CONTEXT_TYPE ucontext_t + +#define CONTEXT(_thread) (&(_thread)->md.context) + +#define _MD_GET_SP(_t) (_t)->md.context.uc_mcontext.gregs[CXT_SP] + +/* +** Initialize the thread context preparing it to execute _main() +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + getcontext(CONTEXT(_thread)); \ + CONTEXT(_thread)->uc_stack.ss_sp = (char*) (_thread)->stack->stackBottom; \ + CONTEXT(_thread)->uc_stack.ss_size = (_thread)->stack->stackSize; \ + _MD_GET_SP(_thread) = (greg_t) (_sp) - 64; \ + makecontext(CONTEXT(_thread), _main, 0); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!getcontext(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + ucontext_t *uc = CONTEXT(_thread); \ + uc->uc_mcontext.gregs[CXT_V0] = 1; \ + uc->uc_mcontext.gregs[CXT_A3] = 0; \ + _MD_SET_CURRENT_THREAD(_thread); \ + errno = (_thread)->md.errcode; \ + setcontext(uc); \ +} + +/* Machine-dependent (MD) data structures */ + +struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* The following defines unwrapped versions of select() and poll(). */ +extern int _select (int, fd_set *, fd_set *, fd_set *, struct timeval *); +#define _MD_SELECT _select + +#include <sys/poll.h> +extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout); +#define _MD_POLL _poll + +#endif /* _PR_LOCAL_THREADS_ONLY */ + +#undef HAVE_STACK_GROWING_UP +#define HAVE_DLL +#define USE_DLFCN +#define NEED_TIME_R +#define NEED_STRFTIME_LOCK + +/* +** Missing function prototypes +*/ +extern int gethostname(char *name, int namelen); + +#endif /* nspr_sony_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_sunos4.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_sunos4.h new file mode 100644 index 00000000..0d62892e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_sunos4.h @@ -0,0 +1,236 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_sunos_defs_h___ +#define nspr_sunos_defs_h___ + +#include "md/sunos4.h" + +/* On SunOS 4, memset is declared in memory.h */ +#include <memory.h> +#include <errno.h> +#include <sys/syscall.h> + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "sunos" +#define _PR_SI_SYSNAME "SUNOS" +#define _PR_SI_ARCHITECTURE "sparc" +#define PR_DLL_SUFFIX ".so.1.0" + +/* +** For sunos type machines, don't specify an address because the +** NetBSD/SPARC O.S. does the wrong thing. +*/ +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#undef HAVE_STACK_GROWING_UP +#undef HAVE_WEAK_IO_SYMBOLS +#undef HAVE_WEAK_MALLOC_SYMBOLS +#define HAVE_DLL +#define USE_DLFCN +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define HAVE_BSD_FLOCK +#define _PR_NO_LARGE_FILES +#define _PR_STAT_HAS_ONLY_ST_ATIME + +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#define USE_SETJMP + +#include <setjmp.h> + +#define _MD_GET_SP(_t) (_t)->md.context[2] + +#define PR_NUM_GCREGS _JBLEN + +#define CONTEXT(_th) ((_th)->md.context) + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + int *context = (_thread)->md.context; \ + *status = PR_TRUE; \ + asm("ta 3"); \ + (void) setjmp(context); \ + (_thread)->md.context[2] = (int) ((_sp) - 64); \ + (_thread)->md.context[2] &= ~7; \ + (_thread)->md.context[3] = (int) _main; \ + (_thread)->md.context[4] = (int) _main + 4; \ + PR_END_MACRO + +#define _MD_SWITCH_CONTEXT(_thread) \ + asm("ta 3"); \ + if (!setjmp(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + longjmp(CONTEXT(_thread), 1); \ +} + +#pragma unknown_control_flow(longjmp) +#pragma unknown_control_flow(setjmp) +#pragma unknown_control_flow(_PR_Schedule) + +/* +** Missing function prototypes +*/ + +extern int socket (int domain, int type, int protocol); +extern int getsockname (int s, struct sockaddr *name, int *namelen); +extern int getpeername (int s, struct sockaddr *name, int *namelen); +extern int getsockopt (int s, int level, int optname, char* optval, int* optlen); +extern int setsockopt (int s, int level, int optname, const char* optval, int optlen); +extern int accept (int s, struct sockaddr *addr, int *addrlen); +extern int listen (int s, int backlog); +extern int brk(void *); +extern void *sbrk(int); + + +/* Machine-dependent (MD) data structures. SunOS 4 has no native threads. */ + +struct _MDThread { + jmp_buf context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +/* These are copied from _solaris.h */ + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) +#define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout) + +#endif /* nspr_sparc_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_unix_errors.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_unix_errors.h new file mode 100644 index 00000000..a44cbb31 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_unix_errors.h @@ -0,0 +1,171 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prunixerrors_h___ +#define prunixerrors_h___ + +#include <unistd.h> +#include <stddef.h> + +PR_BEGIN_EXTERN_C + +extern void _MD_unix_map_default_error(int err); +#define _PR_MD_MAP_DEFAULT_ERROR _MD_unix_map_default_error + +extern void _MD_unix_map_opendir_error(int err); +#define _PR_MD_MAP_OPENDIR_ERROR _MD_unix_map_opendir_error + +extern void _MD_unix_map_closedir_error(int err); +#define _PR_MD_MAP_CLOSEDIR_ERROR _MD_unix_map_closedir_error + +extern void _MD_unix_readdir_error(int err); +#define _PR_MD_MAP_READDIR_ERROR _MD_unix_readdir_error + +extern void _MD_unix_map_unlink_error(int err); +#define _PR_MD_MAP_UNLINK_ERROR _MD_unix_map_unlink_error + +extern void _MD_unix_map_stat_error(int err); +#define _PR_MD_MAP_STAT_ERROR _MD_unix_map_stat_error + +extern void _MD_unix_map_fstat_error(int err); +#define _PR_MD_MAP_FSTAT_ERROR _MD_unix_map_fstat_error + +extern void _MD_unix_map_rename_error(int err); +#define _PR_MD_MAP_RENAME_ERROR _MD_unix_map_rename_error + +extern void _MD_unix_map_access_error(int err); +#define _PR_MD_MAP_ACCESS_ERROR _MD_unix_map_access_error + +extern void _MD_unix_map_mkdir_error(int err); +#define _PR_MD_MAP_MKDIR_ERROR _MD_unix_map_mkdir_error + +extern void _MD_unix_map_rmdir_error(int err); +#define _PR_MD_MAP_RMDIR_ERROR _MD_unix_map_rmdir_error + +extern void _MD_unix_map_read_error(int err); +#define _PR_MD_MAP_READ_ERROR _MD_unix_map_read_error + +extern void _MD_unix_map_write_error(int err); +#define _PR_MD_MAP_WRITE_ERROR _MD_unix_map_write_error + +extern void _MD_unix_map_lseek_error(int err); +#define _PR_MD_MAP_LSEEK_ERROR _MD_unix_map_lseek_error + +extern void _MD_unix_map_fsync_error(int err); +#define _PR_MD_MAP_FSYNC_ERROR _MD_unix_map_fsync_error + +extern void _MD_unix_map_close_error(int err); +#define _PR_MD_MAP_CLOSE_ERROR _MD_unix_map_close_error + +extern void _MD_unix_map_socket_error(int err); +#define _PR_MD_MAP_SOCKET_ERROR _MD_unix_map_socket_error + +extern void _MD_unix_map_socketavailable_error(int err); +#define _PR_MD_MAP_SOCKETAVAILABLE_ERROR _MD_unix_map_socketavailable_error + +extern void _MD_unix_map_recv_error(int err); +#define _PR_MD_MAP_RECV_ERROR _MD_unix_map_recv_error + +extern void _MD_unix_map_recvfrom_error(int err); +#define _PR_MD_MAP_RECVFROM_ERROR _MD_unix_map_recvfrom_error + +extern void _MD_unix_map_send_error(int err); +#define _PR_MD_MAP_SEND_ERROR _MD_unix_map_send_error + +extern void _MD_unix_map_sendto_error(int err); +#define _PR_MD_MAP_SENDTO_ERROR _MD_unix_map_sendto_error + +extern void _MD_unix_map_writev_error(int err); +#define _PR_MD_MAP_WRITEV_ERROR _MD_unix_map_writev_error + +extern void _MD_unix_map_accept_error(int err); +#define _PR_MD_MAP_ACCEPT_ERROR _MD_unix_map_accept_error + +extern void _MD_unix_map_connect_error(int err); +#define _PR_MD_MAP_CONNECT_ERROR _MD_unix_map_connect_error + +extern void _MD_unix_map_bind_error(int err); +#define _PR_MD_MAP_BIND_ERROR _MD_unix_map_bind_error + +extern void _MD_unix_map_listen_error(int err); +#define _PR_MD_MAP_LISTEN_ERROR _MD_unix_map_listen_error + +extern void _MD_unix_map_shutdown_error(int err); +#define _PR_MD_MAP_SHUTDOWN_ERROR _MD_unix_map_shutdown_error + +extern void _MD_unix_map_socketpair_error(int err); +#define _PR_MD_MAP_SOCKETPAIR_ERROR _MD_unix_map_socketpair_error + +extern void _MD_unix_map_getsockname_error(int err); +#define _PR_MD_MAP_GETSOCKNAME_ERROR _MD_unix_map_getsockname_error + +extern void _MD_unix_map_getpeername_error(int err); +#define _PR_MD_MAP_GETPEERNAME_ERROR _MD_unix_map_getpeername_error + +extern void _MD_unix_map_getsockopt_error(int err); +#define _PR_MD_MAP_GETSOCKOPT_ERROR _MD_unix_map_getsockopt_error + +extern void _MD_unix_map_setsockopt_error(int err); +#define _PR_MD_MAP_SETSOCKOPT_ERROR _MD_unix_map_setsockopt_error + +extern void _MD_unix_map_open_error(int err); +#define _PR_MD_MAP_OPEN_ERROR _MD_unix_map_open_error + +extern void _MD_unix_map_mmap_error(int err); +#define _PR_MD_MAP_MMAP_ERROR _MD_unix_map_mmap_error + +extern void _MD_unix_map_gethostname_error(int err); +#define _PR_MD_MAP_GETHOSTNAME_ERROR _MD_unix_map_gethostname_error + +extern void _MD_unix_map_select_error(int err); +#define _PR_MD_MAP_SELECT_ERROR _MD_unix_map_select_error + +extern void _MD_unix_map_poll_error(int err); +#define _PR_MD_MAP_POLL_ERROR _MD_unix_map_poll_error + +extern void _MD_unix_map_poll_revents_error(int err); +#define _PR_MD_MAP_POLL_REVENTS_ERROR _MD_unix_map_poll_revents_error + +extern void _MD_unix_map_flock_error(int err); +#define _PR_MD_MAP_FLOCK_ERROR _MD_unix_map_flock_error + +extern void _MD_unix_map_lockf_error(int err); +#define _PR_MD_MAP_LOCKF_ERROR _MD_unix_map_lockf_error + +PR_END_EXTERN_C + +#endif /* prunixerrors_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_unixos.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_unixos.h new file mode 100644 index 00000000..dd3e948a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_unixos.h @@ -0,0 +1,632 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prunixos_h___ +#define prunixos_h___ + +/* + * If FD_SETSIZE is not defined on the command line, set the default value + * before include select.h + */ +/* + * Linux: FD_SETSIZE is defined in /usr/include/sys/select.h and should + * not be redefined. + */ +#if !defined(LINUX) && !defined(DARWIN) && !defined(NEXTSTEP) +#ifndef FD_SETSIZE +#define FD_SETSIZE 4096 +#endif +#endif + +#include <unistd.h> +#include <stddef.h> +#include <sys/stat.h> +#include <dirent.h> +#include <errno.h> + +#include "prio.h" +#include "prmem.h" +#include "prclist.h" + +/* + * For select(), fd_set, and struct timeval. + * + * In The Single UNIX(R) Specification, Version 2, + * the header file for select() is <sys/time.h>. + * + * fd_set is defined in <sys/types.h>. Usually + * <sys/time.h> includes <sys/types.h>, but on some + * older systems <sys/time.h> does not include + * <sys/types.h>, so we include it explicitly. + */ +#include <sys/time.h> +#include <sys/types.h> +#if defined(AIX) /* Only pre-4.2 AIX needs it, but for simplicity... */ +#include <sys/select.h> +#endif + +#define _PR_HAVE_O_APPEND + +#define PR_DIRECTORY_SEPARATOR '/' +#define PR_DIRECTORY_SEPARATOR_STR "/" +#define PR_PATH_SEPARATOR ':' +#define PR_PATH_SEPARATOR_STR ":" +#define GCPTR +typedef int (*FARPROC)(); + +/* + * intervals at which GLOBAL threads wakeup to check for pending interrupt + */ +#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5 +extern PRIntervalTime intr_timeout_ticks; + +/* + * The bit flags for the in_flags and out_flags fields + * of _PR_UnixPollDesc + */ +#ifdef _PR_USE_POLL +#define _PR_UNIX_POLL_READ POLLIN +#define _PR_UNIX_POLL_WRITE POLLOUT +#define _PR_UNIX_POLL_EXCEPT POLLPRI +#define _PR_UNIX_POLL_ERR POLLERR +#define _PR_UNIX_POLL_NVAL POLLNVAL +#define _PR_UNIX_POLL_HUP POLLHUP +#else /* _PR_USE_POLL */ +#define _PR_UNIX_POLL_READ 0x1 +#define _PR_UNIX_POLL_WRITE 0x2 +#define _PR_UNIX_POLL_EXCEPT 0x4 +#define _PR_UNIX_POLL_ERR 0x8 +#define _PR_UNIX_POLL_NVAL 0x10 +#define _PR_UNIX_POLL_HUP 0x20 +#endif /* _PR_USE_POLL */ + +typedef struct _PRUnixPollDesc { + PRInt32 osfd; + PRInt16 in_flags; + PRInt16 out_flags; +} _PRUnixPollDesc; + +typedef struct PRPollQueue { + PRCList links; /* for linking PRPollQueue's together */ + _PRUnixPollDesc *pds; /* array of poll descriptors */ + PRUintn npds; /* length of the array */ + PRPackedBool on_ioq; /* is this on the async i/o work q? */ + PRIntervalTime timeout; /* timeout, in ticks */ + struct PRThread *thr; +} PRPollQueue; + +#define _PR_POLLQUEUE_PTR(_qp) \ + ((PRPollQueue*) ((char*) (_qp) - offsetof(PRPollQueue,links))) + + +extern PRInt32 _PR_WaitForMultipleFDs( + _PRUnixPollDesc *unixpds, + PRInt32 pdcnt, + PRIntervalTime timeout); +extern void _PR_Unblock_IO_Wait(struct PRThread *thr); + +#if defined(_PR_LOCAL_THREADS_ONLY) || defined(_PR_GLOBAL_THREADS_ONLY) +#define _MD_CHECK_FOR_EXIT() +#endif + +extern fd_set _pr_md_read_set, _pr_md_write_set, _pr_md_exception_set; +extern PRInt16 _pr_md_read_cnt[], _pr_md_write_cnt[], _pr_md_exception_cnt[]; +extern PRInt32 _pr_md_ioq_max_osfd; +extern PRUint32 _pr_md_ioq_timeout; + +struct _MDFileDesc { + int osfd; +#if defined(LINUX) && defined(_PR_PTHREADS) + int tcp_nodelay; /* used by pt_LinuxSendFile */ +#endif +}; + +struct _MDDir { + DIR *d; +}; + +struct _PRCPU; +extern void _MD_unix_init_running_cpu(struct _PRCPU *cpu); + +/* +** Make a redzone at both ends of the stack segment. Disallow access +** to those pages of memory. It's ok if the mprotect call's don't +** work - it just means that we don't really have a functional +** redzone. +*/ +#include <sys/mman.h> +#ifndef PROT_NONE +#define PROT_NONE 0x0 +#endif + +#if defined(DEBUG) && !defined(DARWIN) && !defined(NEXTSTEP) +#if !defined(SOLARIS) +#include <string.h> /* for memset() */ +#define _MD_INIT_STACK(ts,REDZONE) \ + PR_BEGIN_MACRO \ + (void) mprotect((void*)ts->seg->vaddr, REDZONE, PROT_NONE); \ + (void) mprotect((void*) ((char*)ts->seg->vaddr + REDZONE + ts->stackSize),\ + REDZONE, PROT_NONE); \ + /* \ + ** Fill stack memory with something that turns into an illegal \ + ** pointer value. This will sometimes find runtime references to \ + ** uninitialized pointers. We don't do this for solaris because we \ + ** can use purify instead. \ + */ \ + if (_pr_debugStacks) { \ + memset(ts->allocBase + REDZONE, 0xf7, ts->stackSize); \ + } \ + PR_END_MACRO +#else /* !SOLARIS */ +#define _MD_INIT_STACK(ts,REDZONE) \ + PR_BEGIN_MACRO \ + (void) mprotect((void*)ts->seg->vaddr, REDZONE, PROT_NONE); \ + (void) mprotect((void*) ((char*)ts->seg->vaddr + REDZONE + ts->stackSize),\ + REDZONE, PROT_NONE); \ + PR_END_MACRO +#endif /* !SOLARIS */ + +/* + * _MD_CLEAR_STACK + * Allow access to the redzone pages; the access was turned off in + * _MD_INIT_STACK. + */ +#define _MD_CLEAR_STACK(ts) \ + PR_BEGIN_MACRO \ + (void) mprotect((void*)ts->seg->vaddr, REDZONE, PROT_READ|PROT_WRITE);\ + (void) mprotect((void*) ((char*)ts->seg->vaddr + REDZONE + ts->stackSize),\ + REDZONE, PROT_READ|PROT_WRITE); \ + PR_END_MACRO + +#else /* DEBUG */ + +#define _MD_INIT_STACK(ts,REDZONE) +#define _MD_CLEAR_STACK(ts) + +#endif /* DEBUG */ + +#if !defined(SOLARIS) + +#define PR_SET_INTSOFF(newval) + +#endif + +/************************************************************************/ + +extern void _PR_UnixInit(void); + +/************************************************************************/ + +struct _MDProcess { + pid_t pid; +}; + +struct PRProcess; +struct PRProcessAttr; + +/* Create a new process (fork() + exec()) */ +#define _MD_CREATE_PROCESS _MD_CreateUnixProcess +extern struct PRProcess * _MD_CreateUnixProcess( + const char *path, + char *const *argv, + char *const *envp, + const struct PRProcessAttr *attr +); + +#define _MD_DETACH_PROCESS _MD_DetachUnixProcess +extern PRStatus _MD_DetachUnixProcess(struct PRProcess *process); + +/* Wait for a child process to terminate */ +#define _MD_WAIT_PROCESS _MD_WaitUnixProcess +extern PRStatus _MD_WaitUnixProcess(struct PRProcess *process, + PRInt32 *exitCode); + +#define _MD_KILL_PROCESS _MD_KillUnixProcess +extern PRStatus _MD_KillUnixProcess(struct PRProcess *process); + +/************************************************************************/ + +extern void _MD_EnableClockInterrupts(void); +extern void _MD_DisableClockInterrupts(void); + +#define _MD_START_INTERRUPTS _MD_StartInterrupts +#define _MD_STOP_INTERRUPTS _MD_StopInterrupts +#define _MD_DISABLE_CLOCK_INTERRUPTS _MD_DisableClockInterrupts +#define _MD_ENABLE_CLOCK_INTERRUPTS _MD_EnableClockInterrupts +#define _MD_BLOCK_CLOCK_INTERRUPTS _MD_BlockClockInterrupts +#define _MD_UNBLOCK_CLOCK_INTERRUPTS _MD_UnblockClockInterrupts + +/************************************************************************/ + +extern void _MD_InitCPUS(void); +#define _MD_INIT_CPUS _MD_InitCPUS + +extern void _MD_Wakeup_CPUs(void); +#define _MD_WAKEUP_CPUS _MD_Wakeup_CPUs + +#define _MD_PAUSE_CPU _MD_PauseCPU + +#if defined(_PR_LOCAL_THREADS_ONLY) || defined(_PR_GLOBAL_THREADS_ONLY) +#define _MD_CLEANUP_BEFORE_EXIT() +#endif + +#ifndef IRIX +#define _MD_EXIT(status) _exit(status) +#endif + +/************************************************************************/ + +#define _MD_GET_ENV getenv +#define _MD_PUT_ENV putenv + +/************************************************************************/ + +#define _MD_INIT_FILEDESC(fd) + +extern void _MD_MakeNonblock(PRFileDesc *fd); +#define _MD_MAKE_NONBLOCK _MD_MakeNonblock + +/************************************************************************/ + +#if !defined(_PR_PTHREADS) + +extern void _MD_InitSegs(void); +extern PRStatus _MD_AllocSegment(PRSegment *seg, PRUint32 size, + void *vaddr); +extern void _MD_FreeSegment(PRSegment *seg); + +#define _MD_INIT_SEGS _MD_InitSegs +#define _MD_ALLOC_SEGMENT _MD_AllocSegment +#define _MD_FREE_SEGMENT _MD_FreeSegment + +#endif /* !defined(_PR_PTHREADS) */ + +/************************************************************************/ + +#if !defined(HPUX_LW_TIMER) +#define _MD_INTERVAL_INIT() +#endif +#define _MD_INTERVAL_PER_MILLISEC() (_PR_MD_INTERVAL_PER_SEC() / 1000) +#define _MD_INTERVAL_PER_MICROSEC() (_PR_MD_INTERVAL_PER_SEC() / 1000000) + +/************************************************************************/ + +#define _MD_ERRNO() (errno) +#define _MD_GET_SOCKET_ERROR() (errno) + +/************************************************************************/ + +extern PRInt32 _MD_AvailableSocket(PRInt32 osfd); + +extern void _MD_StartInterrupts(void); +extern void _MD_StopInterrupts(void); +extern void _MD_DisableClockInterrupts(void); +extern void _MD_BlockClockInterrupts(void); +extern void _MD_UnblockClockInterrupts(void); +extern void _MD_PauseCPU(PRIntervalTime timeout); + +extern PRStatus _MD_open_dir(struct _MDDir *, const char *); +extern PRInt32 _MD_close_dir(struct _MDDir *); +extern char * _MD_read_dir(struct _MDDir *, PRIntn); +extern PRInt32 _MD_open(const char *name, PRIntn osflags, PRIntn mode); +extern PRInt32 _MD_delete(const char *name); +extern PRInt32 _MD_getfileinfo(const char *fn, PRFileInfo *info); +extern PRInt32 _MD_getfileinfo64(const char *fn, PRFileInfo64 *info); +extern PRInt32 _MD_getopenfileinfo(const PRFileDesc *fd, PRFileInfo *info); +extern PRInt32 _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info); +extern PRInt32 _MD_rename(const char *from, const char *to); +extern PRInt32 _MD_access(const char *name, PRAccessHow how); +extern PRInt32 _MD_mkdir(const char *name, PRIntn mode); +extern PRInt32 _MD_rmdir(const char *name); +extern PRInt32 _MD_accept_read(PRInt32 sock, PRInt32 *newSock, + PRNetAddr **raddr, void *buf, PRInt32 amount); +extern PRInt32 _PR_UnixSendFile(PRFileDesc *sd, PRSendFileData *sfd, + PRTransmitFileFlags flags, PRIntervalTime timeout); + +extern PRStatus _MD_LockFile(PRInt32 osfd); +extern PRStatus _MD_TLockFile(PRInt32 osfd); +extern PRStatus _MD_UnlockFile(PRInt32 osfd); + +#define _MD_OPEN_DIR(dir, name) _MD_open_dir(dir, name) +#define _MD_CLOSE_DIR(dir) _MD_close_dir(dir) +#define _MD_READ_DIR(dir, flags) _MD_read_dir(dir, flags) +#define _MD_OPEN(name, osflags, mode) _MD_open(name, osflags, mode) +#define _MD_OPEN_FILE(name, osflags, mode) _MD_open(name, osflags, mode) +extern PRInt32 _MD_read(PRFileDesc *fd, void *buf, PRInt32 amount); +#define _MD_READ(fd,buf,amount) _MD_read(fd,buf,amount) +extern PRInt32 _MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount); +#define _MD_WRITE(fd,buf,amount) _MD_write(fd,buf,amount) +#define _MD_DELETE(name) _MD_delete(name) +#define _MD_GETFILEINFO(fn, info) _MD_getfileinfo(fn, info) +#define _MD_GETFILEINFO64(fn, info) _MD_getfileinfo64(fn, info) +#define _MD_GETOPENFILEINFO(fd, info) _MD_getopenfileinfo(fd, info) +#define _MD_GETOPENFILEINFO64(fd, info) _MD_getopenfileinfo64(fd, info) +#define _MD_RENAME(from, to) _MD_rename(from, to) +#define _MD_ACCESS(name, how) _MD_access(name, how) +#define _MD_MKDIR(name, mode) _MD_mkdir(name, mode) +#define _MD_MAKE_DIR(name, mode) _MD_mkdir(name, mode) +#define _MD_RMDIR(name) _MD_rmdir(name) +#define _MD_ACCEPT_READ(sock, newSock, raddr, buf, amount) _MD_accept_read(sock, newSock, raddr, buf, amount) + +#define _MD_LOCKFILE _MD_LockFile +#define _MD_TLOCKFILE _MD_TLockFile +#define _MD_UNLOCKFILE _MD_UnlockFile + + +extern PRInt32 _MD_socket(int af, int type, int flags); +#define _MD_SOCKET _MD_socket +extern PRInt32 _MD_connect(PRFileDesc *fd, const PRNetAddr *addr, + PRUint32 addrlen, PRIntervalTime timeout); +#define _MD_CONNECT _MD_connect +extern PRInt32 _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, + PRIntervalTime timeout); +#define _MD_ACCEPT _MD_accept +extern PRInt32 _MD_bind(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen); +#define _MD_BIND _MD_bind +extern PRInt32 _MD_listen(PRFileDesc *fd, PRIntn backlog); +#define _MD_LISTEN _MD_listen +extern PRInt32 _MD_shutdown(PRFileDesc *fd, PRIntn how); +#define _MD_SHUTDOWN _MD_shutdown + +extern PRInt32 _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount, + PRIntn flags, PRIntervalTime timeout); +#define _MD_RECV _MD_recv +extern PRInt32 _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount, + PRIntn flags, PRIntervalTime timeout); +#define _MD_SEND _MD_send +extern PRInt32 _MD_recvfrom(PRFileDesc *fd, void *buf, PRInt32 amount, + PRIntn flags, PRNetAddr *addr, PRUint32 *addrlen, + PRIntervalTime timeout); +#define _MD_RECVFROM _MD_recvfrom +extern PRInt32 _MD_sendto(PRFileDesc *fd, const void *buf, PRInt32 amount, + PRIntn flags, const PRNetAddr *addr, PRUint32 addrlen, + PRIntervalTime timeout); +#define _MD_SENDTO _MD_sendto +extern PRInt32 _MD_writev(PRFileDesc *fd, const struct PRIOVec *iov, + PRInt32 iov_size, PRIntervalTime timeout); +#define _MD_WRITEV _MD_writev + +extern PRInt32 _MD_socketavailable(PRFileDesc *fd); +#define _MD_SOCKETAVAILABLE _MD_socketavailable +extern PRInt64 _MD_socketavailable64(PRFileDesc *fd); +#define _MD_SOCKETAVAILABLE64 _MD_socketavailable64 + +#define _MD_PIPEAVAILABLE _MD_socketavailable + +extern PRInt32 _MD_pr_poll(PRPollDesc *pds, PRIntn npds, + PRIntervalTime timeout); +#define _MD_PR_POLL _MD_pr_poll + +extern PRInt32 _MD_close(PRInt32 osfd); +#define _MD_CLOSE_FILE _MD_close +extern PRInt32 _MD_lseek(PRFileDesc*, PRInt32, PRSeekWhence); +#define _MD_LSEEK _MD_lseek +extern PRInt64 _MD_lseek64(PRFileDesc*, PRInt64, PRSeekWhence); +#define _MD_LSEEK64 _MD_lseek64 +extern PRInt32 _MD_fsync(PRFileDesc *fd); +#define _MD_FSYNC _MD_fsync + +extern PRInt32 _MD_socketpair(int af, int type, int flags, PRInt32 *osfd); +#define _MD_SOCKETPAIR _MD_socketpair + +#define _MD_CLOSE_SOCKET _MD_close + +#ifndef NO_NSPR_10_SUPPORT +#define _MD_STAT stat +#endif + +extern PRStatus _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, + PRUint32 *addrlen); +#define _MD_GETPEERNAME _MD_getpeername +extern PRStatus _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, + PRUint32 *addrlen); +#define _MD_GETSOCKNAME _MD_getsockname + +extern PRStatus _MD_getsockopt(PRFileDesc *fd, PRInt32 level, + PRInt32 optname, char* optval, PRInt32* optlen); +#define _MD_GETSOCKOPT _MD_getsockopt +extern PRStatus _MD_setsockopt(PRFileDesc *fd, PRInt32 level, + PRInt32 optname, const char* optval, PRInt32 optlen); +#define _MD_SETSOCKOPT _MD_setsockopt + +extern PRStatus _MD_set_fd_inheritable(PRFileDesc *fd, PRBool inheritable); +#define _MD_SET_FD_INHERITABLE _MD_set_fd_inheritable + +extern void _MD_init_fd_inheritable(PRFileDesc *fd, PRBool imported); +#define _MD_INIT_FD_INHERITABLE _MD_init_fd_inheritable + +extern void _MD_query_fd_inheritable(PRFileDesc *fd); +#define _MD_QUERY_FD_INHERITABLE _MD_query_fd_inheritable + +extern PRStatus _MD_gethostname(char *name, PRUint32 namelen); +#define _MD_GETHOSTNAME _MD_gethostname + +extern PRStatus _MD_getsysinfo(PRSysInfo cmd, char *name, PRUint32 namelen); +#define _MD_GETSYSINFO _MD_getsysinfo + +extern int _MD_unix_get_nonblocking_connect_error(int osfd); + +/* Memory-mapped files */ + +struct _MDFileMap { + PRIntn prot; + PRIntn flags; + PRBool isAnonFM; /* when true, PR_CloseFileMap() must close the related fd */ +}; + +extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size); +#define _MD_CREATE_FILE_MAP _MD_CreateFileMap + +#define _MD_GET_MEM_MAP_ALIGNMENT() PR_GetPageSize() + +extern void * _MD_MemMap(struct PRFileMap *fmap, PRInt64 offset, + PRUint32 len); +#define _MD_MEM_MAP _MD_MemMap + +extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size); +#define _MD_MEM_UNMAP _MD_MemUnmap + +extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap); +#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap + +/* + * The standard (XPG4) gettimeofday() (from BSD) takes two arguments. + * On some SVR4 derivatives, gettimeofday() takes only one argument. + * The GETTIMEOFDAY macro is intended to hide this difference. + */ +#ifdef HAVE_SVID_GETTOD +#define GETTIMEOFDAY(tp) gettimeofday(tp) +#else +#define GETTIMEOFDAY(tp) gettimeofday((tp), NULL) +#endif + +#if defined(_PR_PTHREADS) && !defined(_PR_POLL_AVAILABLE) +#define _PR_NEED_FAKE_POLL +#endif + +#if defined(_PR_NEED_FAKE_POLL) + +/* + * Some platforms don't have poll(), but our pthreads code calls poll(). + * As a temporary measure, I implemented a fake poll() using select(). + * Here are the struct and macro definitions copied from sys/poll.h + * on Solaris 2.5. + */ + +struct pollfd { + int fd; + short events; + short revents; +}; + +/* poll events */ + +#define POLLIN 0x0001 /* fd is readable */ +#define POLLPRI 0x0002 /* high priority info at fd */ +#define POLLOUT 0x0004 /* fd is writeable (won't block) */ +#define POLLRDNORM 0x0040 /* normal data is readable */ +#define POLLWRNORM POLLOUT +#define POLLRDBAND 0x0080 /* out-of-band data is readable */ +#define POLLWRBAND 0x0100 /* out-of-band data is writeable */ + +#define POLLNORM POLLRDNORM + +#define POLLERR 0x0008 /* fd has error condition */ +#define POLLHUP 0x0010 /* fd has been hung up on */ +#define POLLNVAL 0x0020 /* invalid pollfd entry */ + +extern int poll(struct pollfd *, unsigned long, int); + +#endif /* _PR_NEED_FAKE_POLL */ + +/* +** A vector of the UNIX I/O calls we use. These are here to smooth over +** the rough edges needed for large files. All of NSPR's implmentaions +** go through this vector using syntax of the form +** result = _md_iovector.xxx64(args); +*/ + +#if defined(SOLARIS2_5) +/* +** Special case: Solaris 2.5.1 +** Solaris starts to have 64-bit file I/O in 2.6. We build on Solaris +** 2.5.1 so that we can use the same binaries on both Solaris 2.5.1 and +** 2.6. At run time, we detect whether 64-bit file I/O is available by +** looking up the 64-bit file function symbols in libc. At build time, +** we need to define the 64-bit file I/O datatypes that are compatible +** with their definitions on Solaris 2.6. +*/ +typedef PRInt64 off64_t; +typedef PRUint64 ino64_t; +typedef PRInt64 blkcnt64_t; +struct stat64 { + dev_t st_dev; + long st_pad1[3]; + ino64_t st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + dev_t st_rdev; + long t_pad2[2]; + off64_t st_size; + timestruc_t st_atim; + timestruc_t st_mtim; + timestruc_t st_ctim; + long st_blksize; + blkcnt64_t st_blocks; + char st_fstype[_ST_FSTYPSZ]; + long st_pad4[8]; +}; +typedef struct stat64 _MDStat64; +typedef off64_t _MDOff64_t; + +#elif defined(_PR_HAVE_OFF64_T) +typedef struct stat64 _MDStat64; +typedef off64_t _MDOff64_t; +#elif defined(_PR_HAVE_LARGE_OFF_T) +typedef struct stat _MDStat64; +typedef off_t _MDOff64_t; +#elif defined(_PR_NO_LARGE_FILES) +typedef struct stat _MDStat64; +typedef PRInt64 _MDOff64_t; +#else +#error "I don't know yet" +#endif + +typedef PRIntn (*_MD_Fstat64)(PRIntn osfd, _MDStat64 *buf); +typedef PRIntn (*_MD_Open64)(const char *path, int oflag, ...); +#if defined(VMS) +typedef PRIntn (*_MD_Stat64)(const char *path, _MDStat64 *buf, ...); +#else +typedef PRIntn (*_MD_Stat64)(const char *path, _MDStat64 *buf); +#endif +typedef _MDOff64_t (*_MD_Lseek64)(PRIntn osfd, _MDOff64_t, PRIntn whence); +typedef void* (*_MD_Mmap64)( + void *addr, PRSize len, PRIntn prot, PRIntn flags, + PRIntn fildes, _MDOff64_t offset); +struct _MD_IOVector +{ + _MD_Open64 _open64; + _MD_Mmap64 _mmap64; + _MD_Stat64 _stat64; + _MD_Fstat64 _fstat64; + _MD_Lseek64 _lseek64; +}; +extern struct _MD_IOVector _md_iovector; + +#endif /* prunixos_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_unixware.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_unixware.h new file mode 100644 index 00000000..bdc084f2 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_unixware.h @@ -0,0 +1,219 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_unixware_defs_h___ +#define nspr_unixware_defs_h___ + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "unixware" +#define _PR_SI_SYSNAME "UnixWare" +#define _PR_SI_ARCHITECTURE "x86" +#define PR_DLL_SUFFIX ".so" + +#define _PR_VMBASE 0x30000000 +#define _PR_STACK_VMBASE 0x50000000 +#define _MD_DEFAULT_STACK_SIZE 65536L +#define _MD_MMAP_FLAGS MAP_PRIVATE + +#ifndef HAVE_WEAK_IO_SYMBOLS +#define HAVE_WEAK_IO_SYMBOLS +#endif +#define _PR_POLL_AVAILABLE +#define _PR_USE_POLL +#define _PR_STAT_HAS_ST_ATIM_UNION + +#undef HAVE_STACK_GROWING_UP +#define HAVE_NETCONFIG +#define HAVE_DLL +#define USE_DLFCN +#define HAVE_STRERROR +#define NEED_STRFTIME_LOCK +#define NEED_TIME_R +#define _PR_NEED_STRCASECMP + +#define USE_SETJMP + +#include <setjmp.h> + +#define _SETJMP setjmp +#define _LONGJMP longjmp +#define _PR_CONTEXT_TYPE jmp_buf +#define _MD_GET_SP(_t) (_t)->md.context[4] +#define _PR_NUM_GCREGS _JBLEN + +#define CONTEXT(_th) ((_th)->md.context) + +/* +** Initialize the thread context preparing it to execute _main. +*/ +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ +{ \ + *status = PR_TRUE; \ + if(_SETJMP(CONTEXT(_thread))) (*_main)(); \ + _MD_GET_SP(_thread) = (int) ((_sp) - 128); \ +} + +#define _MD_SWITCH_CONTEXT(_thread) \ + if (!_SETJMP(CONTEXT(_thread))) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _MD_RESTORE_CONTEXT(_thread) \ +{ \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + _LONGJMP(CONTEXT(_thread), 1); \ +} + +/* Machine-dependent (MD) data structures. + * Don't use SVR4 native threads (yet). + */ + +struct _MDThread { + _PR_CONTEXT_TYPE context; + int id; + int errcode; +}; + +struct _MDThreadStack { + PRInt8 notused; +}; + +struct _MDLock { + PRInt8 notused; +}; + +struct _MDSemaphore { + PRInt8 notused; +}; + +struct _MDCVar { + PRInt8 notused; +}; + +struct _MDSegment { + PRInt8 notused; +}; + +/* + * md-specific cpu structure field + */ +#define _PR_MD_MAX_OSFD FD_SETSIZE + +struct _MDCPU_Unix { + PRCList ioQ; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; + PRInt32 ioq_osfd_cnt; +#ifndef _PR_USE_POLL + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; +#else + struct pollfd *ioq_pollfds; + int ioq_pollfds_size; +#endif /* _PR_USE_POLL */ +}; + +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd) +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt) +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds) +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size) + +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32 + +struct _MDCPU { + struct _MDCPU_Unix md_unix; +}; + +#define _MD_INIT_LOCKS() +#define _MD_NEW_LOCK(lock) PR_SUCCESS +#define _MD_FREE_LOCK(lock) +#define _MD_LOCK(lock) +#define _MD_UNLOCK(lock) +#define _MD_INIT_IO() +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + +/* + * The following are copied from _sunos.h, _aix.h. This means + * some of them should probably be moved into _unixos.h. But + * _irix.h seems to be quite different in regard to these macros. + */ +#define _MD_GET_INTERVAL _PR_UNIX_GetInterval +#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + +#define _MD_EARLY_INIT _MD_EarlyInit +#define _MD_FINAL_INIT _PR_UnixInit +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) +#define _MD_INIT_THREAD _MD_InitializeThread +#define _MD_EXIT_THREAD(thread) +#define _MD_SUSPEND_THREAD(thread) +#define _MD_RESUME_THREAD(thread) +#define _MD_CLEAN_THREAD(_thread) + +/* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ +#include <sys/time.h> +#include <sys/types.h> +#include <sys/select.h> +extern int _select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *execptfds, struct timeval *timeout); +#define _MD_SELECT _select + +#define _MD_POLL _poll +extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout); + +#endif /* nspr_unixware_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_win16.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_win16.h new file mode 100644 index 00000000..d7e79c22 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_win16.h @@ -0,0 +1,568 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_win16_defs_h___ +#define nspr_win16_defs_h___ + +#include <windows.h> +#include <winsock.h> +#include <errno.h> +#include <direct.h> + +#include "nspr.h" +/* $$ fix this */ +#define Remind(x) + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "win16" +#define _PR_SI_SYSNAME "WIN16" +#define _PR_SI_ARCHITECTURE "x86" /* XXXMB hardcode for now */ + +#define HAVE_DLL +#define _PR_NO_PREEMPT +#define _PR_LOCAL_THREADS_ONLY +#undef _PR_GLOBAL_THREADS_ONLY +#undef HAVE_THREAD_AFFINITY +#define _PR_HAVE_ATOMIC_OPS + +/* --- Common User-Thread/Native-Thread Definitions --------------------- */ + +extern struct PRLock *_pr_schedLock; +extern char * _pr_top_of_task_stack; + + +/* --- Typedefs --- */ + +#define PR_NUM_GCREGS 9 +typedef PRInt32 PR_CONTEXT_TYPE[PR_NUM_GCREGS]; + +#define _MD_MAGIC_THREAD 0x22222222 +#define _MD_MAGIC_THREADSTACK 0x33333333 +#define _MD_MAGIC_SEGMENT 0x44444444 +#define _MD_MAGIC_DIR 0x55555555 +#define _MD_MAGIC_CV 0x66666666 + + +typedef struct _PRWin16PollDesc +{ + PRInt32 osfd; + PRInt16 in_flags; + PRInt16 out_flags; +} _PRWin16PollDesc; + +typedef struct PRPollQueue +{ + PRCList links; /* for linking PRPollQueue's together */ + _PRWin16PollDesc *pds; /* array of poll descriptors */ + PRUintn npds; /* length of the array */ + PRPackedBool on_ioq; /* is this on the async i/o work q? */ + PRIntervalTime timeout; /* timeout, in ticks */ + struct PRThread *thr; +} PRPollQueue; + +#define _PR_POLLQUEUE_PTR(_qp) \ + ((PRPollQueue *) ((char*) (_qp) - offsetof(PRPollQueue,links))) + +NSPR_API(PRInt32) _PR_WaitForFD(PRInt32 osfd, PRUintn how, + PRIntervalTime timeout); +NSPR_API(void) _PR_Unblock_IO_Wait(struct PRThread *thr); + +#define _PR_MD_MAX_OSFD FD_SETSIZE +#define _PR_IOQ(_cpu) ((_cpu)->md.ioQ) +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu)) +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.fd_read_set) +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.fd_read_cnt) +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.fd_write_set) +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.fd_write_cnt) +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.fd_exception_set) +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.fd_exception_cnt) +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.ioq_timeout) +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.ioq_max_osfd) + +struct _MDCPU { + PRCList ioQ; + fd_set fd_read_set, fd_write_set, fd_exception_set; + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD], + fd_exception_cnt[_PR_MD_MAX_OSFD]; + PRUint32 ioq_timeout; + PRInt32 ioq_max_osfd; +}; + +struct _MDThread { + /* The overlapped structure must be first! */ + HANDLE blocked_sema; /* Threads block on this when waiting + * for IO or CondVar. + */ + PRInt32 errcode; /* preserved errno for this thread */ + CATCHBUF context; /* thread context for Throw() */ + void *SP; /* Stack pointer, used only by GarbColl */ + int threadNumber; /* instrumentation: order of creation */ + _PRWin16PollDesc thr_pd; /* poll descriptor for i/o */ + PRPollQueue thr_pq; /* i/o parameters */ + void *exceptionContext; /* mfc exception context */ + char guardBand[24]; /* don't overwrite this */ + PRUint32 magic; /* self identifier, for debug */ +}; + +struct _MDThreadStack { + PRUint32 magic; /* for debugging */ + PRIntn cxByteCount; /* number of stack bytes to move */ + char * stackTop; /* high address on stack */ +}; + +struct _MDSegment { + PRUint32 magic; /* for debugging */ +}; + + +struct _MDLock { + PRUint32 magic; /* for debugging */ + PRUint32 mutex; +}; + +struct _MDDir { + PRUint32 magic; /* for debugging */ + struct dirent *dir; +}; + +struct _MDCVar { + PRUint32 magic; +}; + +struct _MDSemaphore { + PRInt32 unused; +}; + +struct _MDFileDesc { + PRInt32 osfd; +}; + +struct _MDProcess { + HANDLE handle; + DWORD id; +}; + +/* +** Microsoft 'struct _stat' +** ... taken directly from msvc 1.52c's header file sys/stat.h +** see PR_Stat() implemented in w16io.c +** See BugSplat: 98516 +*/ +#pragma pack(push) +#pragma pack(2) + +typedef unsigned short _ino_t; +typedef short _dev_t; +typedef long _off_t; + +typedef struct _MDMSStat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; +} _MDMSStat; +#pragma pack(pop) + +/* --- Errors --- */ + /* These are NSPR generated error codes which need to be unique from + * OS error codes. + */ +#define _MD_UNIQUEBASE 50000 +#define _MD_EINTERRUPTED _MD_UNIQUEBASE + 1 +#define _MD_ETIMEDOUT _MD_UNIQUEBASE + 2 +#define _MD_EIO _MD_UNIQUEBASE + 3 + +struct PRProcess; +struct PRProcessAttr; + +/* --- Create a new process --- */ +#define _MD_CREATE_PROCESS _PR_CreateWindowsProcess +extern struct PRProcess * _PR_CreateWindowsProcess( + const char *path, + char *const *argv, + char *const *envp, + const struct PRProcessAttr *attr +); + +#define _MD_DETACH_PROCESS _PR_DetachWindowsProcess +extern PRStatus _PR_DetachWindowsProcess(struct PRProcess *process); + +/* --- Wait for a child process to terminate --- */ +#define _MD_WAIT_PROCESS _PR_WaitWindowsProcess +extern PRStatus _PR_WaitWindowsProcess(struct PRProcess *process, + PRInt32 *exitCode); + +#define _MD_KILL_PROCESS _PR_KillWindowsProcess +extern PRStatus _PR_KillWindowsProcess(struct PRProcess *process); + + +/* --- Misc stuff --- */ + +#define MD_ASSERTINT( x ) PR_ASSERT( (x) < 65535 ) + +/* --- IO stuff --- */ +#define MAX_PATH 256 +#define _MD_ERRNO() errno +#define GetLastError() errno + +#define _MD_GET_FILE_ERROR() errno +#define _MD_SET_FILE_ERROR(_err) errno = (_err) + +#define _MD_OPEN _PR_MD_OPEN +#define _MD_READ _PR_MD_READ +#define _MD_WRITE _PR_MD_WRITE +#define _MD_WRITEV _PR_MD_WRITEV +#define _MD_LSEEK _PR_MD_LSEEK +#define _MD_LSEEK64 _PR_MD_LSEEK64 +#define _MD_CLOSE_FILE _PR_MD_CLOSE_FILE +#define _MD_GETFILEINFO _PR_MD_GETFILEINFO +#define _MD_GETOPENFILEINFO _PR_MD_GETOPENFILEINFO +#define _MD_STAT _PR_MD_STAT +#define _MD_RENAME _PR_MD_RENAME +#define _MD_ACCESS _PR_MD_ACCESS +#define _MD_DELETE _PR_MD_DELETE +#define _MD_MKDIR _PR_MD_MKDIR +#define _MD_RMDIR _PR_MD_RMDIR +#define _MD_LOCKFILE _PR_MD_LOCKFILE +#define _MD_TLOCKFILE _PR_MD_TLOCKFILE +#define _MD_UNLOCKFILE _PR_MD_UNLOCKFILE + + +/* --- Socket IO stuff --- */ +#define _MD_EACCES WSAEACCES +#define _MD_EADDRINUSE WSAEADDRINUSE +#define _MD_EADDRNOTAVAIL WSAEADDRNOTAVAIL +#define _MD_EAFNOSUPPORT WSAEAFNOSUPPORT +#define _MD_EAGAIN WSAEWOULDBLOCK +#define _MD_EALREADY WSAEALREADY +#define _MD_EBADF WSAEBADF +#define _MD_ECONNREFUSED WSAECONNREFUSED +#define _MD_ECONNRESET WSAECONNRESET +#define _MD_EFAULT WSAEFAULT +#define _MD_EINPROGRESS WSAEINPROGRESS +#define _MD_EINTR WSAEINTR +#define _MD_EINVAL EINVAL +#define _MD_EISCONN WSAEISCONN +#define _MD_ENETUNREACH WSAENETUNREACH +#define _MD_ENOENT ENOENT +#define _MD_ENOTCONN WSAENOTCONN +#define _MD_ENOTSOCK WSAENOTSOCK +#define _MD_EOPNOTSUPP WSAEOPNOTSUPP +#define _MD_EWOULDBLOCK WSAEWOULDBLOCK +#define _MD_GET_SOCKET_ERROR() WSAGetLastError() +#define _MD_SET_SOCKET_ERROR(_err) WSASetLastError(_err) + +#define _MD_INIT_FILEDESC(fd) +#define _MD_MAKE_NONBLOCK _PR_MD_MAKE_NONBLOCK +#define _MD_SHUTDOWN _PR_MD_SHUTDOWN +#define _MD_LISTEN _PR_MD_LISTEN +#define _MD_CLOSE_SOCKET _PR_MD_CLOSE_SOCKET +#define _MD_SENDTO _PR_MD_SENDTO +#define _MD_RECVFROM _PR_MD_RECVFROM +#define _MD_SOCKETPAIR(s, type, proto, sv) -1 +#define _MD_GETSOCKNAME _PR_MD_GETSOCKNAME +#define _MD_GETPEERNAME _PR_MD_GETPEERNAME +#define _MD_GETSOCKOPT _PR_MD_GETSOCKOPT +#define _MD_SETSOCKOPT _PR_MD_SETSOCKOPT +#define _MD_SELECT select +#define _MD_FSYNC _PR_MD_FSYNC +#define _MD_SOCKETAVAILABLE _PR_MD_SOCKETAVAILABLE + +#define _MD_INIT_ATOMIC() +#define _MD_ATOMIC_INCREMENT(x) (*x++) +#define _MD_ATOMIC_ADD(ptr, val) ((*x) += val) +#define _MD_ATOMIC_DECREMENT(x) (*x--) +#define _MD_ATOMIC_SET(x,y) (*x, y) + +#define _MD_INIT_IO _PR_MD_INIT_IO + +/* win95 doesn't have async IO */ +#define _MD_SOCKET _PR_MD_SOCKET +#define _MD_CONNECT _PR_MD_CONNECT +#define _MD_ACCEPT _PR_MD_ACCEPT +#define _MD_BIND _PR_MD_BIND +#define _MD_RECV _PR_MD_RECV +#define _MD_SEND _PR_MD_SEND + +#define _MD_CHECK_FOR_EXIT() + +/* --- Scheduler stuff --- */ +#define _MD_PAUSE_CPU _PR_MD_PAUSE_CPU + +/* --- DIR stuff --- */ +#define PR_DIRECTORY_SEPARATOR '\\' +#define PR_DIRECTORY_SEPARATOR_STR "\\" +#define PR_PATH_SEPARATOR ';' +#define PR_PATH_SEPARATOR_STR ";" +#define _MD_OPEN_DIR _PR_MD_OPEN_DIR +#define _MD_CLOSE_DIR _PR_MD_CLOSE_DIR +#define _MD_READ_DIR _PR_MD_READ_DIR + +/* --- Segment stuff --- */ +#define _MD_INIT_SEGS() +#define _MD_ALLOC_SEGMENT _MD_AllocSegment +#define _MD_FREE_SEGMENT _MD_FreeSegment + +/* --- Environment Stuff --- */ +#define _MD_GET_ENV _PR_MD_GET_ENV +#define _MD_PUT_ENV _PR_MD_PUT_ENV + +/* --- Threading Stuff --- */ +#define _MD_DEFAULT_STACK_SIZE 32767L +#define _MD_INIT_THREAD _PR_MD_INIT_THREAD +#define _MD_CREATE_THREAD(t,f,p,sc,st,stsiz) (PR_SUCCESS) +#define _MD_YIELD _PR_MD_YIELD +#define _MD_SET_PRIORITY(t,p) +#define _MD_CLEAN_THREAD(t) +#define _MD_SETTHREADAFFINITYMASK _PR_MD_SETTHREADAFFINITYMASK +#define _MD_GETTHREADAFFINITYMASK _PR_MD_GETTHREADAFFINITYMASK +#define _MD_EXIT_THREAD +#define _MD_SUSPEND_THREAD _PR_MD_SUSPEND_THREAD +#define _MD_RESUME_THREAD _PR_MD_RESUME_THREAD +#define _MD_SUSPEND_CPU _PR_MD_SUSPEND_CPU +#define _MD_RESUME_CPU _PR_MD_RESUME_CPU +#define _MD_BEGIN_SUSPEND_ALL() +#define _MD_BEGIN_RESUME_ALL() +#define _MD_END_SUSPEND_ALL() +#define _MD_END_RESUME_ALL() + +/* --- Lock stuff --- */ +/* +** Win16 does not need MD locks. +*/ +#define _PR_LOCK _MD_LOCK +#define _PR_UNLOCK _MD_UNLOCK + +#define _MD_NEW_LOCK(l) (PR_SUCCESS) +#define _MD_FREE_LOCK(l) +#define _MD_LOCK(l) +#define _MD_TEST_AND_LOCK(l) (-1) +#define _MD_UNLOCK(l) + +/* --- lock and cv waiting --- */ +#define _MD_WAIT _PR_MD_WAIT +#define _MD_WAKEUP_WAITER(a) +#define _MD_WAKEUP_CPUS _PR_MD_WAKEUP_CPUS + +/* --- CVar ------------------- */ +#define _MD_WAIT_CV _PR_MD_WAIT_CV +#define _MD_NEW_CV _PR_MD_NEW_CV +#define _MD_FREE_CV _PR_MD_FREE_CV +#define _MD_NOTIFY_CV _PR_MD_NOTIFY_CV +#define _MD_NOTIFYALL_CV _PR_MD_NOTIFYALL_CV + + /* XXXMB- the IOQ stuff is certainly not working correctly yet. */ +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + + +/* --- Initialization stuff --- */ +NSPR_API(void) _MD_INIT_RUNNING_CPU(struct _PRCPU *cpu ); +#define _MD_START_INTERRUPTS() +#define _MD_STOP_INTERRUPTS() +#define _MD_DISABLE_CLOCK_INTERRUPTS() +#define _MD_ENABLE_CLOCK_INTERRUPTS() +#define _MD_BLOCK_CLOCK_INTERRUPTS() +#define _MD_UNBLOCK_CLOCK_INTERRUPTS() +#define _MD_EARLY_INIT _PR_MD_EARLY_INIT +#define _MD_FINAL_INIT _PR_MD_FINAL_INIT +#define _MD_INIT_CPUS() + +/* --- User Threading stuff --- */ +#define _MD_EXIT + +#define _MD_CLEANUP_BEFORE_EXIT _PR_MD_CLEANUP_BEFORE_EXIT + +/* --- Intervals --- */ +#define _MD_INTERVAL_INIT _PR_MD_INTERVAL_INIT +#define _MD_GET_INTERVAL _PR_MD_GET_INTERVAL +#define _MD_INTERVAL_PER_SEC _PR_MD_INTERVAL_PER_SEC +#define _MD_INTERVAL_PER_MILLISEC() (_PR_MD_INTERVAL_PER_SEC() / 1000) +#define _MD_INTERVAL_PER_MICROSEC() (_PR_MD_INTERVAL_PER_SEC() / 1000000) + +/* --- Scheduler stuff --- */ +#define LOCK_SCHEDULER() 0 +#define UNLOCK_SCHEDULER() 0 +#define _PR_LockSched() 0 +#define _PR_UnlockSched() 0 + +/* --- Initialization stuff --- */ +#define _MD_INIT_LOCKS() + +/* --- Stack stuff --- */ +#define _MD_INIT_STACK _PR_MD_INIT_STACK +#define _MD_CLEAR_STACK(stack) + +/* +** Watcom needs to see this to make the linker work. +** +*/ +NSPR_API(void) _PR_NativeDestroyThread(PRThread *thread); +NSPR_API(void) _PR_UserDestroyThread(PRThread *thread); + + +/* +** If thread emulation is used, then setjmp/longjmp stores the register +** state of each thread. +** +** CatchBuf layout: +** context[0] - IP +** context[1] - CS +** context[2] - SP +** context[3] - BP +** context[4] - SI +** context[5] - DI +** context[6] - DS +** context[7] - ?? (maybe flags) +** context[8] - SS +*/ +#define PR_CONTEXT_TYPE CATCHBUF +#define PR_NUM_GCREGS 9 + +#define _MD_GET_SP(thread) ((thread)->md.SP) +#define CONTEXT(_t) ((_t)->md.context) + +/* +** Initialize a thread context to run "e(o,a)" when started +*/ +#define _MD_INIT_CONTEXT(_t, sp, epa, stat ) \ +{ \ + *(stat) = PR_TRUE; \ + Catch((_t)->md.context ); \ + (_t)->md.context[0] = OFFSETOF(epa); \ + (_t)->md.context[1] = SELECTOROF(epa); \ + (_t)->md.context[2] = OFFSETOF(_pr_top_of_task_stack - 64); \ + (_t)->md.context[3] = 0; \ +} + +#define _MD_SWITCH_CONTEXT(_t) \ + if (!Catch((_t)->md.context)) { \ + int garbCollPlaceHolder; \ + (_t)->md.errcode = errno; \ + (_t)->md.SP = &garbCollPlaceHolder; \ + _PR_Schedule(); \ + } + +#define _MD_SAVE_CONTEXT(_t) \ + { \ + int garbCollPlaceHolder; \ + Catch((_t)->md.context); \ + (_t)->md.errcode = errno; \ + (_t)->md.SP = &garbCollPlaceHolder; \ + } + +/* +** Restore a thread context, saved by _MD_SWITCH_CONTEXT +*/ +#define _PR_MD_RESTORE_CONTEXT _MD_RESTORE_CONTEXT + +/* + * Memory-mapped files + */ + +struct _MDFileMap { + PRInt8 unused; +}; + +extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size); +#define _MD_CREATE_FILE_MAP _MD_CreateFileMap + +extern PRInt32 _MD_GetMemMapAlignment(void); +#define _MD_GET_MEM_MAP_ALIGNMENT _MD_GetMemMapAlignment + +extern void * _MD_MemMap(struct PRFileMap *fmap, PRInt64 offset, + PRUint32 len); +#define _MD_MEM_MAP _MD_MemMap + +extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size); +#define _MD_MEM_UNMAP _MD_MemUnmap + +extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap); +#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap + + +/* --- Error mapping ----------------------------------- */ +extern void _PR_MD_map_error( int err ); + +#define _PR_MD_MAP_OPENDIR_ERROR _PR_MD_map_error +#define _PR_MD_MAP_CLOSEDIR_ERROR _PR_MD_map_error +#define _PR_MD_MAP_READDIR_ERROR _PR_MD_map_error +#define _PR_MD_MAP_DELETE_ERROR _PR_MD_map_error +#define _PR_MD_MAP_STAT_ERROR _PR_MD_map_error +#define _PR_MD_MAP_FSTAT_ERROR _PR_MD_map_error +#define _PR_MD_MAP_RENAME_ERROR _PR_MD_map_error +#define _PR_MD_MAP_ACCESS_ERROR _PR_MD_map_error +#define _PR_MD_MAP_MKDIR_ERROR _PR_MD_map_error +#define _PR_MD_MAP_RMDIR_ERROR _PR_MD_map_error +#define _PR_MD_MAP_READ_ERROR _PR_MD_map_error +#define _PR_MD_MAP_TRANSMITFILE_ERROR _PR_MD_map_error +#define _PR_MD_MAP_WRITE_ERROR _PR_MD_map_error +#define _PR_MD_MAP_LSEEK_ERROR _PR_MD_map_error +#define _PR_MD_MAP_FSYNC_ERROR _PR_MD_map_error +#define _PR_MD_MAP_CLOSE_ERROR _PR_MD_map_error +#define _PR_MD_MAP_SOCKET_ERROR _PR_MD_map_error +#define _PR_MD_MAP_RECV_ERROR _PR_MD_map_error +#define _PR_MD_MAP_RECVFROM_ERROR _PR_MD_map_error +#define _PR_MD_MAP_SEND_ERROR _PR_MD_map_error +#define _PR_MD_MAP_SENDTO_ERROR _PR_MD_map_error +#define _PR_MD_MAP_ACCEPT_ERROR _PR_MD_map_error +#define _PR_MD_MAP_ACCEPTEX_ERROR _PR_MD_map_error +#define _PR_MD_MAP_CONNECT_ERROR _PR_MD_map_error +#define _PR_MD_MAP_BIND_ERROR _PR_MD_map_error +#define _PR_MD_MAP_LISTEN_ERROR _PR_MD_map_error +#define _PR_MD_MAP_SHUTDOWN_ERROR _PR_MD_map_error +#define _PR_MD_MAP_GETSOCKNAME_ERROR _PR_MD_map_error +#define _PR_MD_MAP_GETPEERNAME_ERROR _PR_MD_map_error +#define _PR_MD_MAP_GETSOCKOPT_ERROR _PR_MD_map_error +#define _PR_MD_MAP_SETSOCKOPT_ERROR _PR_MD_map_error +#define _PR_MD_MAP_OPEN_ERROR _PR_MD_map_error +#define _PR_MD_MAP_GETHOSTNAME_ERROR _PR_MD_map_error +#define _PR_MD_MAP_SELECT_ERROR _PR_MD_map_error +#define _PR_MD_MAP_LOCKF_ERROR _PR_MD_map_error +#define _PR_MD_MAP_WSASTARTUP_ERROR _PR_MD_map_error + +#endif /* nspr_win16_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_win32_errors.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_win32_errors.h new file mode 100644 index 00000000..d5d8b714 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_win32_errors.h @@ -0,0 +1,154 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_win32_errors_h___ +#define nspr_win32_errors_h___ + +#include <windows.h> +#include <winsock.h> +#include <errno.h> + + +extern void _MD_win32_map_default_error(PRInt32 err); +#define _PR_MD_MAP_DEFAULT_ERROR _MD_win32_map_default_error + +extern void _MD_win32_map_opendir_error(PRInt32 err); +#define _PR_MD_MAP_OPENDIR_ERROR _MD_win32_map_opendir_error + +extern void _MD_win32_map_closedir_error(PRInt32 err); +#define _PR_MD_MAP_CLOSEDIR_ERROR _MD_win32_map_closedir_error + +extern void _MD_unix_readdir_error(PRInt32 err); +#define _PR_MD_MAP_READDIR_ERROR _MD_unix_readdir_error + +extern void _MD_win32_map_delete_error(PRInt32 err); +#define _PR_MD_MAP_DELETE_ERROR _MD_win32_map_delete_error + +extern void _MD_win32_map_stat_error(PRInt32 err); +#define _PR_MD_MAP_STAT_ERROR _MD_win32_map_stat_error + +extern void _MD_win32_map_fstat_error(PRInt32 err); +#define _PR_MD_MAP_FSTAT_ERROR _MD_win32_map_fstat_error + +extern void _MD_win32_map_rename_error(PRInt32 err); +#define _PR_MD_MAP_RENAME_ERROR _MD_win32_map_rename_error + +extern void _MD_win32_map_access_error(PRInt32 err); +#define _PR_MD_MAP_ACCESS_ERROR _MD_win32_map_access_error + +extern void _MD_win32_map_mkdir_error(PRInt32 err); +#define _PR_MD_MAP_MKDIR_ERROR _MD_win32_map_mkdir_error + +extern void _MD_win32_map_rmdir_error(PRInt32 err); +#define _PR_MD_MAP_RMDIR_ERROR _MD_win32_map_rmdir_error + +extern void _MD_win32_map_read_error(PRInt32 err); +#define _PR_MD_MAP_READ_ERROR _MD_win32_map_read_error + +extern void _MD_win32_map_transmitfile_error(PRInt32 err); +#define _PR_MD_MAP_TRANSMITFILE_ERROR _MD_win32_map_transmitfile_error + +extern void _MD_win32_map_write_error(PRInt32 err); +#define _PR_MD_MAP_WRITE_ERROR _MD_win32_map_write_error + +extern void _MD_win32_map_lseek_error(PRInt32 err); +#define _PR_MD_MAP_LSEEK_ERROR _MD_win32_map_lseek_error + +extern void _MD_win32_map_fsync_error(PRInt32 err); +#define _PR_MD_MAP_FSYNC_ERROR _MD_win32_map_fsync_error + +extern void _MD_win32_map_close_error(PRInt32 err); +#define _PR_MD_MAP_CLOSE_ERROR _MD_win32_map_close_error + +extern void _MD_win32_map_socket_error(PRInt32 err); +#define _PR_MD_MAP_SOCKET_ERROR _MD_win32_map_socket_error + +extern void _MD_win32_map_recv_error(PRInt32 err); +#define _PR_MD_MAP_RECV_ERROR _MD_win32_map_recv_error + +extern void _MD_win32_map_recvfrom_error(PRInt32 err); +#define _PR_MD_MAP_RECVFROM_ERROR _MD_win32_map_recvfrom_error + +extern void _MD_win32_map_send_error(PRInt32 err); +#define _PR_MD_MAP_SEND_ERROR _MD_win32_map_send_error + +extern void _MD_win32_map_sendto_error(PRInt32 err); +#define _PR_MD_MAP_SENDTO_ERROR _MD_win32_map_sendto_error + +extern void _MD_win32_map_accept_error(PRInt32 err); +#define _PR_MD_MAP_ACCEPT_ERROR _MD_win32_map_accept_error + +extern void _MD_win32_map_acceptex_error(PRInt32 err); +#define _PR_MD_MAP_ACCEPTEX_ERROR _MD_win32_map_acceptex_error + +extern PRInt32 _MD_win32_map_connect_error(PRInt32 err); +#define _PR_MD_MAP_CONNECT_ERROR _MD_win32_map_connect_error + +extern void _MD_win32_map_bind_error(PRInt32 err); +#define _PR_MD_MAP_BIND_ERROR _MD_win32_map_bind_error + +extern void _MD_win32_map_listen_error(PRInt32 err); +#define _PR_MD_MAP_LISTEN_ERROR _MD_win32_map_listen_error + +extern void _MD_win32_map_shutdown_error(PRInt32 err); +#define _PR_MD_MAP_SHUTDOWN_ERROR _MD_win32_map_shutdown_error + +extern void _MD_win32_map_getsockname_error(PRInt32 err); +#define _PR_MD_MAP_GETSOCKNAME_ERROR _MD_win32_map_getsockname_error + +extern void _MD_win32_map_getpeername_error(PRInt32 err); +#define _PR_MD_MAP_GETPEERNAME_ERROR _MD_win32_map_getpeername_error + +extern void _MD_win32_map_getsockopt_error(PRInt32 err); +#define _PR_MD_MAP_GETSOCKOPT_ERROR _MD_win32_map_getsockopt_error + +extern void _MD_win32_map_setsockopt_error(PRInt32 err); +#define _PR_MD_MAP_SETSOCKOPT_ERROR _MD_win32_map_setsockopt_error + +extern void _MD_win32_map_open_error(PRInt32 err); +#define _PR_MD_MAP_OPEN_ERROR _MD_win32_map_open_error + +extern void _MD_win32_map_gethostname_error(PRInt32 err); +#define _PR_MD_MAP_GETHOSTNAME_ERROR _MD_win32_map_gethostname_error + +extern void _MD_win32_map_select_error(PRInt32 err); +#define _PR_MD_MAP_SELECT_ERROR _MD_win32_map_select_error + +extern void _MD_win32_map_lockf_error(int err); +#define _PR_MD_MAP_LOCKF_ERROR _MD_win32_map_lockf_error + +#endif /* nspr_win32_errors_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_win95.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_win95.h new file mode 100644 index 00000000..cd26bd63 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_win95.h @@ -0,0 +1,549 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_win95_defs_h___ +#define nspr_win95_defs_h___ + +#include "prio.h" + +#include <windows.h> +#include <winsock.h> +#include <errno.h> + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "win32" +#define _PR_SI_SYSNAME "WIN95" +#define _PR_SI_ARCHITECTURE "x86" /* XXXMB hardcode for now */ + +#define HAVE_DLL +#undef HAVE_THREAD_AFFINITY +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#ifndef _PR_INET6 +#define AF_INET6 23 +/* newer ws2tcpip.h provides these */ +#ifndef AI_CANONNAME +#define AI_CANONNAME 0x2 +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct addrinfo *ai_next; +}; +#endif +#define _PR_HAVE_MD_SOCKADDR_IN6 +/* isomorphic to struct in6_addr on Windows */ +struct _md_in6_addr { + union { + PRUint8 _S6_u8[16]; + PRUint16 _S6_u16[8]; + } _S6_un; +}; +/* isomorphic to struct sockaddr_in6 on Windows */ +struct _md_sockaddr_in6 { + PRInt16 sin6_family; + PRUint16 sin6_port; + PRUint32 sin6_flowinfo; + struct _md_in6_addr sin6_addr; + PRUint32 sin6_scope_id; +}; +#endif +#define _PR_HAVE_THREADSAFE_GETHOST +#define _PR_HAVE_ATOMIC_OPS +#define PR_HAVE_WIN32_NAMED_SHARED_MEMORY + +/* --- Common User-Thread/Native-Thread Definitions --------------------- */ + +/* --- Globals --- */ +extern struct PRLock *_pr_schedLock; + +/* --- Typedefs --- */ +typedef void (*FiberFunc)(void *); + +#define PR_NUM_GCREGS 8 +typedef PRInt32 PR_CONTEXT_TYPE[PR_NUM_GCREGS]; +#define GC_VMBASE 0x40000000 +#define GC_VMLIMIT 0x00FFFFFF + +#define _MD_MAGIC_THREAD 0x22222222 +#define _MD_MAGIC_THREADSTACK 0x33333333 +#define _MD_MAGIC_SEGMENT 0x44444444 +#define _MD_MAGIC_DIR 0x55555555 +#define _MD_MAGIC_CV 0x66666666 + +struct _MDCPU { + int unused; +}; + +struct _MDThread { + HANDLE blocked_sema; /* Threads block on this when waiting + * for IO or CondVar. + */ + PRBool inCVWaitQueue; /* PR_TRUE if the thread is in the + * wait queue of some cond var. + * PR_FALSE otherwise. */ + HANDLE handle; /* Win32 thread handle */ + PRUint32 id; + void *sp; /* only valid when suspended */ + PRUint32 magic; /* for debugging */ + PR_CONTEXT_TYPE gcContext; /* Thread context for GC */ + struct PRThread *prev, *next; /* used by the cvar wait queue to + * chain the PRThread structures + * together */ + void (*start)(void *); /* used by _PR_MD_CREATE_THREAD to + * pass its 'start' argument to + * pr_root. */ +}; + +struct _MDThreadStack { + PRUint32 magic; /* for debugging */ +}; + +struct _MDSegment { + PRUint32 magic; /* for debugging */ +}; + +#undef PROFILE_LOCKS + +struct _MDDir { + HANDLE d_hdl; + WIN32_FIND_DATA d_entry; + PRBool firstEntry; /* Is this the entry returned + * by FindFirstFile()? */ + PRUint32 magic; /* for debugging */ +}; + +#ifdef MOZ_UNICODE +struct _MDDirUTF16 { + HANDLE d_hdl; + WIN32_FIND_DATAW d_entry; + PRBool firstEntry; /* Is this the entry returned + * by FindFirstFileW()? */ + PRUint32 magic; /* for debugging */ +}; +#endif /* MOZ_UNICODE */ + +struct _MDCVar { + PRUint32 magic; + struct PRThread *waitHead, *waitTail; /* the wait queue: a doubly- + * linked list of threads + * waiting on this condition + * variable */ + PRIntn nwait; /* number of threads in the + * wait queue */ +}; + +#define _MD_CV_NOTIFIED_LENGTH 6 +typedef struct _MDNotified _MDNotified; +struct _MDNotified { + PRIntn length; /* # of used entries in this + * structure */ + struct { + struct _MDCVar *cv; /* the condition variable notified */ + PRIntn times; /* and the number of times notified */ + struct PRThread *notifyHead; /* list of threads to wake up */ + } cv[_MD_CV_NOTIFIED_LENGTH]; + _MDNotified *link; /* link to another of these, or NULL */ +}; + +struct _MDLock { + CRITICAL_SECTION mutex; /* this is recursive on NT */ + + /* + * When notifying cvars, there is no point in actually + * waking up the threads waiting on the cvars until we've + * released the lock. So, we temporarily record the cvars. + * When doing an unlock, we'll then wake up the waiting threads. + */ + struct _MDNotified notified; /* array of conditions notified */ +#ifdef PROFILE_LOCKS + PRInt32 hitcount; + PRInt32 misscount; +#endif +}; + +struct _MDSemaphore { + HANDLE sem; +}; + +struct _MDFileDesc { + PRInt32 osfd; /* The osfd can come from one of three spaces: + * - For stdin, stdout, and stderr, we are using + * the libc file handle (0, 1, 2), which is an int. + * - For files and pipes, we are using Win32 HANDLE, + * which is a void*. + * - For sockets, we are using Winsock SOCKET, which + * is a u_int. + */ +}; + +struct _MDProcess { + HANDLE handle; + DWORD id; +}; + +/* --- Misc stuff --- */ +#define _MD_GET_SP(thread) (thread)->md.gcContext[6] + +/* --- NT security stuff --- */ + +extern void _PR_NT_InitSids(void); +extern void _PR_NT_FreeSids(void); +extern PRStatus _PR_NT_MakeSecurityDescriptorACL( + PRIntn mode, + DWORD accessTable[], + PSECURITY_DESCRIPTOR *resultSD, + PACL *resultACL +); +extern void _PR_NT_FreeSecurityDescriptorACL( + PSECURITY_DESCRIPTOR pSD, PACL pACL); + +/* --- IO stuff --- */ + +#define _MD_OPEN _PR_MD_OPEN +#define _MD_OPEN_FILE _PR_MD_OPEN_FILE +#define _MD_READ _PR_MD_READ +#define _MD_WRITE _PR_MD_WRITE +#define _MD_WRITEV _PR_MD_WRITEV +#define _MD_LSEEK _PR_MD_LSEEK +#define _MD_LSEEK64 _PR_MD_LSEEK64 +extern PRInt32 _MD_CloseFile(PRInt32 osfd); +#define _MD_CLOSE_FILE _MD_CloseFile +#define _MD_GETFILEINFO _PR_MD_GETFILEINFO +#define _MD_GETFILEINFO64 _PR_MD_GETFILEINFO64 +#define _MD_GETOPENFILEINFO _PR_MD_GETOPENFILEINFO +#define _MD_GETOPENFILEINFO64 _PR_MD_GETOPENFILEINFO64 +#define _MD_STAT _PR_MD_STAT +#define _MD_RENAME _PR_MD_RENAME +#define _MD_ACCESS _PR_MD_ACCESS +#define _MD_DELETE _PR_MD_DELETE +#define _MD_MKDIR _PR_MD_MKDIR +#define _MD_MAKE_DIR _PR_MD_MAKE_DIR +#define _MD_RMDIR _PR_MD_RMDIR +#define _MD_LOCKFILE _PR_MD_LOCKFILE +#define _MD_TLOCKFILE _PR_MD_TLOCKFILE +#define _MD_UNLOCKFILE _PR_MD_UNLOCKFILE + +#ifdef MOZ_UNICODE +/* --- UTF16 IO stuff --- */ +#define _MD_OPEN_FILE_UTF16 _PR_MD_OPEN_FILE_UTF16 +#define _MD_OPEN_DIR_UTF16 _PR_MD_OPEN_DIR_UTF16 +#define _MD_READ_DIR_UTF16 _PR_MD_READ_DIR_UTF16 +#define _MD_CLOSE_DIR_UTF16 _PR_MD_CLOSE_DIR_UTF16 +#define _MD_GETFILEINFO64_UTF16 _PR_MD_GETFILEINFO64_UTF16 +#endif /* MOZ_UNICODE */ + +/* --- Socket IO stuff --- */ +#define _MD_EACCES WSAEACCES +#define _MD_EADDRINUSE WSAEADDRINUSE +#define _MD_EADDRNOTAVAIL WSAEADDRNOTAVAIL +#define _MD_EAFNOSUPPORT WSAEAFNOSUPPORT +#define _MD_EAGAIN WSAEWOULDBLOCK +#define _MD_EALREADY WSAEALREADY +#define _MD_EBADF WSAEBADF +#define _MD_ECONNREFUSED WSAECONNREFUSED +#define _MD_ECONNRESET WSAECONNRESET +#define _MD_EFAULT WSAEFAULT +#define _MD_EINPROGRESS WSAEINPROGRESS +#define _MD_EINTR WSAEINTR +#define _MD_EINVAL EINVAL +#define _MD_EISCONN WSAEISCONN +#define _MD_ENETUNREACH WSAENETUNREACH +#define _MD_ENOENT ENOENT +#define _MD_ENOTCONN WSAENOTCONN +#define _MD_ENOTSOCK WSAENOTSOCK +#define _MD_EOPNOTSUPP WSAEOPNOTSUPP +#define _MD_EWOULDBLOCK WSAEWOULDBLOCK +#define _MD_GET_SOCKET_ERROR() WSAGetLastError() +#define _MD_SET_SOCKET_ERROR(_err) WSASetLastError(_err) + +#define _MD_INIT_FILEDESC(fd) +extern void _MD_MakeNonblock(PRFileDesc *f); +#define _MD_MAKE_NONBLOCK _MD_MakeNonblock +#define _MD_INIT_FD_INHERITABLE _PR_MD_INIT_FD_INHERITABLE +#define _MD_QUERY_FD_INHERITABLE _PR_MD_QUERY_FD_INHERITABLE +#define _MD_SHUTDOWN _PR_MD_SHUTDOWN +#define _MD_LISTEN _PR_MD_LISTEN +extern PRInt32 _MD_CloseSocket(PRInt32 osfd); +#define _MD_CLOSE_SOCKET _MD_CloseSocket +#define _MD_SENDTO _PR_MD_SENDTO +#define _MD_RECVFROM _PR_MD_RECVFROM +#define _MD_SOCKETPAIR(s, type, proto, sv) -1 +#define _MD_GETSOCKNAME _PR_MD_GETSOCKNAME +#define _MD_GETPEERNAME _PR_MD_GETPEERNAME +#define _MD_GETSOCKOPT _PR_MD_GETSOCKOPT +#define _MD_SETSOCKOPT _PR_MD_SETSOCKOPT +#define _MD_SET_FD_INHERITABLE _PR_MD_SET_FD_INHERITABLE +#define _MD_SELECT select +#define _MD_FSYNC _PR_MD_FSYNC +#define READ_FD 1 +#define WRITE_FD 2 + +#define _MD_INIT_ATOMIC() +#if defined(_M_IX86) || defined(_X86_) +#define _MD_ATOMIC_INCREMENT _PR_MD_ATOMIC_INCREMENT +#define _MD_ATOMIC_ADD _PR_MD_ATOMIC_ADD +#define _MD_ATOMIC_DECREMENT _PR_MD_ATOMIC_DECREMENT +#else /* non-x86 processors */ +#define _MD_ATOMIC_INCREMENT(x) InterlockedIncrement((PLONG)x) +#define _MD_ATOMIC_ADD(ptr,val) (InterlockedExchangeAdd((PLONG)ptr, (LONG)val) + val) +#define _MD_ATOMIC_DECREMENT(x) InterlockedDecrement((PLONG)x) +#endif /* x86 */ +#define _MD_ATOMIC_SET(x,y) InterlockedExchange((PLONG)x, (LONG)y) + +#define _MD_INIT_IO _PR_MD_INIT_IO + + +/* win95 doesn't have async IO */ +#define _MD_SOCKET _PR_MD_SOCKET +extern PRInt32 _MD_SocketAvailable(PRFileDesc *fd); +#define _MD_SOCKETAVAILABLE _MD_SocketAvailable +#define _MD_PIPEAVAILABLE _PR_MD_PIPEAVAILABLE +#define _MD_CONNECT _PR_MD_CONNECT +extern PRInt32 _MD_Accept(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen, + PRIntervalTime timeout); +#define _MD_ACCEPT _MD_Accept +#define _MD_BIND _PR_MD_BIND +#define _MD_RECV _PR_MD_RECV +#define _MD_SEND _PR_MD_SEND +#define _MD_PR_POLL _PR_MD_PR_POLL + +/* --- Scheduler stuff --- */ +// #define _MD_PAUSE_CPU _PR_MD_PAUSE_CPU +#define _MD_PAUSE_CPU + +/* --- DIR stuff --- */ +#define PR_DIRECTORY_SEPARATOR '\\' +#define PR_DIRECTORY_SEPARATOR_STR "\\" +#define PR_PATH_SEPARATOR ';' +#define PR_PATH_SEPARATOR_STR ";" +#define _MD_ERRNO() GetLastError() +#define _MD_OPEN_DIR _PR_MD_OPEN_DIR +#define _MD_CLOSE_DIR _PR_MD_CLOSE_DIR +#define _MD_READ_DIR _PR_MD_READ_DIR + +/* --- Segment stuff --- */ +#define _MD_INIT_SEGS() +#define _MD_ALLOC_SEGMENT(seg, size, vaddr) 0 +#define _MD_FREE_SEGMENT(seg) + +/* --- Environment Stuff --- */ +#define _MD_GET_ENV _PR_MD_GET_ENV +#define _MD_PUT_ENV _PR_MD_PUT_ENV + +/* --- Threading Stuff --- */ +#define _MD_DEFAULT_STACK_SIZE 0 +#define _MD_INIT_THREAD _PR_MD_INIT_THREAD +#define _MD_INIT_ATTACHED_THREAD _PR_MD_INIT_THREAD +#define _MD_CREATE_THREAD _PR_MD_CREATE_THREAD +#define _MD_YIELD _PR_MD_YIELD +#define _MD_SET_PRIORITY _PR_MD_SET_PRIORITY +#define _MD_CLEAN_THREAD _PR_MD_CLEAN_THREAD +#define _MD_SETTHREADAFFINITYMASK _PR_MD_SETTHREADAFFINITYMASK +#define _MD_GETTHREADAFFINITYMASK _PR_MD_GETTHREADAFFINITYMASK +#define _MD_EXIT_THREAD _PR_MD_EXIT_THREAD +#define _MD_EXIT _PR_MD_EXIT +#define _MD_SUSPEND_THREAD _PR_MD_SUSPEND_THREAD +#define _MD_RESUME_THREAD _PR_MD_RESUME_THREAD +#define _MD_SUSPEND_CPU _PR_MD_SUSPEND_CPU +#define _MD_RESUME_CPU _PR_MD_RESUME_CPU +#define _MD_BEGIN_SUSPEND_ALL() +#define _MD_BEGIN_RESUME_ALL() +#define _MD_END_SUSPEND_ALL() +#define _MD_END_RESUME_ALL() + +/* --- Lock stuff --- */ +#define _PR_LOCK _MD_LOCK +#define _PR_UNLOCK _MD_UNLOCK + +#define _MD_NEW_LOCK(lock) (InitializeCriticalSection(&((lock)->mutex)),(lock)->notified.length=0,(lock)->notified.link=NULL,PR_SUCCESS) +#define _MD_FREE_LOCK(lock) DeleteCriticalSection(&((lock)->mutex)) +#define _MD_LOCK(lock) EnterCriticalSection(&((lock)->mutex)) +#define _MD_TEST_AND_LOCK(lock) (EnterCriticalSection(&((lock)->mutex)),0) +#define _MD_UNLOCK _PR_MD_UNLOCK + +/* --- lock and cv waiting --- */ +#define _MD_WAIT _PR_MD_WAIT +#define _MD_WAKEUP_WAITER _PR_MD_WAKEUP_WAITER + +/* --- CVar ------------------- */ +#define _MD_WAIT_CV _PR_MD_WAIT_CV +#define _MD_NEW_CV _PR_MD_NEW_CV +#define _MD_FREE_CV _PR_MD_FREE_CV +#define _MD_NOTIFY_CV _PR_MD_NOTIFY_CV +#define _MD_NOTIFYALL_CV _PR_MD_NOTIFYALL_CV + + /* XXXMB- the IOQ stuff is certainly not working correctly yet. */ +// extern struct _MDLock _pr_ioq_lock; +#define _MD_IOQ_LOCK() +#define _MD_IOQ_UNLOCK() + + +/* --- Initialization stuff --- */ +#define _MD_START_INTERRUPTS() +#define _MD_STOP_INTERRUPTS() +#define _MD_DISABLE_CLOCK_INTERRUPTS() +#define _MD_ENABLE_CLOCK_INTERRUPTS() +#define _MD_BLOCK_CLOCK_INTERRUPTS() +#define _MD_UNBLOCK_CLOCK_INTERRUPTS() +#define _MD_EARLY_INIT _PR_MD_EARLY_INIT +#define _MD_FINAL_INIT() +#define _MD_INIT_CPUS() +#define _MD_INIT_RUNNING_CPU(cpu) + +struct PRProcess; +struct PRProcessAttr; + +#define _MD_CREATE_PROCESS _PR_CreateWindowsProcess +extern struct PRProcess * _PR_CreateWindowsProcess( + const char *path, + char *const *argv, + char *const *envp, + const struct PRProcessAttr *attr +); + +#define _MD_DETACH_PROCESS _PR_DetachWindowsProcess +extern PRStatus _PR_DetachWindowsProcess(struct PRProcess *process); + +/* --- Wait for a child process to terminate --- */ +#define _MD_WAIT_PROCESS _PR_WaitWindowsProcess +extern PRStatus _PR_WaitWindowsProcess(struct PRProcess *process, + PRInt32 *exitCode); + +#define _MD_KILL_PROCESS _PR_KillWindowsProcess +extern PRStatus _PR_KillWindowsProcess(struct PRProcess *process); + +#define _MD_CLEANUP_BEFORE_EXIT _PR_MD_CLEANUP_BEFORE_EXIT +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + PR_BEGIN_MACRO \ + *status = PR_TRUE; \ + PR_END_MACRO +#define _MD_SWITCH_CONTEXT +#define _MD_RESTORE_CONTEXT + +/* --- Intervals --- */ +#define _MD_INTERVAL_INIT _PR_MD_INTERVAL_INIT +#define _MD_GET_INTERVAL _PR_MD_GET_INTERVAL +#define _MD_INTERVAL_PER_SEC _PR_MD_INTERVAL_PER_SEC +#define _MD_INTERVAL_PER_MILLISEC() (_PR_MD_INTERVAL_PER_SEC() / 1000) +#define _MD_INTERVAL_PER_MICROSEC() (_PR_MD_INTERVAL_PER_SEC() / 1000000) + +/* --- Time --- */ +extern void _PR_FileTimeToPRTime(const FILETIME *filetime, PRTime *prtm); + +/* --- Native-Thread Specific Definitions ------------------------------- */ + +extern struct PRThread * _MD_CURRENT_THREAD(void); + +#ifdef _PR_USE_STATIC_TLS +extern __declspec(thread) struct PRThread *_pr_currentThread; +#define _MD_GET_ATTACHED_THREAD() _pr_currentThread +#define _MD_SET_CURRENT_THREAD(_thread) (_pr_currentThread = (_thread)) + +extern __declspec(thread) struct PRThread *_pr_thread_last_run; +#define _MD_LAST_THREAD() _pr_thread_last_run +#define _MD_SET_LAST_THREAD(_thread) (_pr_thread_last_run = 0) + +extern __declspec(thread) struct _PRCPU *_pr_currentCPU; +#define _MD_CURRENT_CPU() _pr_currentCPU +#define _MD_SET_CURRENT_CPU(_cpu) (_pr_currentCPU = 0) +#else /* _PR_USE_STATIC_TLS */ +extern DWORD _pr_currentThreadIndex; +#define _MD_GET_ATTACHED_THREAD() ((PRThread *) TlsGetValue(_pr_currentThreadIndex)) +#define _MD_SET_CURRENT_THREAD(_thread) TlsSetValue(_pr_currentThreadIndex, (_thread)) + +extern DWORD _pr_lastThreadIndex; +#define _MD_LAST_THREAD() ((PRThread *) TlsGetValue(_pr_lastThreadIndex)) +#define _MD_SET_LAST_THREAD(_thread) TlsSetValue(_pr_lastThreadIndex, 0) + +extern DWORD _pr_currentCPUIndex; +#define _MD_CURRENT_CPU() ((struct _PRCPU *) TlsGetValue(_pr_currentCPUIndex)) +#define _MD_SET_CURRENT_CPU(_cpu) TlsSetValue(_pr_currentCPUIndex, 0) +#endif /* _PR_USE_STATIC_TLS */ + +/* --- Scheduler stuff --- */ +#define LOCK_SCHEDULER() 0 +#define UNLOCK_SCHEDULER() 0 +#define _PR_LockSched() 0 +#define _PR_UnlockSched() 0 + +/* --- Initialization stuff --- */ +#define _MD_INIT_LOCKS() + +/* --- Stack stuff --- */ +#define _MD_INIT_STACK(stack, redzone) +#define _MD_CLEAR_STACK(stack) + +/* --- Memory-mapped files stuff --- */ + +struct _MDFileMap { + HANDLE hFileMap; + DWORD dwAccess; +}; + +extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size); +#define _MD_CREATE_FILE_MAP _MD_CreateFileMap + +extern PRInt32 _MD_GetMemMapAlignment(void); +#define _MD_GET_MEM_MAP_ALIGNMENT _MD_GetMemMapAlignment + +extern void * _MD_MemMap(struct PRFileMap *fmap, PRInt64 offset, + PRUint32 len); +#define _MD_MEM_MAP _MD_MemMap + +extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size); +#define _MD_MEM_UNMAP _MD_MemUnmap + +extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap); +#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap + +/* --- Named semaphores stuff --- */ +#define _PR_HAVE_NAMED_SEMAPHORES +#define _MD_OPEN_SEMAPHORE _PR_MD_OPEN_SEMAPHORE +#define _MD_WAIT_SEMAPHORE _PR_MD_WAIT_SEMAPHORE +#define _MD_POST_SEMAPHORE _PR_MD_POST_SEMAPHORE +#define _MD_CLOSE_SEMAPHORE _PR_MD_CLOSE_SEMAPHORE +#define _MD_DELETE_SEMAPHORE(name) PR_SUCCESS /* no op */ + +#endif /* nspr_win32_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/_winnt.h b/Src/nprt_plugin/gecko/1.8/win/include/md/_winnt.h new file mode 100644 index 00000000..0e6ce819 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/_winnt.h @@ -0,0 +1,610 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_win32_defs_h___ +#define nspr_win32_defs_h___ + +/* Need to force service-pack 3 extensions to be defined by +** setting _WIN32_WINNT to NT 4.0 for winsock.h, winbase.h, winnt.h. +*/ +#ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 +#elif (_WIN32_WINNT < 0x0400) + #undef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 +#endif /* _WIN32_WINNT */ + +#include <windows.h> +#include <winsock.h> +#ifdef __MINGW32__ +#include <mswsock.h> +#endif +#include <errno.h> + +#include "prio.h" +#include "prclist.h" + +/* + * Internal configuration macros + */ + +#define PR_LINKER_ARCH "win32" +#define _PR_SI_SYSNAME "WINNT" +#define _PR_SI_ARCHITECTURE "x86" /* XXXMB hardcode for now */ + +#define HAVE_DLL +#define HAVE_CUSTOM_USER_THREADS +#define HAVE_THREAD_AFFINITY +#define _PR_HAVE_GETADDRINFO +#define _PR_INET6_PROBE +#ifndef _PR_INET6 +#define AF_INET6 23 +/* newer ws2tcpip.h provides these */ +#ifndef AI_CANONNAME +#define AI_CANONNAME 0x2 +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct addrinfo *ai_next; +}; +#endif +#define _PR_HAVE_MD_SOCKADDR_IN6 +/* isomorphic to struct in6_addr on Windows */ +struct _md_in6_addr { + union { + PRUint8 _S6_u8[16]; + PRUint16 _S6_u16[8]; + } _S6_un; +}; +/* isomorphic to struct sockaddr_in6 on Windows */ +struct _md_sockaddr_in6 { + PRInt16 sin6_family; + PRUint16 sin6_port; + PRUint32 sin6_flowinfo; + struct _md_in6_addr sin6_addr; + PRUint32 sin6_scope_id; +}; +#endif +#define _PR_HAVE_THREADSAFE_GETHOST +#define _PR_HAVE_ATOMIC_OPS +#define _PR_HAVE_ATOMIC_CAS +#define PR_HAVE_WIN32_NAMED_SHARED_MEMORY +#define _PR_HAVE_PEEK_BUFFER +#define _PR_PEEK_BUFFER_MAX (32 * 1024) +#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) \ + (!(fd)->secret->nonblocking && (fd)->secret->inheritable != _PR_TRI_TRUE) + +/* --- Common User-Thread/Native-Thread Definitions --------------------- */ + +/* --- Globals --- */ +extern struct PRLock *_pr_schedLock; + +/* --- Typedefs --- */ +typedef void (*FiberFunc)(void *); + +#define PR_NUM_GCREGS 8 +typedef PRInt32 PR_CONTEXT_TYPE[PR_NUM_GCREGS]; +#define GC_VMBASE 0x40000000 +#define GC_VMLIMIT 0x00FFFFFF + +#define _MD_MAGIC_THREAD 0x22222222 +#define _MD_MAGIC_THREADSTACK 0x33333333 +#define _MD_MAGIC_SEGMENT 0x44444444 +#define _MD_MAGIC_DIR 0x55555555 + +struct _MDCPU { + int unused; +}; + +enum _MDIOModel { + _MD_BlockingIO = 0x38, + _MD_MultiWaitIO = 0x49 +}; + +typedef struct _MDOverlapped { + OVERLAPPED overlapped; /* Used for async I/O */ + + enum _MDIOModel ioModel; /* The I/O model to implement + * using overlapped I/O. + */ + union { + struct _MDThread *mdThread; /* For blocking I/O, this structure + * is embedded in the _MDThread + * structure. + */ + struct { + PRCList links; /* for group->io_ready list */ + struct PRRecvWait *desc; /* For multiwait I/O, this structure + * is associated with a PRRecvWait + * structure. + */ + struct PRWaitGroup *group; + struct TimerEvent *timer; + DWORD error; + } mw; + } data; +} _MDOverlapped; + +struct _MDThread { + /* The overlapped structure must be first! */ + struct _MDOverlapped overlapped; /* Used for async IO for this thread */ + void *acceptex_buf; /* Used for AcceptEx() */ + TRANSMIT_FILE_BUFFERS *xmit_bufs; /* Used for TransmitFile() */ + HANDLE blocked_sema; /* Threads block on this when waiting + * for IO or CondVar. + */ + PRInt32 blocked_io_status; /* Status of the completed IO */ + PRInt32 blocked_io_bytes; /* Bytes transferred for completed IO */ + PRInt32 blocked_io_error; /* Save error if status is FALSE */ + HANDLE handle; + PRUint32 id; + void *sp; /* only valid when suspended */ + PRUint32 magic; /* for debugging */ + PR_CONTEXT_TYPE gcContext; /* Thread context for GC */ + struct _PRCPU *thr_bound_cpu; /* thread bound to cpu */ + PRBool interrupt_disabled;/* thread cannot be interrupted */ + HANDLE thr_event; /* For native-threads-only support, + thread blocks on this event */ + + /* The following are used only if this is a fiber */ + void *fiber_id; /* flag whether or not this is a fiber*/ + FiberFunc fiber_fn; /* main fiber routine */ + void *fiber_arg; /* arg to main fiber routine */ + PRUint32 fiber_stacksize; /* stacksize for fiber */ + PRInt32 fiber_last_error; /* last error for the fiber */ + void (*start)(void *); /* used by _PR_MD_CREATE_THREAD to + * pass its 'start' argument to + * pr_root. */ +}; + +struct _MDThreadStack { + PRUint32 magic; /* for debugging */ +}; + +struct _MDSegment { + PRUint32 magic; /* for debugging */ +}; + +#undef PROFILE_LOCKS + +struct _MDLock { + CRITICAL_SECTION mutex; /* this is recursive on NT */ +#ifdef PROFILE_LOCKS + PRInt32 hitcount; + PRInt32 misscount; +#endif +}; + +struct _MDDir { + HANDLE d_hdl; + WIN32_FIND_DATA d_entry; + PRBool firstEntry; /* Is this the entry returned + * by FindFirstFile()? */ + PRUint32 magic; /* for debugging */ +}; + +struct _MDCVar { + PRUint32 unused; +}; + +struct _MDSemaphore { + HANDLE sem; +}; + +struct _MDFileDesc { + PRInt32 osfd; /* The osfd can come from one of three spaces: + * - For stdin, stdout, and stderr, we are using + * the libc file handle (0, 1, 2), which is an int. + * - For files and pipes, we are using Win32 HANDLE, + * which is a void*. + * - For sockets, we are using Winsock SOCKET, which + * is a u_int. + */ + PRBool io_model_committed; /* The io model (blocking or nonblocking) + * for this osfd has been committed and + * cannot be changed. The osfd has been + * either associated with the io + * completion port or made nonblocking. */ + PRBool sync_file_io; /* Use synchronous file I/O on the osfd + * (a file handle) */ + PRBool accepted_socket; /* Is this an accepted socket (on the + * server side)? */ + PRNetAddr peer_addr; /* If this is an accepted socket, cache + * the peer's address returned by + * AcceptEx(). This is to work around + * the bug that getpeername() on an + * socket accepted by AcceptEx() returns + * an all-zero net address. */ +}; + +struct _MDProcess { + HANDLE handle; + DWORD id; +}; + + +/* --- Misc stuff --- */ +#define _MD_GET_SP(thread) (thread)->md.gcContext[6] + +/* --- NT security stuff --- */ + +extern void _PR_NT_InitSids(void); +extern void _PR_NT_FreeSids(void); +extern PRStatus _PR_NT_MakeSecurityDescriptorACL( + PRIntn mode, + DWORD accessTable[], + PSECURITY_DESCRIPTOR *resultSD, + PACL *resultACL +); +extern void _PR_NT_FreeSecurityDescriptorACL( + PSECURITY_DESCRIPTOR pSD, PACL pACL); + +/* --- IO stuff --- */ + +extern PRInt32 _md_Associate(HANDLE); +extern PRInt32 _PR_MD_CLOSE(PRInt32 osfd, PRBool socket); + +#define _MD_OPEN _PR_MD_OPEN +#define _MD_OPEN_FILE _PR_MD_OPEN_FILE +#define _MD_READ _PR_MD_READ +#define _MD_WRITE _PR_MD_WRITE +#define _MD_WRITEV _PR_MD_WRITEV +#define _MD_LSEEK _PR_MD_LSEEK +#define _MD_LSEEK64 _PR_MD_LSEEK64 +#define _MD_CLOSE_FILE(f) _PR_MD_CLOSE(f, PR_FALSE) +#define _MD_GETFILEINFO _PR_MD_GETFILEINFO +#define _MD_GETFILEINFO64 _PR_MD_GETFILEINFO64 +#define _MD_GETOPENFILEINFO _PR_MD_GETOPENFILEINFO +#define _MD_GETOPENFILEINFO64 _PR_MD_GETOPENFILEINFO64 +#define _MD_STAT _PR_MD_STAT +#define _MD_RENAME _PR_MD_RENAME +#define _MD_ACCESS _PR_MD_ACCESS +#define _MD_DELETE _PR_MD_DELETE +#define _MD_MKDIR _PR_MD_MKDIR +#define _MD_MAKE_DIR _PR_MD_MAKE_DIR +#define _MD_RMDIR _PR_MD_RMDIR +#define _MD_LOCKFILE _PR_MD_LOCKFILE +#define _MD_TLOCKFILE _PR_MD_TLOCKFILE +#define _MD_UNLOCKFILE _PR_MD_UNLOCKFILE + +/* --- Socket IO stuff --- */ +#define _MD_GET_SOCKET_ERROR() WSAGetLastError() +#define _MD_SET_SOCKET_ERROR(_err) WSASetLastError(_err) + +#define _MD_INIT_FILEDESC(fd) +#define _MD_MAKE_NONBLOCK _PR_MD_MAKE_NONBLOCK +#define _MD_INIT_FD_INHERITABLE _PR_MD_INIT_FD_INHERITABLE +#define _MD_QUERY_FD_INHERITABLE _PR_MD_QUERY_FD_INHERITABLE +#define _MD_SHUTDOWN _PR_MD_SHUTDOWN +#define _MD_LISTEN _PR_MD_LISTEN +#define _MD_CLOSE_SOCKET(s) _PR_MD_CLOSE(s, PR_TRUE) +#define _MD_SENDTO _PR_MD_SENDTO +#define _MD_RECVFROM _PR_MD_RECVFROM +#define _MD_SOCKETPAIR(s, type, proto, sv) -1 +#define _MD_GETSOCKNAME _PR_MD_GETSOCKNAME +#define _MD_GETPEERNAME _PR_MD_GETPEERNAME +#define _MD_GETSOCKOPT _PR_MD_GETSOCKOPT +#define _MD_SETSOCKOPT _PR_MD_SETSOCKOPT +#define _MD_SELECT select +extern int _PR_NTFiberSafeSelect(int, fd_set *, fd_set *, fd_set *, + const struct timeval *); +#define _MD_FSYNC _PR_MD_FSYNC +#define _MD_SOCKETAVAILABLE _PR_MD_SOCKETAVAILABLE +#define _MD_PIPEAVAILABLE _PR_MD_PIPEAVAILABLE +#define _MD_SET_FD_INHERITABLE _PR_MD_SET_FD_INHERITABLE + +#define _MD_INIT_ATOMIC() +#if defined(_M_IX86) || defined(_X86_) +#define _MD_ATOMIC_INCREMENT _PR_MD_ATOMIC_INCREMENT +#define _MD_ATOMIC_ADD _PR_MD_ATOMIC_ADD +#define _MD_ATOMIC_DECREMENT _PR_MD_ATOMIC_DECREMENT +#else /* non-x86 processors */ +#define _MD_ATOMIC_INCREMENT(x) InterlockedIncrement((PLONG)x) +#define _MD_ATOMIC_ADD(ptr,val) (InterlockedExchangeAdd((PLONG)ptr, (LONG)val) + val) +#define _MD_ATOMIC_DECREMENT(x) InterlockedDecrement((PLONG)x) +#endif /* x86 */ +#define _MD_ATOMIC_SET(x,y) InterlockedExchange((PLONG)x, (LONG)y) + +#define _MD_INIT_IO _PR_MD_INIT_IO +#define _MD_SOCKET _PR_MD_SOCKET +#define _MD_CONNECT _PR_MD_CONNECT + +#define _MD_ACCEPT(s, a, l, to) \ + _MD_FAST_ACCEPT(s, a, l, to, PR_FALSE, NULL, NULL) +#define _MD_FAST_ACCEPT(s, a, l, to, fast, cb, cba) \ + _PR_MD_FAST_ACCEPT(s, a, l, to, fast, cb, cba) +#define _MD_ACCEPT_READ(s, ns, ra, buf, l, t) \ + _MD_FAST_ACCEPT_READ(s, ns, ra, buf, l, t, PR_FALSE, NULL, NULL) +#define _MD_FAST_ACCEPT_READ(s, ns, ra, buf, l, t, fast, cb, cba) \ + _PR_MD_FAST_ACCEPT_READ(s, ns, ra, buf, l, t, fast, cb, cba) +#define _MD_UPDATE_ACCEPT_CONTEXT _PR_MD_UPDATE_ACCEPT_CONTEXT + +#define _MD_BIND _PR_MD_BIND +#define _MD_RECV _PR_MD_RECV +#define _MD_SEND _PR_MD_SEND +#define _MD_SENDFILE _PR_MD_SENDFILE +#define _MD_PR_POLL _PR_MD_PR_POLL + +/* --- Scheduler stuff --- */ +#define _MD_PAUSE_CPU _PR_MD_PAUSE_CPU + +/* --- DIR stuff --- */ +#define PR_DIRECTORY_SEPARATOR '\\' +#define PR_DIRECTORY_SEPARATOR_STR "\\" +#define PR_PATH_SEPARATOR ';' +#define PR_PATH_SEPARATOR_STR ";" +#define _MD_ERRNO() GetLastError() +#define _MD_OPEN_DIR _PR_MD_OPEN_DIR +#define _MD_CLOSE_DIR _PR_MD_CLOSE_DIR +#define _MD_READ_DIR _PR_MD_READ_DIR + +/* --- Segment stuff --- */ +#define _MD_INIT_SEGS() +#define _MD_ALLOC_SEGMENT(seg, size, vaddr) 0 +#define _MD_FREE_SEGMENT(seg) + +/* --- Environment Stuff --- */ +#define _MD_GET_ENV _PR_MD_GET_ENV +#define _MD_PUT_ENV _PR_MD_PUT_ENV + +/* --- Threading Stuff --- */ +#define _MD_DEFAULT_STACK_SIZE 0 +#define _MD_INIT_THREAD _PR_MD_INIT_THREAD +#define _MD_INIT_ATTACHED_THREAD _PR_MD_INIT_THREAD +#define _MD_CREATE_THREAD _PR_MD_CREATE_THREAD +#define _MD_JOIN_THREAD _PR_MD_JOIN_THREAD +#define _MD_END_THREAD _PR_MD_END_THREAD +#define _MD_YIELD _PR_MD_YIELD +#define _MD_SET_PRIORITY _PR_MD_SET_PRIORITY +#define _MD_CLEAN_THREAD _PR_MD_CLEAN_THREAD +#define _MD_SETTHREADAFFINITYMASK _PR_MD_SETTHREADAFFINITYMASK +#define _MD_GETTHREADAFFINITYMASK _PR_MD_GETTHREADAFFINITYMASK +#define _MD_EXIT_THREAD _PR_MD_EXIT_THREAD +#define _MD_SUSPEND_THREAD _PR_MD_SUSPEND_THREAD +#define _MD_RESUME_THREAD _PR_MD_RESUME_THREAD +#define _MD_SUSPEND_CPU _PR_MD_SUSPEND_CPU +#define _MD_RESUME_CPU _PR_MD_RESUME_CPU +#define _MD_BEGIN_SUSPEND_ALL() +#define _MD_BEGIN_RESUME_ALL() +#define _MD_END_SUSPEND_ALL() +#define _MD_END_RESUME_ALL() + +extern void _PR_Unblock_IO_Wait(PRThread *thr); + +/* --- Lock stuff --- */ +#define _MD_NEW_LOCK(lock) (InitializeCriticalSection(&((lock)->mutex)),PR_SUCCESS) +#define _MD_FREE_LOCK(lock) DeleteCriticalSection(&((lock)->mutex)) +#ifndef PROFILE_LOCKS +#define _MD_LOCK(lock) EnterCriticalSection(&((lock)->mutex)) +#define _MD_TEST_AND_LOCK(lock) (TryEnterCriticalSection(&((lock)->mutex))== FALSE) +#define _MD_UNLOCK(lock) LeaveCriticalSection(&((lock)->mutex)) +#else +#define _MD_LOCK(lock) \ + PR_BEGIN_MACRO \ + BOOL rv = TryEnterCriticalSection(&((lock)->mutex)); \ + if (rv == TRUE) { \ + InterlockedIncrement(&((lock)->hitcount)); \ + } else { \ + InterlockedIncrement(&((lock)->misscount)); \ + EnterCriticalSection(&((lock)->mutex)); \ + } \ + PR_END_MACRO +#define _MD_TEST_AND_LOCK(lock) 0 /* XXXMB */ +#define _MD_UNLOCK(lock) LeaveCriticalSection(&((lock)->mutex)) +#endif +#define _PR_LOCK _MD_LOCK +#define _PR_UNLOCK _MD_UNLOCK + +/* --- lock and cv waiting --- */ +#define _MD_WAIT _PR_MD_WAIT +#define _MD_WAKEUP_WAITER _PR_MD_WAKEUP_WAITER + + /* XXXMB- the IOQ stuff is certainly not working correctly yet. */ +extern struct _MDLock _pr_ioq_lock; +#define _MD_IOQ_LOCK() _MD_LOCK(&_pr_ioq_lock) +#define _MD_IOQ_UNLOCK() _MD_UNLOCK(&_pr_ioq_lock) + + +/* --- Initialization stuff --- */ +#define _MD_START_INTERRUPTS() +#define _MD_STOP_INTERRUPTS() +#define _MD_DISABLE_CLOCK_INTERRUPTS() +#define _MD_ENABLE_CLOCK_INTERRUPTS() +#define _MD_BLOCK_CLOCK_INTERRUPTS() +#define _MD_UNBLOCK_CLOCK_INTERRUPTS() +#define _MD_EARLY_INIT _PR_MD_EARLY_INIT +#define _MD_FINAL_INIT() +#define _MD_INIT_CPUS() +#define _MD_INIT_RUNNING_CPU(cpu) + +struct PRProcess; +struct PRProcessAttr; + +/* --- Create a new process --- */ +#define _MD_CREATE_PROCESS _PR_CreateWindowsProcess +extern struct PRProcess * _PR_CreateWindowsProcess( + const char *path, + char *const *argv, + char *const *envp, + const struct PRProcessAttr *attr +); + +#define _MD_DETACH_PROCESS _PR_DetachWindowsProcess +extern PRStatus _PR_DetachWindowsProcess(struct PRProcess *process); + +/* --- Wait for a child process to terminate --- */ +#define _MD_WAIT_PROCESS _PR_WaitWindowsProcess +extern PRStatus _PR_WaitWindowsProcess(struct PRProcess *process, + PRInt32 *exitCode); + +#define _MD_KILL_PROCESS _PR_KillWindowsProcess +extern PRStatus _PR_KillWindowsProcess(struct PRProcess *process); + +/* --- User Threading stuff --- */ +#define HAVE_FIBERS +#define _MD_CREATE_USER_THREAD _PR_MD_CREATE_USER_THREAD +#define _MD_CREATE_PRIMORDIAL_USER_THREAD _PR_MD_CREATE_PRIMORDIAL_USER_THREAD +#define _MD_CLEANUP_BEFORE_EXIT _PR_MD_CLEANUP_BEFORE_EXIT +#define _MD_EXIT _PR_MD_EXIT +#define _MD_INIT_CONTEXT _PR_MD_INIT_CONTEXT +#define _MD_SWITCH_CONTEXT _PR_MD_SWITCH_CONTEXT +#define _MD_RESTORE_CONTEXT _PR_MD_RESTORE_CONTEXT + +/* --- Intervals --- */ +#define _MD_INTERVAL_INIT _PR_MD_INTERVAL_INIT +#define _MD_GET_INTERVAL _PR_MD_GET_INTERVAL +#define _MD_INTERVAL_PER_SEC _PR_MD_INTERVAL_PER_SEC +#define _MD_INTERVAL_PER_MILLISEC() (_PR_MD_INTERVAL_PER_SEC() / 1000) +#define _MD_INTERVAL_PER_MICROSEC() (_PR_MD_INTERVAL_PER_SEC() / 1000000) + +/* --- Time --- */ +extern void _PR_FileTimeToPRTime(const FILETIME *filetime, PRTime *prtm); + +/* --- Native-Thread Specific Definitions ------------------------------- */ + +extern BOOL _pr_use_static_tls; + +extern __declspec(thread) struct PRThread *_pr_current_fiber; +extern DWORD _pr_currentFiberIndex; + +#define _MD_GET_ATTACHED_THREAD() \ + (_pr_use_static_tls ? _pr_current_fiber \ + : (PRThread *) TlsGetValue(_pr_currentFiberIndex)) + +extern struct PRThread * _MD_CURRENT_THREAD(void); + +#define _MD_SET_CURRENT_THREAD(_thread) \ + PR_BEGIN_MACRO \ + if (_pr_use_static_tls) { \ + _pr_current_fiber = (_thread); \ + } else { \ + TlsSetValue(_pr_currentFiberIndex, (_thread)); \ + } \ + PR_END_MACRO + +extern __declspec(thread) struct PRThread *_pr_fiber_last_run; +extern DWORD _pr_lastFiberIndex; + +#define _MD_LAST_THREAD() \ + (_pr_use_static_tls ? _pr_fiber_last_run \ + : (PRThread *) TlsGetValue(_pr_lastFiberIndex)) + +#define _MD_SET_LAST_THREAD(_thread) \ + PR_BEGIN_MACRO \ + if (_pr_use_static_tls) { \ + _pr_fiber_last_run = (_thread); \ + } else { \ + TlsSetValue(_pr_lastFiberIndex, (_thread)); \ + } \ + PR_END_MACRO + +extern __declspec(thread) struct _PRCPU *_pr_current_cpu; +extern DWORD _pr_currentCPUIndex; + +#define _MD_CURRENT_CPU() \ + (_pr_use_static_tls ? _pr_current_cpu \ + : (struct _PRCPU *) TlsGetValue(_pr_currentCPUIndex)) + +#define _MD_SET_CURRENT_CPU(_cpu) \ + PR_BEGIN_MACRO \ + if (_pr_use_static_tls) { \ + _pr_current_cpu = (_cpu); \ + } else { \ + TlsSetValue(_pr_currentCPUIndex, (_cpu)); \ + } \ + PR_END_MACRO + +extern __declspec(thread) PRUintn _pr_ints_off; +extern DWORD _pr_intsOffIndex; + +#define _MD_GET_INTSOFF() \ + (_pr_use_static_tls ? _pr_ints_off \ + : (PRUintn) TlsGetValue(_pr_intsOffIndex)) + +#define _MD_SET_INTSOFF(_val) \ + PR_BEGIN_MACRO \ + if (_pr_use_static_tls) { \ + _pr_ints_off = (_val); \ + } else { \ + TlsSetValue(_pr_intsOffIndex, (LPVOID) (_val)); \ + } \ + PR_END_MACRO + +/* --- Initialization stuff --- */ +#define _MD_INIT_LOCKS() + +/* --- Stack stuff --- */ +#define _MD_INIT_STACK(stack, redzone) +#define _MD_CLEAR_STACK(stack) + +/* --- Memory-mapped files stuff --- */ + +struct _MDFileMap { + HANDLE hFileMap; + DWORD dwAccess; +}; + +extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size); +#define _MD_CREATE_FILE_MAP _MD_CreateFileMap + +extern PRInt32 _MD_GetMemMapAlignment(void); +#define _MD_GET_MEM_MAP_ALIGNMENT _MD_GetMemMapAlignment + +extern void * _MD_MemMap(struct PRFileMap *fmap, PRInt64 offset, + PRUint32 len); +#define _MD_MEM_MAP _MD_MemMap + +extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size); +#define _MD_MEM_UNMAP _MD_MemUnmap + +extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap); +#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap + +/* --- Named semaphores stuff --- */ +#define _PR_HAVE_NAMED_SEMAPHORES +#define _MD_OPEN_SEMAPHORE _PR_MD_OPEN_SEMAPHORE +#define _MD_WAIT_SEMAPHORE _PR_MD_WAIT_SEMAPHORE +#define _MD_POST_SEMAPHORE _PR_MD_POST_SEMAPHORE +#define _MD_CLOSE_SEMAPHORE _PR_MD_CLOSE_SEMAPHORE +#define _MD_DELETE_SEMAPHORE(name) PR_SUCCESS /* no op */ + +#endif /* nspr_win32_defs_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/prosdep.h b/Src/nprt_plugin/gecko/1.8/win/include/md/prosdep.h new file mode 100644 index 00000000..3e141d02 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/prosdep.h @@ -0,0 +1,169 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prosdep_h___ +#define prosdep_h___ + +/* +** Get OS specific header information +*/ +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +#ifdef XP_PC + +#include "md/_pcos.h" +#ifdef WINNT +#include "md/_winnt.h" +#include "md/_win32_errors.h" +#elif defined(WIN95) +#include "md/_win95.h" +#include "md/_win32_errors.h" +#elif defined(WIN16) +#include "md/_win16.h" +#elif defined(OS2) +#include "md/_os2.h" +#include "md/_os2_errors.h" +#else +#error unknown Windows platform +#endif + +#elif defined XP_MAC + +#include "_macos.h" + +#elif defined(XP_UNIX) + +#if defined(AIX) +#include "md/_aix.h" + +#elif defined(FREEBSD) +#include "md/_freebsd.h" + +#elif defined(NETBSD) +#include "md/_netbsd.h" + +#elif defined(OPENBSD) +#include "md/_openbsd.h" + +#elif defined(BSDI) +#include "md/_bsdi.h" + +#elif defined(HPUX) +#include "md/_hpux.h" + +#elif defined(IRIX) +#include "md/_irix.h" + +#elif defined(LINUX) +#include "md/_linux.h" + +#elif defined(OSF1) +#include "md/_osf1.h" + +#elif defined(DARWIN) +#include "md/_darwin.h" + +#elif defined(NEXTSTEP) +#include "md/_nextstep.h" + +#elif defined(SOLARIS) +#include "md/_solaris.h" + +#elif defined(SUNOS4) +#include "md/_sunos4.h" + +#elif defined(SNI) +#include "md/_reliantunix.h" + +#elif defined(SONY) +#include "md/_sony.h" + +#elif defined(NEC) +#include "md/_nec.h" + +#elif defined(SCO) +#include "md/_scoos.h" + +#elif defined(UNIXWARE) +#include "md/_unixware.h" + +#elif defined(NCR) +#include "md/_ncr.h" + +#elif defined(DGUX) +#include "md/_dgux.h" + +#elif defined(QNX) +#include "md/_qnx.h" + +#elif defined(VMS) +#include "md/_openvms.h" + +#elif defined(NTO) +#include "md/_nto.h" + +#elif defined(RISCOS) +#include "md/_riscos.h" + +#else +#error unknown Unix flavor + +#endif + +#include "md/_unixos.h" +#include "md/_unix_errors.h" + +#elif defined(XP_BEOS) + +#include "md/_beos.h" +#include "md/_unix_errors.h" + +#else + +#error "The platform is not BeOS, Unix, Windows, or Mac" + +#endif + +#ifdef _PR_PTHREADS +#include "md/_pth.h" +#endif + +PR_END_EXTERN_C + +#endif /* prosdep_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/md/sunos4.h b/Src/nprt_plugin/gecko/1.8/win/include/md/sunos4.h new file mode 100644 index 00000000..0a8f36d4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/md/sunos4.h @@ -0,0 +1,164 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef pr_sunos4_h___ +#define pr_sunos4_h___ + +#ifndef SVR4 + +/* +** Hodge podge of random missing prototypes for the Sunos4 system +*/ +#include <stdio.h> +#include <stdarg.h> +#include <time.h> +#include <limits.h> +#include <sys/types.h> + +#define PATH_MAX _POSIX_PATH_MAX + +struct timeval; +struct timezone; +struct itimerval; +struct sockaddr; +struct stat; +struct tm; + +/* ctype.h */ +extern int tolower(int); +extern int toupper(int); + +/* errno.h */ +extern char *sys_errlist[]; +extern int sys_nerr; + +#define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0] + +extern void perror(const char *); + +/* getopt */ +extern char *optarg; +extern int optind; +extern int getopt(int argc, char **argv, char *spec); + +/* math.h */ +extern int srandom(long val); +extern long random(void); + +/* memory.h */ +#define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len) + +extern void bcopy(const char *, char *, int); + +/* signal.h */ +/* +** SunOS4 sigaction hides interrupts by default, so we can safely define +** SA_RESTART to 0. +*/ +#define SA_RESTART 0 + +/* stdio.h */ +extern int printf(const char *, ...); +extern int fprintf(FILE *, const char *, ...); +extern int vprintf(const char *, va_list); +extern int vfprintf(FILE *, const char *, va_list); +extern char *vsprintf(char *, const char *, va_list); +extern int scanf(const char *, ...); +extern int sscanf(const char *, const char *, ...); +extern int fscanf(FILE *, const char *, ...); +extern int fgetc(FILE *); +extern int fputc(int, FILE *); +extern int fputs(const char *, FILE *); +extern int puts(const char *); +extern int fread(void *, size_t, size_t, FILE *); +extern int fwrite(const char *, int, int, FILE *); +extern int fseek(FILE *, long, int); +extern long ftell(FILE *); +extern int rewind(FILE *); +extern int fflush(FILE *); +extern int _flsbuf(unsigned char, FILE *); +extern int fclose(FILE *); +extern int remove(const char *); +extern int setvbuf(FILE *, char *, int, size_t); +extern int system(const char *); +extern FILE *popen(const char *, const char *); +extern int pclose(FILE *); + +/* stdlib.h */ +#define strtoul strtol + +extern int isatty(int fildes); +extern long strtol(const char *, char **, int); +extern int putenv(const char *); +extern void srand48(long); +extern long lrand48(void); +extern double drand48(void); + +/* string.h */ +extern int strcasecmp(const char *, const char *); +extern int strncasecmp(const char *, const char *, size_t); +extern int strcoll(const char *, const char *); + +/* time.h */ +extern time_t mktime(struct tm *); +extern size_t strftime(char *, size_t, const char *, const struct tm *); +extern int gettimeofday(struct timeval *, struct timezone *); +extern int setitimer(int, struct itimerval *, struct itimerval *); +extern time_t time(time_t *); +extern time_t timegm(struct tm *); +extern struct tm *localtime(const time_t *); +extern struct tm *gmtime(const time_t *); + +/* unistd.h */ +extern int rename(const char *, const char *); +extern int ioctl(int, int, int *arg); +extern int connect(int, struct sockaddr *, int); +extern int readlink(const char *, char *, int); +extern int symlink(const char *, const char *); +extern int ftruncate(int, off_t); +extern int fchmod(int, mode_t); +extern int fchown(int, uid_t, gid_t); +extern int lstat(const char *, struct stat *); +extern int fstat(int, struct stat *); +extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +extern int gethostname(char *, int); +extern char *getwd(char *); +extern int getpagesize(void); + +#endif /* SVR4 */ + +#endif /* pr_sunos4_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/mozIJSSubScriptLoader.h b/Src/nprt_plugin/gecko/1.8/win/include/mozIJSSubScriptLoader.h new file mode 100644 index 00000000..b9d588c5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/mozIJSSubScriptLoader.h @@ -0,0 +1,99 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/js/src/xpconnect/idl/mozIJSSubScriptLoader.idl + */ + +#ifndef __gen_mozIJSSubScriptLoader_h__ +#define __gen_mozIJSSubScriptLoader_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: mozIJSSubScriptLoader */ +#define MOZIJSSUBSCRIPTLOADER_IID_STR "8792d77e-1dd2-11b2-ac7f-9bc9be4f2916" + +#define MOZIJSSUBSCRIPTLOADER_IID \ + {0x8792d77e, 0x1dd2, 0x11b2, \ + { 0xac, 0x7f, 0x9b, 0xc9, 0xbe, 0x4f, 0x29, 0x16 }} + +class NS_NO_VTABLE mozIJSSubScriptLoader : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(MOZIJSSUBSCRIPTLOADER_IID) + + /** + * This method should only be called from JS! + * In JS, the signature looks like: + * rv loadSubScript (url [, obj]); + * @param url the url if the sub-script, it MUST be either a file:, + * resource:, or chrome: url, and MUST be local. + * @param obj an optional object to evaluate the script onto, it + * defaults to the global object of the caller. + * @retval rv the value returned by the sub-script + */ + /* void loadSubScript (in wstring url); */ + NS_IMETHOD LoadSubScript(const PRUnichar *url) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_MOZIJSSUBSCRIPTLOADER \ + NS_IMETHOD LoadSubScript(const PRUnichar *url); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_MOZIJSSUBSCRIPTLOADER(_to) \ + NS_IMETHOD LoadSubScript(const PRUnichar *url) { return _to LoadSubScript(url); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_MOZIJSSUBSCRIPTLOADER(_to) \ + NS_IMETHOD LoadSubScript(const PRUnichar *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadSubScript(url); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class _MYCLASS_ : public mozIJSSubScriptLoader +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_MOZIJSSUBSCRIPTLOADER + + _MYCLASS_(); + +private: + ~_MYCLASS_(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(_MYCLASS_, mozIJSSubScriptLoader) + +_MYCLASS_::_MYCLASS_() +{ + /* member initializers and constructor code */ +} + +_MYCLASS_::~_MYCLASS_() +{ + /* destructor code */ +} + +/* void loadSubScript (in wstring url); */ +NS_IMETHODIMP _MYCLASS_::LoadSubScript(const PRUnichar *url) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_mozIJSSubScriptLoader_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/mozilla-config.h b/Src/nprt_plugin/gecko/1.8/win/include/mozilla-config.h new file mode 100644 index 00000000..f0b67a5e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/mozilla-config.h @@ -0,0 +1,52 @@ +/* List of defines generated by configure. Included with preprocessor flag, + * -include, to avoid long list of -D defines on the compile command-line. + * Do not edit. + */ + +#ifndef _MOZILLA_CONFIG_H_ +#define _MOZILLA_CONFIG_H_ + +#define ACCESSIBILITY 1 +#define D_INO d_ino +#define HAVE_SNPRINTF 1 +#define HW_THREADS 1 +#define IBMBIDI 1 +#define JS_THREADSAFE 1 +#define MOZILLA_LOCALE_VERSION "1.8b5" +#define MOZILLA_REGION_VERSION "1.8b5" +#define MOZILLA_SKIN_VERSION "1.8" +#define MOZILLA_VERSION "1.8" +#define MOZILLA_VERSION_U 1.8 +#define MOZ_BUILD_APP browser +#define MOZ_DEFAULT_TOOLKIT "windows" +#define MOZ_DISTRIBUTION_ID "org.mozilla" +#define MOZ_DLL_SUFFIX ".dll" +#define MOZ_JSLOADER 1 +#define MOZ_LOGGING 1 +#define MOZ_MATHML 1 +#define MOZ_PHOENIX 1 +#define MOZ_PROFILELOCKING 1 +#define MOZ_UPDATE_CHANNEL default +#define MOZ_USER_DIR "Mozilla" +#define MOZ_VIEW_SOURCE 1 +#define MOZ_XPINSTALL 1 +#define MOZ_XTF 1 +#define MOZ_XUL 1 +#define MOZ_XUL_APP 1 +#define NO_X11 1 +#define NS_PRINTING 1 +#define NS_PRINT_PREVIEW 1 +#define OJI 1 +#define STDC_HEADERS 1 +#define WIN32 1 +#define WIN32_LEAN_AND_MEAN 1 +#define WINVER 0x400 +#define XP_WIN 1 +#define XP_WIN32 1 +#define _WIN32 1 +#define _WIN32_WINNT 0x400 +#define _WINDOWS 1 +#define _X86_ 1 + +#endif /* _MOZILLA_CONFIG_H_ */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/npapi.h b/Src/nprt_plugin/gecko/1.8/win/include/npapi.h new file mode 100644 index 00000000..f4e934c0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/npapi.h @@ -0,0 +1,726 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + + +/* + * npapi.h $Revision: 1.1 $ + * Netscape client plug-in API spec + */ + +#ifndef _NPAPI_H_ +#define _NPAPI_H_ + +#ifdef __OS2__ +#pragma pack(1) +#endif + +#include "prtypes.h" +/* Copied from xp_core.h */ +/* removed #ifdef for hpux defined in /usr/include/model.h */ +#ifndef XP_MAC +#ifndef _INT16 +#define _INT16 +#endif +#ifndef _INT32 +#define _INT32 +#endif +#ifndef _UINT16 +#define _UINT16 +#endif +#ifndef _UINT32 +#define _UINT32 +#endif +#endif + +/* + * NO_NSPR_10_SUPPORT disables the inclusion + * of obsolete/protypes.h, whose int16, uint16, + * int32, and uint32 typedefs conflict with those + * in this file. + */ +#ifndef NO_NSPR_10_SUPPORT +#define NO_NSPR_10_SUPPORT +#endif +#ifdef OJI +#include "jri.h" /* Java Runtime Interface */ +#endif + +#if defined (__OS2__ ) || defined (OS2) +# ifndef XP_OS2 +# define XP_OS2 1 +# endif /* XP_OS2 */ +#endif /* __OS2__ */ + +#ifdef _WINDOWS +# include <windef.h> +# ifndef XP_WIN +# define XP_WIN 1 +# endif /* XP_WIN */ +#endif /* _WINDOWS */ + +#ifdef __MWERKS__ +# define _declspec __declspec +# ifdef macintosh +# ifndef XP_MAC +# define XP_MAC 1 +# endif /* XP_MAC */ +# endif /* macintosh */ +# ifdef __INTEL__ +# undef NULL +# ifndef XP_WIN +# define XP_WIN 1 +# endif /* XP_WIN */ +# endif /* __INTEL__ */ +#endif /* __MWERKS__ */ + +#if defined(XP_MAC) || defined(XP_MACOSX) + #include <Quickdraw.h> + #include <Events.h> +#endif + +#if defined(XP_UNIX) +# include <stdio.h> +# if defined(MOZ_X11) +# include <X11/Xlib.h> +# include <X11/Xutil.h> +# endif +#endif + +/*----------------------------------------------------------------------*/ +/* Plugin Version Constants */ +/*----------------------------------------------------------------------*/ + +#define NP_VERSION_MAJOR 0 +#define NP_VERSION_MINOR 16 + + +/* The OS/2 version of Netscape uses RC_DATA to define the + mime types, file extensions, etc that are required. + Use a vertical bar to separate types, end types with \0. + FileVersion and ProductVersion are 32bit ints, all other + entries are strings the MUST be terminated wwith a \0. + +AN EXAMPLE: + +RCDATA NP_INFO_ProductVersion { 1,0,0,1,} + +RCDATA NP_INFO_MIMEType { "video/x-video|", + "video/x-flick\0" } +RCDATA NP_INFO_FileExtents { "avi|", + "flc\0" } +RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", + "MMOS2 Flc/Fli player(*.flc)\0" } + +RCDATA NP_INFO_FileVersion { 1,0,0,1 } +RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } +RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" +RCDATA NP_INFO_InternalName { "NPAVI32\0" ) +RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" +RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } +RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } + +*/ + + +/* RC_DATA types for version info - required */ +#define NP_INFO_ProductVersion 1 +#define NP_INFO_MIMEType 2 +#define NP_INFO_FileOpenName 3 +#define NP_INFO_FileExtents 4 + +/* RC_DATA types for version info - used if found */ +#define NP_INFO_FileDescription 5 +#define NP_INFO_ProductName 6 + +/* RC_DATA types for version info - optional */ +#define NP_INFO_CompanyName 7 +#define NP_INFO_FileVersion 8 +#define NP_INFO_InternalName 9 +#define NP_INFO_LegalCopyright 10 +#define NP_INFO_OriginalFilename 11 + +#ifndef RC_INVOKED + + + +/*----------------------------------------------------------------------*/ +/* Definition of Basic Types */ +/*----------------------------------------------------------------------*/ + +#ifndef _UINT16 +typedef unsigned short uint16; +#endif + +#ifndef _UINT32 +# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__) +typedef unsigned int uint32; +# else /* __alpha */ +typedef unsigned long uint32; +# endif /* __alpha */ +#endif + +/* + * AIX defines these in sys/inttypes.h included from sys/types.h + */ +#ifndef AIX +#ifndef _INT16 +typedef short int16; +#endif + +#ifndef _INT32 +# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__) +typedef int int32; +# else /* __alpha */ +typedef long int32; +# endif /* __alpha */ +#endif +#endif + +#ifndef FALSE +#define FALSE (0) +#endif +#ifndef TRUE +#define TRUE (1) +#endif +#ifndef NULL +#define NULL (0L) +#endif + +typedef unsigned char NPBool; +typedef int16 NPError; +typedef int16 NPReason; +typedef char* NPMIMEType; + + + +/*----------------------------------------------------------------------*/ +/* Structures and definitions */ +/*----------------------------------------------------------------------*/ + +#ifdef XP_MAC +#pragma options align=mac68k +#endif + +/* + * NPP is a plug-in's opaque instance handle + */ +typedef struct _NPP +{ + void* pdata; /* plug-in private data */ + void* ndata; /* netscape private data */ +} NPP_t; + +typedef NPP_t* NPP; + + +typedef struct _NPStream +{ + void* pdata; /* plug-in private data */ + void* ndata; /* netscape private data */ + const char* url; + uint32 end; + uint32 lastmodified; + void* notifyData; +} NPStream; + + +typedef struct _NPByteRange +{ + int32 offset; /* negative offset means from the end */ + uint32 length; + struct _NPByteRange* next; +} NPByteRange; + + +typedef struct _NPSavedData +{ + int32 len; + void* buf; +} NPSavedData; + + +typedef struct _NPRect +{ + uint16 top; + uint16 left; + uint16 bottom; + uint16 right; +} NPRect; + +typedef struct _NPSize +{ + int32 width; + int32 height; +} NPSize; + +#ifdef XP_UNIX +/* + * Unix specific structures and definitions + */ + +/* + * Callback Structures. + * + * These are used to pass additional platform specific information. + */ +enum { + NP_SETWINDOW = 1, + NP_PRINT +}; + +typedef struct +{ + int32 type; +} NPAnyCallbackStruct; + +typedef struct +{ + int32 type; +#ifdef MOZ_X11 + Display* display; + Visual* visual; + Colormap colormap; + unsigned int depth; +#endif +} NPSetWindowCallbackStruct; + +typedef struct +{ + int32 type; + FILE* fp; +} NPPrintCallbackStruct; + +#endif /* XP_UNIX */ + + +/* + * The following masks are applied on certain platforms to NPNV and + * NPPV selectors that pass around pointers to COM interfaces. Newer + * compilers on some platforms may generate vtables that are not + * compatible with older compilers. To prevent older plugins from + * not understanding a new browser's ABI, these masks change the + * values of those selectors on those platforms. To remain backwards + * compatible with differenet versions of the browser, plugins can + * use these masks to dynamically determine and use the correct C++ + * ABI that the browser is expecting. This does not apply to Windows + * as Microsoft's COM ABI will likely not change. + */ + +#define NP_ABI_GCC3_MASK 0x10000000 +/* + * gcc 3.x generated vtables on UNIX and OSX are incompatible with + * previous compilers. + */ +#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) +#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK +#else +#define _NP_ABI_MIXIN_FOR_GCC3 0 +#endif + + +#define NP_ABI_MACHO_MASK 0x01000000 +/* + * On OSX, the Mach-O executable format is significantly + * different than CFM. In addition to having a different + * C++ ABI, it also has has different C calling convention. + * You must use glue code when calling between CFM and + * Mach-O C functions. + */ +#if (defined(TARGET_RT_MAC_MACHO)) +#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK +#else +#define _NP_ABI_MIXIN_FOR_MACHO 0 +#endif + + +#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) + +/* + * List of variable names for which NPP_GetValue shall be implemented + */ +typedef enum { + NPPVpluginNameString = 1, + NPPVpluginDescriptionString, + NPPVpluginWindowBool, + NPPVpluginTransparentBool, + NPPVjavaClass, /* Not implemented in Mozilla 1.0 */ + NPPVpluginWindowSize, + NPPVpluginTimerInterval, + + NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), + NPPVpluginScriptableIID = 11, + + /* Introduced in Mozilla 0.9.9 */ + NPPVjavascriptPushCallerBool = 12, + + /* Introduced in Mozilla 1.0 */ + NPPVpluginKeepLibraryInMemory = 13, + NPPVpluginNeedsXEmbed = 14, + + /* Get the NPObject for scripting the plugin. Introduced in Firefox + * 1.0 (NPAPI minor version 14). + */ + NPPVpluginScriptableNPObject = 15, + + /* Get the plugin value (as \0-terminated UTF-8 string data) for + * form submission if the plugin is part of a form. Use + * NPN_MemAlloc() to allocate memory for the string data. Introduced + * in Mozilla 1.8b2 (NPAPI minor version 15). + */ + NPPVformValue = 16 +} NPPVariable; + +/* + * List of variable names for which NPN_GetValue is implemented by Mozilla + */ +typedef enum { + NPNVxDisplay = 1, + NPNVxtAppContext, + NPNVnetscapeWindow, + NPNVjavascriptEnabledBool, + NPNVasdEnabledBool, + NPNVisOfflineBool, + + /* 10 and over are available on Mozilla builds starting with 0.9.4 */ + NPNVserviceManager = (10 | NP_ABI_MASK), + NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */ + NPNVDOMWindow = (12 | NP_ABI_MASK), + NPNVToolkit = (13 | NP_ABI_MASK), + NPNVSupportsXEmbedBool = 14, + + /* Get the NPObject wrapper for the browser window. */ + NPNVWindowNPObject = 15, + + /* Get the NPObject wrapper for the plugins DOM element. */ + NPNVPluginElementNPObject = 16 +} NPNVariable; + +/* + * The type of Tookkit the widgets use + */ +typedef enum { + NPNVGtk12 = 1, + NPNVGtk2 +} NPNToolkitType; + +/* + * The type of a NPWindow - it specifies the type of the data structure + * returned in the window field. + */ +typedef enum { + NPWindowTypeWindow = 1, + NPWindowTypeDrawable +} NPWindowType; + +typedef struct _NPWindow +{ + void* window; /* Platform specific window handle */ + /* OS/2: x - Position of bottom left corner */ + /* OS/2: y - relative to visible netscape window */ + int32 x; /* Position of top left corner relative */ + int32 y; /* to a netscape page. */ + uint32 width; /* Maximum window size */ + uint32 height; + NPRect clipRect; /* Clipping rectangle in port coordinates */ + /* Used by MAC only. */ +#if defined(XP_UNIX) && !defined(XP_MACOSX) + void * ws_info; /* Platform-dependent additonal data */ +#endif /* XP_UNIX */ + NPWindowType type; /* Is this a window or a drawable? */ +} NPWindow; + + +typedef struct _NPFullPrint +{ + NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ + NPBool printOne; /* TRUE if plugin should print one copy to default printer */ + void* platformPrint; /* Platform-specific printing info */ +} NPFullPrint; + +typedef struct _NPEmbedPrint +{ + NPWindow window; + void* platformPrint; /* Platform-specific printing info */ +} NPEmbedPrint; + +typedef struct _NPPrint +{ + uint16 mode; /* NP_FULL or NP_EMBED */ + union + { + NPFullPrint fullPrint; /* if mode is NP_FULL */ + NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ + } print; +} NPPrint; + +#if defined(XP_MAC) || defined(XP_MACOSX) +typedef EventRecord NPEvent; +#elif defined(XP_WIN) +typedef struct _NPEvent +{ + uint16 event; + uint32 wParam; + uint32 lParam; +} NPEvent; +#elif defined(XP_OS2) +typedef struct _NPEvent +{ + uint32 event; + uint32 wParam; + uint32 lParam; +} NPEvent; +#elif defined (XP_UNIX) && defined(MOZ_X11) +typedef XEvent NPEvent; +#else +typedef void* NPEvent; +#endif /* XP_MAC */ + +#if defined(XP_MAC) || defined(XP_MACOSX) +typedef RgnHandle NPRegion; +#elif defined(XP_WIN) +typedef HRGN NPRegion; +#elif defined(XP_UNIX) && defined(MOZ_X11) +typedef Region NPRegion; +#else +typedef void *NPRegion; +#endif /* XP_MAC */ + +#if defined(XP_MAC) || defined(XP_MACOSX) +/* + * Mac-specific structures and definitions. + */ + +typedef struct NP_Port +{ + CGrafPtr port; /* Grafport */ + int32 portx; /* position inside the topmost window */ + int32 porty; +} NP_Port; + +/* + * Non-standard event types that can be passed to HandleEvent + */ + +enum NPEventType { + NPEventType_GetFocusEvent = (osEvt + 16), + NPEventType_LoseFocusEvent, + NPEventType_AdjustCursorEvent, + NPEventType_MenuCommandEvent, + NPEventType_ClippingChangedEvent, + NPEventType_ScrollingBeginsEvent = 1000, + NPEventType_ScrollingEndsEvent +}; + +#ifdef OBSOLETE +#define getFocusEvent (osEvt + 16) +#define loseFocusEvent (osEvt + 17) +#define adjustCursorEvent (osEvt + 18) +#endif +#endif /* XP_MAC */ + +/* + * Values for mode passed to NPP_New: + */ +#define NP_EMBED 1 +#define NP_FULL 2 + +/* + * Values for stream type passed to NPP_NewStream: + */ +#define NP_NORMAL 1 +#define NP_SEEK 2 +#define NP_ASFILE 3 +#define NP_ASFILEONLY 4 + +#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) + +#ifdef XP_MAC +#pragma options align=reset +#endif + + +/*----------------------------------------------------------------------*/ +/* Error and Reason Code definitions */ +/*----------------------------------------------------------------------*/ + +/* + * Values of type NPError: + */ +#define NPERR_BASE 0 +#define NPERR_NO_ERROR (NPERR_BASE + 0) +#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) +#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) +#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) +#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) +#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) +#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) +#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) +#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) +#define NPERR_INVALID_PARAM (NPERR_BASE + 9) +#define NPERR_INVALID_URL (NPERR_BASE + 10) +#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) +#define NPERR_NO_DATA (NPERR_BASE + 12) +#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) + +/* + * Values of type NPReason: + */ +#define NPRES_BASE 0 +#define NPRES_DONE (NPRES_BASE + 0) +#define NPRES_NETWORK_ERR (NPRES_BASE + 1) +#define NPRES_USER_BREAK (NPRES_BASE + 2) + +/* + * Don't use these obsolete error codes any more. + */ +#define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR +#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR +#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK + +/* + * Version feature information + */ +#define NPVERS_HAS_STREAMOUTPUT 8 +#define NPVERS_HAS_NOTIFICATION 9 +#define NPVERS_HAS_LIVECONNECT 9 +#define NPVERS_WIN16_HAS_LIVECONNECT 9 +#define NPVERS_68K_HAS_LIVECONNECT 11 +#define NPVERS_HAS_WINDOWLESS 11 +#define NPVERS_HAS_XPCONNECT_SCRIPTING 13 + +/*----------------------------------------------------------------------*/ +/* Function Prototypes */ +/*----------------------------------------------------------------------*/ + +#if defined(_WINDOWS) && !defined(WIN32) +#define NP_LOADDS _loadds +#else +#if defined(__OS2__) +#define NP_LOADDS _System +#else +#define NP_LOADDS +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * NPP_* functions are provided by the plugin and called by the navigator. + */ + +#ifdef XP_UNIX +char* NPP_GetMIMEDescription(void); +#endif /* XP_UNIX */ + +NPError NP_LOADDS NPP_Initialize(void); +void NP_LOADDS NPP_Shutdown(void); +NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, + uint16 mode, int16 argc, char* argn[], + char* argv[], NPSavedData* saved); +NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); +NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); +NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, + NPStream* stream, NPBool seekable, + uint16* stype); +NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, + NPReason reason); +int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); +int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, + int32 len, void* buffer); +void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, + const char* fname); +void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); +int16 NP_LOADDS NPP_HandleEvent(NPP instance, void* event); +void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, + NPReason reason, void* notifyData); +#ifdef OJI +jref NP_LOADDS NPP_GetJavaClass(void); +#endif +NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); +NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); + +/* + * NPN_* functions are provided by the navigator and called by the plugin. + */ +void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, + int* netscape_major, int* netscape_minor); +NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, + const char* target, void* notifyData); +NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, + const char* target); +NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, + const char* target, uint32 len, + const char* buf, NPBool file, + void* notifyData); +NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, + const char* target, uint32 len, + const char* buf, NPBool file); +NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); +NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, + const char* target, NPStream** stream); +int32 NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); +NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); +void NP_LOADDS NPN_Status(NPP instance, const char* message); +const char* NP_LOADDS NPN_UserAgent(NPP instance); +void* NP_LOADDS NPN_MemAlloc(uint32 size); +void NP_LOADDS NPN_MemFree(void* ptr); +uint32 NP_LOADDS NPN_MemFlush(uint32 size); +void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); +#ifdef OJI +JRIEnv* NP_LOADDS NPN_GetJavaEnv(void); +jref NP_LOADDS NPN_GetJavaPeer(NPP instance); +#endif +NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value); +NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value); +void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); +void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); +void NP_LOADDS NPN_ForceRedraw(NPP instance); +void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled); +void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance); + +#ifdef __cplusplus +} /* end extern "C" */ +#endif + +#endif /* RC_INVOKED */ +#ifdef __OS2__ +#pragma pack() +#endif + +#endif /* _NPAPI_H_ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/npruntime.h b/Src/nprt_plugin/gecko/1.8/win/include/npruntime.h new file mode 100644 index 00000000..2d1dc025 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/npruntime.h @@ -0,0 +1,397 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Copyright © 2004, Apple Computer, Inc. and The Mozilla Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla + * Foundation ("Mozilla") nor the names of their contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR + * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Revision 1 (March 4, 2004): + * Initial proposal. + * + * Revision 2 (March 10, 2004): + * All calls into script were made asynchronous. Results are + * provided via the NPScriptResultFunctionPtr callback. + * + * Revision 3 (March 10, 2004): + * Corrected comments to not refer to class retain/release FunctionPtrs. + * + * Revision 4 (March 11, 2004): + * Added additional convenience NPN_SetExceptionWithUTF8(). + * Changed NPHasPropertyFunctionPtr and NPHasMethodFunctionPtr to take NPClass + * pointers instead of NPObject pointers. + * Added NPIsValidIdentifier(). + * + * Revision 5 (March 17, 2004): + * Added context parameter to result callbacks from ScriptObject functions. + * + * Revision 6 (March 29, 2004): + * Renamed functions implemented by user agent to NPN_*. Removed _ from + * type names. + * Renamed "JavaScript" types to "Script". + * + * Revision 7 (April 21, 2004): + * NPIdentifier becomes a void*, was int32_t + * Remove NP_IsValidIdentifier, renamed NP_IdentifierFromUTF8 to NP_GetIdentifier + * Added NPVariant and modified functions to use this new type. + * + * Revision 8 (July 9, 2004): + * Updated to joint Apple-Mozilla license. + * + */ +#ifndef _NP_RUNTIME_H_ +#define _NP_RUNTIME_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "nptypes.h" + +/* + This API is used to facilitate binding code written in C to script + objects. The API in this header does not assume the presence of a + user agent. That is, it can be used to bind C code to scripting + environments outside of the context of a user agent. + + However, the normal use of the this API is in the context of a + scripting environment running in a browser or other user agent. + In particular it is used to support the extended Netscape + script-ability API for plugins (NP-SAP). NP-SAP is an extension + of the Netscape plugin API. As such we have adopted the use of + the "NP" prefix for this API. + + The following NP{N|P}Variables were added to the Netscape plugin + API (in npapi.h): + + NPNVWindowNPObject + NPNVPluginElementNPObject + NPPVpluginScriptableNPObject + + These variables are exposed through NPN_GetValue() and + NPP_GetValue() (respectively) and are used to establish the + initial binding between the user agent and native code. The DOM + objects in the user agent can be examined and manipulated using + the NPN_ functions that operate on NPObjects described in this + header. + + To the extent possible the assumptions about the scripting + language used by the scripting environment have been minimized. +*/ + +#define NP_BEGIN_MACRO do { +#define NP_END_MACRO } while (0) + +/* + Objects (non-primitive data) passed between 'C' and script is + always wrapped in an NPObject. The 'interface' of an NPObject is + described by an NPClass. +*/ +typedef struct NPObject NPObject; +typedef struct NPClass NPClass; + +typedef char NPUTF8; +typedef struct _NPString { + const NPUTF8 *utf8characters; + uint32_t utf8length; +} NPString; + +typedef enum { + NPVariantType_Void, + NPVariantType_Null, + NPVariantType_Bool, + NPVariantType_Int32, + NPVariantType_Double, + NPVariantType_String, + NPVariantType_Object +} NPVariantType; + +typedef struct _NPVariant { + NPVariantType type; + union { + bool boolValue; + uint32_t intValue; + double doubleValue; + NPString stringValue; + NPObject *objectValue; + } value; +} NPVariant; + +/* + NPN_ReleaseVariantValue is called on all 'out' parameters + references. Specifically it is to be called on variants that own + their value, as is the case with all non-const NPVariant* + arguments after a successful call to any methods (except this one) + in this API. + + After calling NPN_ReleaseVariantValue, the type of the variant + will be NPVariantType_Void. +*/ +void NPN_ReleaseVariantValue(NPVariant *variant); + +#define NPVARIANT_IS_VOID(_v) ((_v).type == NPVariantType_Void) +#define NPVARIANT_IS_NULL(_v) ((_v).type == NPVariantType_Null) +#define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool) +#define NPVARIANT_IS_INT32(_v) ((_v).type == NPVariantType_Int32) +#define NPVARIANT_IS_DOUBLE(_v) ((_v).type == NPVariantType_Double) +#define NPVARIANT_IS_STRING(_v) ((_v).type == NPVariantType_String) +#define NPVARIANT_IS_OBJECT(_v) ((_v).type == NPVariantType_Object) + +#define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue) +#define NPVARIANT_TO_INT32(_v) ((_v).value.intValue) +#define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue) +#define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue) +#define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue) + +#define VOID_TO_NPVARIANT(_v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Void; \ + (_v).value.objectValue = NULL; \ +NP_END_MACRO + +#define NULL_TO_NPVARIANT(_v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Null; \ + (_v).value.objectValue = NULL; \ +NP_END_MACRO + +#define BOOLEAN_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Bool; \ + (_v).value.boolValue = !!(_val); \ +NP_END_MACRO + +#define INT32_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Int32; \ + (_v).value.intValue = _val; \ +NP_END_MACRO + +#define DOUBLE_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Double; \ + (_v).value.doubleValue = _val; \ +NP_END_MACRO + +#define STRINGZ_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_String; \ + NPString str = { _val, strlen(_val) }; \ + (_v).value.stringValue = str; \ +NP_END_MACRO + +#define STRINGN_TO_NPVARIANT(_val, _len, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_String; \ + NPString str = { _val, _len }; \ + (_v).value.stringValue = str; \ +NP_END_MACRO + +#define OBJECT_TO_NPVARIANT(_val, _v) \ +NP_BEGIN_MACRO \ + (_v).type = NPVariantType_Object; \ + (_v).value.objectValue = _val; \ +NP_END_MACRO + + +/* + Type mappings (JavaScript types have been used for illustration + purposes): + + JavaScript to C (NPVariant with type:) + undefined NPVariantType_Void + null NPVariantType_Null + Boolean NPVariantType_Bool + Number NPVariantType_Double or NPVariantType_Int32 + String NPVariantType_String + Object NPVariantType_Object + + C (NPVariant with type:) to JavaScript + NPVariantType_Void undefined + NPVariantType_Null null + NPVariantType_Bool Boolean + NPVariantType_Int32 Number + NPVariantType_Double Number + NPVariantType_String String + NPVariantType_Object Object +*/ + +typedef void *NPIdentifier; + +/* + NPObjects have methods and properties. Methods and properties are + identified with NPIdentifiers. These identifiers may be reflected + in script. NPIdentifiers can be either strings or integers, IOW, + methods and properties can be identified by either strings or + integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be + compared using ==. In case of any errors, the requested + NPIdentifier(s) will be NULL. +*/ +NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); +void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, + NPIdentifier *identifiers); +NPIdentifier NPN_GetIntIdentifier(int32_t intid); +bool NPN_IdentifierIsString(NPIdentifier identifier); + +/* + The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed. +*/ +NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier); + +/* + Get the integer represented by identifier. If identifier is not an + integer identifier, the behaviour is undefined. +*/ +int32_t NPN_IntFromIdentifier(NPIdentifier identifier); + +/* + NPObject behavior is implemented using the following set of + callback functions. + + The NPVariant *result argument of these functions (where + applicable) should be released using NPN_ReleaseVariantValue(). +*/ +typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass); +typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj); +typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj); +typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name); +typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name, + const NPVariant *args, uint32_t argCount, + NPVariant *result); +typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj, + const NPVariant *args, + uint32_t argCount, + NPVariant *result); +typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); +typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, + NPVariant *result); +typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, + const NPVariant *value); +typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj, + NPIdentifier name); + +/* + NPObjects returned by create, retain, invoke, and getProperty pass + a reference count to the caller. That is, the callee adds a + reference count which passes to the caller. It is the caller's + responsibility to release the returned object. + + NPInvokeFunctionPtr function may return 0 to indicate a void + result. + + NPInvalidateFunctionPtr is called by the scripting environment + when the native code is shutdown. Any attempt to message a + NPObject instance after the invalidate callback has been + called will result in undefined behavior, even if the native code + is still retaining those NPObject instances. (The runtime + will typically return immediately, with 0 or NULL, from an attempt + to dispatch to a NPObject, but this behavior should not be + depended upon.) +*/ +struct NPClass +{ + uint32_t structVersion; + NPAllocateFunctionPtr allocate; + NPDeallocateFunctionPtr deallocate; + NPInvalidateFunctionPtr invalidate; + NPHasMethodFunctionPtr hasMethod; + NPInvokeFunctionPtr invoke; + NPInvokeDefaultFunctionPtr invokeDefault; + NPHasPropertyFunctionPtr hasProperty; + NPGetPropertyFunctionPtr getProperty; + NPSetPropertyFunctionPtr setProperty; + NPRemovePropertyFunctionPtr removeProperty; +}; + +#define NP_CLASS_STRUCT_VERSION 1 + +struct NPObject { + NPClass *_class; + uint32_t referenceCount; + /* + * Additional space may be allocated here by types of NPObjects + */ +}; + +/* + If the class has an allocate function, NPN_CreateObject invokes + that function, otherwise a NPObject is allocated and + returned. This method will initialize the referenceCount member of + the NPObject to 1. +*/ +NPObject *NPN_CreateObject(NPP npp, NPClass *aClass); + +/* + Increment the NPObject's reference count. +*/ +NPObject *NPN_RetainObject(NPObject *npobj); + +/* + Decremented the NPObject's reference count. If the reference + count goes to zero, the class's destroy function is invoke if + specified, otherwise the object is freed directly. +*/ +void NPN_ReleaseObject(NPObject *npobj); + +/* + Functions to access script objects represented by NPObject. + + Calls to script objects are synchronous. If a function returns a + value, it will be supplied via the result NPVariant + argument. Successful calls will return true, false will be + returned in case of an error. + + Calls made from plugin code to script must be made from the thread + on which the plugin was initialized. +*/ + +bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, + const NPVariant *args, uint32_t argCount, NPVariant *result); +bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, + uint32_t argCount, NPVariant *result); +bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, + NPVariant *result); +bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, + NPVariant *result); +bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, + const NPVariant *value); +bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); +bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); +bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName); + +/* + NPN_SetException may be called to trigger a script exception upon + return from entry points into NPObjects. Typical usage: + + NPN_SetException (npobj, message); +*/ +void NPN_SetException(NPObject *npobj, const NPUTF8 *message); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nptypes.h b/Src/nprt_plugin/gecko/1.8/win/include/nptypes.h new file mode 100644 index 00000000..a05d3956 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nptypes.h @@ -0,0 +1,105 @@ +/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * mozilla.org. + * Portions created by the Initial Developer are Copyright (C) 2004 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@mozilla.org> (Original author) + * + * 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 ***** */ + +/* + * Header file for ensuring that C99 types ([u]int32_t and bool) are + * available. + */ + +#if defined(WIN32) || defined(OS2) + /* + * Win32 and OS/2 don't know C99, so define [u]int_32 here. The bool + * is predefined tho, both in C and C++. + */ + typedef int int32_t; + typedef unsigned int uint32_t; +#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX) + /* + * AIX and SunOS ship a inttypes.h header that defines [u]int32_t, + * but not bool for C. + */ + #include <inttypes.h> + + #ifndef __cplusplus + typedef int bool; + #endif +#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD) + /* + * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and + * u_int32_t. + */ + #include <sys/types.h> + + /* + * BSD/OS ships no header that defines uint32_t, nor bool (for C) + * OpenBSD ships no header that defines uint32_t and using its bool macro is + * unsafe. + */ + #if defined(bsdi) || defined(OPENBSD) + typedef u_int32_t uint32_t; + + #if !defined(__cplusplus) + typedef int bool; + #endif + #else + /* + * FreeBSD defines uint32_t and bool. + */ + #include <inttypes.h> + #include <stdbool.h> + #endif +#elif defined(BEOS) + #include <inttypes.h> +#else + /* + * For those that ship a standard C99 stdint.h header file, include + * it. Can't do the same for stdbool.h tho, since some systems ship + * with a stdbool.h file that doesn't compile! + */ + #include <stdint.h> + + #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95) + #include <stdbool.h> + #else + /* + * GCC 2.91 can't deal with a typedef for bool, but a #define + * works. + */ + #define bool int + #endif +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/npupp.h b/Src/nprt_plugin/gecko/1.8/win/include/npupp.h new file mode 100644 index 00000000..19a713ca --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/npupp.h @@ -0,0 +1,1889 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + + +/* + * npupp.h $Revision: 1.1 $ + * function call mecahnics needed by platform specific glue code. + */ + + +#ifndef _NPUPP_H_ +#define _NPUPP_H_ + +#if defined(__OS2__) +#pragma pack(1) +#endif + +#ifndef GENERATINGCFM +#define GENERATINGCFM 0 +#endif + +#ifndef _NPAPI_H_ +#include "npapi.h" +#endif + +#include "npruntime.h" + +#include "jri.h" + +/****************************************************************************************** + plug-in function table macros + for each function in and out of the plugin API we define + typedef NPP_FooUPP + #define NewNPP_FooProc + #define CallNPP_FooProc + for mac, define the UPP magic for PPC/68K calling + *******************************************************************************************/ + + +/* NPP_Initialize */ + +#define _NPUPP_USE_UPP_ (TARGET_RT_MAC_CFM && !TARGET_API_MAC_CARBON) + +#if _NPUPP_USE_UPP_ +typedef UniversalProcPtr NPP_InitializeUPP; + +enum { + uppNPP_InitializeProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPP_InitializeProc(FUNC) \ + (NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture()) +#define CallNPP_InitializeProc(FUNC) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo) + +#else + +typedef void (* NP_LOADDS NPP_InitializeUPP)(void); +#define NewNPP_InitializeProc(FUNC) \ + ((NPP_InitializeUPP) (FUNC)) +#define CallNPP_InitializeProc(FUNC) \ + (*(FUNC))() + +#endif + + +/* NPP_Shutdown */ + +#if _NPUPP_USE_UPP_ +typedef UniversalProcPtr NPP_ShutdownUPP; + +enum { + uppNPP_ShutdownProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPP_ShutdownProc(FUNC) \ + (NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture()) +#define CallNPP_ShutdownProc(FUNC) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo) + +#else + +typedef void (* NP_LOADDS NPP_ShutdownUPP)(void); +#define NewNPP_ShutdownProc(FUNC) \ + ((NPP_ShutdownUPP) (FUNC)) +#define CallNPP_ShutdownProc(FUNC) \ + (*(FUNC))() + +#endif + + +/* NPP_New */ + +#if _NPUPP_USE_UPP_ +typedef UniversalProcPtr NPP_NewUPP; + +enum { + uppNPP_NewProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **))) + | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; + +#define NewNPP_NewProc(FUNC) \ + (NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture()) +#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \ + (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) +#else + +typedef NPError (* NP_LOADDS NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); +#define NewNPP_NewProc(FUNC) \ + ((NPP_NewUPP) (FUNC)) +#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) + +#endif + + +/* NPP_Destroy */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_DestroyUPP; +enum { + uppNPP_DestroyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_DestroyProc(FUNC) \ + (NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture()) +#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2)) +#else + +typedef NPError (* NP_LOADDS NPP_DestroyUPP)(NPP instance, NPSavedData** save); +#define NewNPP_DestroyProc(FUNC) \ + ((NPP_DestroyUPP) (FUNC)) +#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + + +/* NPP_SetWindow */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_SetWindowUPP; +enum { + uppNPP_SetWindowProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_SetWindowProc(FUNC) \ + (NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture()) +#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2)) + +#else + +typedef NPError (* NP_LOADDS NPP_SetWindowUPP)(NPP instance, NPWindow* window); +#define NewNPP_SetWindowProc(FUNC) \ + ((NPP_SetWindowUPP) (FUNC)) +#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + + +/* NPP_NewStream */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_NewStreamUPP; +enum { + uppNPP_NewStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_NewStreamProc(FUNC) \ + (NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture()) +#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) +#else + +typedef NPError (* NP_LOADDS NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); +#define NewNPP_NewStreamProc(FUNC) \ + ((NPP_NewStreamUPP) (FUNC)) +#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) +#endif + + +/* NPP_DestroyStream */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_DestroyStreamUPP; +enum { + uppNPP_DestroyStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_DestroyStreamProc(FUNC) \ + (NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture()) +#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPReasonArg)) + +#else + +typedef NPError (* NP_LOADDS NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); +#define NewNPP_DestroyStreamProc(FUNC) \ + ((NPP_DestroyStreamUPP) (FUNC)) +#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ + (*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg)) + +#endif + + +/* NPP_WriteReady */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_WriteReadyUPP; +enum { + uppNPP_WriteReadyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPP_WriteReadyProc(FUNC) \ + (NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture()) +#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr)) + +#else + +typedef int32 (* NP_LOADDS NPP_WriteReadyUPP)(NPP instance, NPStream* stream); +#define NewNPP_WriteReadyProc(FUNC) \ + ((NPP_WriteReadyUPP) (FUNC)) +#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ + (*(FUNC))((NPParg), (NPStreamPtr)) + +#endif + + +/* NPP_Write */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_WriteUPP; +enum { + uppNPP_WriteProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPP_WriteProc(FUNC) \ + (NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture()) +#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) + +#else + +typedef int32 (* NP_LOADDS NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); +#define NewNPP_WriteProc(FUNC) \ + ((NPP_WriteUPP) (FUNC)) +#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ + (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) + +#endif + + +/* NPP_StreamAsFile */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_StreamAsFileUPP; +enum { + uppNPP_StreamAsFileProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) + | RESULT_SIZE(SIZE_CODE(0)) +}; +#define NewNPP_StreamAsFileProc(FUNC) \ + (NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture()) +#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef void (* NP_LOADDS NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); +#define NewNPP_StreamAsFileProc(FUNC) \ + ((NPP_StreamAsFileUPP) (FUNC)) +#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) +#endif + + +/* NPP_Print */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_PrintUPP; +enum { + uppNPP_PrintProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *))) + | RESULT_SIZE(SIZE_CODE(0)) +}; +#define NewNPP_PrintProc(FUNC) \ + (NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture()) +#define CallNPP_PrintProc(FUNC, NPParg, voidPtr) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr)) + +#else + +typedef void (* NP_LOADDS NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); +#define NewNPP_PrintProc(FUNC) \ + ((NPP_PrintUPP) (FUNC)) +#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ + (*(FUNC))((NPParg), (NPPrintArg)) + +#endif + + +/* NPP_HandleEvent */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_HandleEventUPP; +enum { + uppNPP_HandleEventProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(int16))) +}; +#define NewNPP_HandleEventProc(FUNC) \ + (NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture()) +#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ + (int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr)) + +#else + +typedef int16 (* NP_LOADDS NPP_HandleEventUPP)(NPP instance, void* event); +#define NewNPP_HandleEventProc(FUNC) \ + ((NPP_HandleEventUPP) (FUNC)) +#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ + (*(FUNC))((NPParg), (voidPtr)) + +#endif + + +/* NPP_URLNotify */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_URLNotifyUPP; +enum { + uppNPP_URLNotifyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(SIZE_CODE(0))) +}; +#define NewNPP_URLNotifyProc(FUNC) \ + (NPP_URLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, GetCurrentArchitecture()) +#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + +#else + +typedef void (* NP_LOADDS NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData); +#define NewNPP_URLNotifyProc(FUNC) \ + ((NPP_URLNotifyUPP) (FUNC)) +#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + +#endif + + +/* NPP_GetValue */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_GetValueUPP; +enum { + uppNPP_GetValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_GetValueProc(FUNC) \ + (NPP_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_GetValueProcInfo, GetCurrentArchitecture()) +#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) +#else + +typedef NPError (* NP_LOADDS NPP_GetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); +#define NewNPP_GetValueProc(FUNC) \ + ((NPP_GetValueUPP) (FUNC)) +#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) +#endif + + +/* NPP_SetValue */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_SetValueUPP; +enum { + uppNPP_SetValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_SetValueProc(FUNC) \ + (NPP_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetValueProcInfo, GetCurrentArchitecture()) +#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) +#else + +typedef NPError (* NP_LOADDS NPP_SetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); +#define NewNPP_SetValueProc(FUNC) \ + ((NPP_SetValueUPP) (FUNC)) +#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) +#endif + + +/* + * Netscape entry points + */ + + +/* NPN_GetValue */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetValueUPP; +enum { + uppNPN_GetValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_GetValueProc(FUNC) \ + (NPN_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetValueProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetValueProcInfo, (ARG1), (ARG2), (ARG3)) +#else + +typedef NPError (* NP_LOADDS NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); +#define NewNPN_GetValueProc(FUNC) \ + ((NPN_GetValueUPP) (FUNC)) +#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) +#endif + + +/* NPN_SetValue */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_SetValueUPP; +enum { + uppNPN_SetValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_SetValueProc(FUNC) \ + (NPN_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetValueProcInfo, GetCurrentArchitecture()) +#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetValueProcInfo, (ARG1), (ARG2), (ARG3)) +#else + +typedef NPError (* NP_LOADDS NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); +#define NewNPN_SetValueProc(FUNC) \ + ((NPN_SetValueUPP) (FUNC)) +#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) +#endif + + +/* NPN_GetUrlNotify */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetURLNotifyUPP; +enum { + uppNPN_GetURLNotifyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_GetURLNotifyProc(FUNC) \ + (NPN_GetURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) +#else + +typedef NPError (* NP_LOADDS NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); +#define NewNPN_GetURLNotifyProc(FUNC) \ + ((NPN_GetURLNotifyUPP) (FUNC)) +#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) +#endif + + +/* NPN_PostUrlNotify */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_PostURLNotifyUPP; +enum { + uppNPN_PostURLNotifyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) + | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_PostURLNotifyProc(FUNC) \ + (NPN_PostURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, GetCurrentArchitecture()) +#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) +#else + +typedef NPError (* NP_LOADDS NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); +#define NewNPN_PostURLNotifyProc(FUNC) \ + ((NPN_PostURLNotifyUPP) (FUNC)) +#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) +#endif + + +/* NPN_GetUrl */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetURLUPP; +enum { + uppNPN_GetURLProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_GetURLProc(FUNC) \ + (NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3)) +#else + +typedef NPError (* NP_LOADDS NPN_GetURLUPP)(NPP instance, const char* url, const char* window); +#define NewNPN_GetURLProc(FUNC) \ + ((NPN_GetURLUPP) (FUNC)) +#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) +#endif + + +/* NPN_PostUrl */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_PostURLUPP; +enum { + uppNPN_PostURLProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_PostURLProc(FUNC) \ + (NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture()) +#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) +#else + +typedef NPError (* NP_LOADDS NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); +#define NewNPN_PostURLProc(FUNC) \ + ((NPN_PostURLUPP) (FUNC)) +#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) +#endif + + +/* NPN_RequestRead */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_RequestReadUPP; +enum { + uppNPN_RequestReadProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_RequestReadProc(FUNC) \ + (NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture()) +#define CallNPN_RequestReadProc(FUNC, stream, range) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range)) + +#else + +typedef NPError (* NP_LOADDS NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); +#define NewNPN_RequestReadProc(FUNC) \ + ((NPN_RequestReadUPP) (FUNC)) +#define CallNPN_RequestReadProc(FUNC, stream, range) \ + (*(FUNC))((stream), (range)) + +#endif + + +/* NPN_NewStream */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_NewStreamUPP; +enum { + uppNPN_NewStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPStream **))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_NewStreamProc(FUNC) \ + (NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture()) +#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (window), (stream)) + +#else + +typedef NPError (* NP_LOADDS NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); +#define NewNPN_NewStreamProc(FUNC) \ + ((NPN_NewStreamUPP) (FUNC)) +#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ + (*(FUNC))((npp), (type), (window), (stream)) + +#endif + + +/* NPN_Write */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_WriteUPP; +enum { + uppNPN_WriteProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32))) +}; +#define NewNPN_WriteProc(FUNC) \ + (NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture()) +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ + (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer)) + +#else + +typedef int32 (* NP_LOADDS NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); +#define NewNPN_WriteProc(FUNC) \ + ((NPN_WriteUPP) (FUNC)) +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ + (*(FUNC))((npp), (stream), (len), (buffer)) + +#endif + + +/* NPN_DestroyStream */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_DestroyStreamUPP; +enum { + uppNPN_DestroyStreamProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPN_DestroyStreamProc(FUNC) \ + (NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture()) +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ + (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (reason)) + +#else + +typedef NPError (* NP_LOADDS NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); +#define NewNPN_DestroyStreamProc(FUNC) \ + ((NPN_DestroyStreamUPP) (FUNC)) +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ + (*(FUNC))((npp), (stream), (reason)) + +#endif + + +/* NPN_Status */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_StatusUPP; +enum { + uppNPN_StatusProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) +}; + +#define NewNPN_StatusProc(FUNC) \ + (NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture()) +#define CallNPN_StatusProc(FUNC, npp, msg) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg)) + +#else + +typedef void (* NP_LOADDS NPN_StatusUPP)(NPP instance, const char* message); +#define NewNPN_StatusProc(FUNC) \ + ((NPN_StatusUPP) (FUNC)) +#define CallNPN_StatusProc(FUNC, npp, msg) \ + (*(FUNC))((npp), (msg)) + +#endif + + +/* NPN_UserAgent */ +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_UserAgentUPP; +enum { + uppNPN_UserAgentProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | RESULT_SIZE(SIZE_CODE(sizeof(const char *))) +}; + +#define NewNPN_UserAgentProc(FUNC) \ + (NPN_UserAgentUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UserAgentProcInfo, GetCurrentArchitecture()) +#define CallNPN_UserAgentProc(FUNC, ARG1) \ + (const char*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UserAgentProcInfo, (ARG1)) + +#else + +typedef const char* (* NP_LOADDS NPN_UserAgentUPP)(NPP instance); +#define NewNPN_UserAgentProc(FUNC) \ + ((NPN_UserAgentUPP) (FUNC)) +#define CallNPN_UserAgentProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + +/* NPN_MemAlloc */ +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_MemAllocUPP; +enum { + uppNPN_MemAllocProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) + | RESULT_SIZE(SIZE_CODE(sizeof(void *))) +}; + +#define NewNPN_MemAllocProc(FUNC) \ + (NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemAllocProc(FUNC, ARG1) \ + (void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1)) + +#else + +typedef void* (* NP_LOADDS NPN_MemAllocUPP)(uint32 size); +#define NewNPN_MemAllocProc(FUNC) \ + ((NPN_MemAllocUPP) (FUNC)) +#define CallNPN_MemAllocProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + +/* NPN__MemFree */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_MemFreeUPP; +enum { + uppNPN_MemFreeProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *))) +}; + +#define NewNPN_MemFreeProc(FUNC) \ + (NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemFreeProc(FUNC, ARG1) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1)) + +#else + +typedef void (* NP_LOADDS NPN_MemFreeUPP)(void* ptr); +#define NewNPN_MemFreeProc(FUNC) \ + ((NPN_MemFreeUPP) (FUNC)) +#define CallNPN_MemFreeProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + +/* NPN_MemFlush */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_MemFlushUPP; +enum { + uppNPN_MemFlushProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) + | RESULT_SIZE(SIZE_CODE(sizeof(uint32))) +}; + +#define NewNPN_MemFlushProc(FUNC) \ + (NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture()) +#define CallNPN_MemFlushProc(FUNC, ARG1) \ + (uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1)) + +#else + +typedef uint32 (* NP_LOADDS NPN_MemFlushUPP)(uint32 size); +#define NewNPN_MemFlushProc(FUNC) \ + ((NPN_MemFlushUPP) (FUNC)) +#define CallNPN_MemFlushProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + + +/* NPN_ReloadPlugins */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_ReloadPluginsUPP; +enum { + uppNPN_ReloadPluginsProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_ReloadPluginsProc(FUNC) \ + (NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture()) +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1)) + +#else + +typedef void (* NP_LOADDS NPN_ReloadPluginsUPP)(NPBool reloadPages); +#define NewNPN_ReloadPluginsProc(FUNC) \ + ((NPN_ReloadPluginsUPP) (FUNC)) +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_GetJavaEnv */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetJavaEnvUPP; +enum { + uppNPN_GetJavaEnvProcInfo = kThinkCStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(JRIEnv*))) +}; + +#define NewNPN_GetJavaEnvProc(FUNC) \ + (NPN_GetJavaEnvUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetJavaEnvProc(FUNC) \ + (JRIEnv*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo) + +#else +typedef JRIEnv* (* NP_LOADDS NPN_GetJavaEnvUPP)(void); +#define NewNPN_GetJavaEnvProc(FUNC) \ + ((NPN_GetJavaEnvUPP) (FUNC)) +#define CallNPN_GetJavaEnvProc(FUNC) \ + (*(FUNC))() + +#endif + + +/* NPN_GetJavaPeer */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetJavaPeerUPP; +enum { + uppNPN_GetJavaPeerProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | RESULT_SIZE(SIZE_CODE(sizeof(jref))) +}; + +#define NewNPN_GetJavaPeerProc(FUNC) \ + (NPN_GetJavaPeerUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, (ARG1)) + +#else + +typedef jref (* NP_LOADDS NPN_GetJavaPeerUPP)(NPP instance); +#define NewNPN_GetJavaPeerProc(FUNC) \ + ((NPN_GetJavaPeerUPP) (FUNC)) +#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_InvalidateRect */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_InvalidateRectUPP; +enum { + uppNPN_InvalidateRectProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRect *))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_InvalidateRectProc(FUNC) \ + (NPN_InvalidateRectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, GetCurrentArchitecture()) +#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, (ARG1), (ARG2)) + +#else + +typedef void (* NP_LOADDS NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); +#define NewNPN_InvalidateRectProc(FUNC) \ + ((NPN_InvalidateRectUPP) (FUNC)) +#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + + +/* NPN_InvalidateRegion */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_InvalidateRegionUPP; +enum { + uppNPN_InvalidateRegionProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRegion))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_InvalidateRegionProc(FUNC) \ + (NPN_InvalidateRegionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, GetCurrentArchitecture()) +#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ + (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, (ARG1), (ARG2)) + +#else + +typedef void (* NP_LOADDS NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); +#define NewNPN_InvalidateRegionProc(FUNC) \ + ((NPN_InvalidateRegionUPP) (FUNC)) +#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + +/* NPN_ForceRedraw */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_ForceRedrawUPP; +enum { + uppNPN_ForceRedrawProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | RESULT_SIZE(SIZE_CODE(sizeof(0))) +}; + +#define NewNPN_ForceRedrawProc(FUNC) \ + (NPN_ForceRedrawUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, GetCurrentArchitecture()) +#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, (ARG1)) + +#else + +typedef void (* NP_LOADDS NPN_ForceRedrawUPP)(NPP instance); +#define NewNPN_ForceRedrawProc(FUNC) \ + ((NPN_ForceRedrawUPP) (FUNC)) +#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_GetStringIdentifier */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetStringIdentifierUPP; +enum { + uppNPN_GetStringIdentifierProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const NPUTF8*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPIdentifier))) +}; + +#define NewNPN_GetStringIdentifierProc(FUNC) \ + (NPN_GetStringIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetStringIdentifierProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetStringIdentifierProcInfo, (ARG1)) + +#else + +typedef NPIdentifier (* NP_LOADDS NPN_GetStringIdentifierUPP)(const NPUTF8* name); +#define NewNPN_GetStringIdentifierProc(FUNC) \ + ((NPN_GetStringIdentifierUPP) (FUNC)) +#define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_GetStringIdentifiers */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetStringIdentifiersUPP; +enum { + uppNPN_GetStringIdentifiersProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const NPUTF8**))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(int32_t))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier*))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_GetStringIdentifiersProc(FUNC) \ + (NPN_GetStringIdentifiersUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetStringIdentifiersProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetStringIdentifiersProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef void (* NP_LOADDS NPN_GetStringIdentifiersUPP)(const NPUTF8** names, + int32_t nameCount, + NPIdentifier* identifiers); +#define NewNPN_GetStringIdentifiersProc(FUNC) \ + ((NPN_GetStringIdentifiersUPP) (FUNC)) +#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) + +#endif + +/* NPN_GetIntIdentifier */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetIntIdentifierUPP; +enum { + uppNPN_GetIntIdentifierProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(int32_t))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPIdentifier))) +}; + +#define NewNPN_GetIntIdentifierProc(FUNC) \ + (NPN_GetIntIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetIntIdentifierProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetIntIdentifierProcInfo, (ARG1)) + +#else + +typedef NPIdentifier (* NP_LOADDS NPN_GetIntIdentifierUPP)(int32_t intid); +#define NewNPN_GetIntIdentifierProc(FUNC) \ + ((NPN_GetIntIdentifierUPP) (FUNC)) +#define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_IdentifierIsString */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_IdentifierIsStringUPP; +enum { + uppNPN_IdentifierIsStringProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier identifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_IdentifierIsStringProc(FUNC) \ + (NPN_IdentifierIsStringUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_IdentifierIsStringProcInfo, GetCurrentArchitecture()) +#define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_IdentifierIsStringProcInfo, (ARG1)) + +#else + +typedef bool (* NP_LOADDS NPN_IdentifierIsStringUPP)(NPIdentifier identifier); +#define NewNPN_IdentifierIsStringProc(FUNC) \ + ((NPN_IdentifierIsStringUPP) (FUNC)) +#define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_UTF8FromIdentifier */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_UTF8FromIdentifierUPP; +enum { + uppNPN_UTF8FromIdentifierProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPUTF8*))) +}; + +#define NewNPN_UTF8FromIdentifierProc(FUNC) \ + (NPN_UTF8FromIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UTF8FromIdentifierProcInfo, GetCurrentArchitecture()) +#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UTF8FromIdentifierProcInfo, (ARG1)) + +#else + +typedef NPUTF8* (* NP_LOADDS NPN_UTF8FromIdentifierUPP)(NPIdentifier identifier); +#define NewNPN_UTF8FromIdentifierProc(FUNC) \ + ((NPN_UTF8FromIdentifierUPP) (FUNC)) +#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_IntFromIdentifier */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_IntFromIdentifierUPP; +enum { + uppNPN_IntFromIdentifierProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(int32_t))) +}; + +#define NewNPN_IntFromIdentifierProc(FUNC) \ + (NPN_IntFromIdentifierUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_IntFromIdentifierProcInfo, GetCurrentArchitecture()) +#define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_IntFromIdentifierProcInfo, (ARG1)) + +#else + +typedef int32_t (* NP_LOADDS NPN_IntFromIdentifierUPP)(NPIdentifier identifier); +#define NewNPN_IntFromIdentifierProc(FUNC) \ + ((NPN_IntFromIdentifierUPP) (FUNC)) +#define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_CreateObject */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_CreateObjectUPP; +enum { + uppNPN_CreateObjectProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPClass*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPObject*))) +}; + +#define NewNPN_CreateObjectProc(FUNC) \ + (NPN_CreateObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_CreateObjectProcInfo, GetCurrentArchitecture()) +#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_CreateObjectProcInfo, (ARG1), (ARG2)) + +#else + +typedef NPObject* (* NP_LOADDS NPN_CreateObjectUPP)(NPP npp, NPClass *aClass); +#define NewNPN_CreateObjectProc(FUNC) \ + ((NPN_CreateObjectUPP) (FUNC)) +#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + +/* NPN_RetainObject */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_RetainObjectUPP; +enum { + uppNPN_RetainObjectProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPObject*))) +}; + +#define NewNPN_RetainObjectProc(FUNC) \ + (NPN_RetainObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RetainObjectProcInfo, GetCurrentArchitecture()) +#define CallNPN_RetainObjectProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RetainObjectProcInfo, (ARG1)) + +#else + +typedef NPObject* (* NP_LOADDS NPN_RetainObjectUPP)(NPObject *obj); +#define NewNPN_RetainObjectProc(FUNC) \ + ((NPN_RetainObjectUPP) (FUNC)) +#define CallNPN_RetainObjectProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_ReleaseObject */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_ReleaseObjectUPP; +enum { + uppNPN_ReleaseObjectProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_ReleaseObjectProc(FUNC) \ + (NPN_ReleaseObjectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReleaseObjectProcInfo, GetCurrentArchitecture()) +#define CallNPN_ReleaseObjectProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReleaseObjectProcInfo, (ARG1)) + +#else + +typedef void (* NP_LOADDS NPN_ReleaseObjectUPP)(NPObject *obj); +#define NewNPN_ReleaseObjectProc(FUNC) \ + ((NPN_ReleaseObjectUPP) (FUNC)) +#define CallNPN_ReleaseObjectProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_Invoke */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_InvokeUPP; +enum { + uppNPN_InvokeProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint32_t))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_InvokeProc(FUNC) \ + (NPN_InvokeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvokeProcInfo, GetCurrentArchitecture()) +#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvokeProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) + +#else + +typedef bool (* NP_LOADDS NPN_InvokeUPP)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); +#define NewNPN_InvokeProc(FUNC) \ + ((NPN_InvokeUPP) (FUNC)) +#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) + +#endif + +/* NPN_InvokeDefault */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_InvokeDefaultUPP; +enum { + uppNPN_InvokeDefaultProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) + | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint32_t))) + | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_InvokeDefaultProc(FUNC) \ + (NPN_InvokeDefaultUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvokeDefaultProcInfo, GetCurrentArchitecture()) +#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvokeDefaultProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) + +#else + +typedef bool (* NP_LOADDS NPN_InvokeDefaultUPP)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); +#define NewNPN_InvokeDefaultProc(FUNC) \ + ((NPN_InvokeDefaultUPP) (FUNC)) +#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) + +#endif + +/* NPN_Evaluate */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_EvaluateUPP; +enum { + uppNPN_EvaluateProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPString*))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_EvaluateProc(FUNC) \ + (NPN_EvaluateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_EvaluateProcInfo, GetCurrentArchitecture()) +#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_EvaluateProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + +#else + +typedef bool (* NP_LOADDS NPN_EvaluateUPP)(NPP npp, NPObject *obj, NPString *script, NPVariant *result); +#define NewNPN_EvaluateProc(FUNC) \ + ((NPN_EvaluateUPP) (FUNC)) +#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + +#endif + +/* NPN_GetProperty */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_GetPropertyUPP; +enum { + uppNPN_GetPropertyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_GetPropertyProc(FUNC) \ + (NPN_GetPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetPropertyProcInfo, GetCurrentArchitecture()) +#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetPropertyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + +#else + +typedef bool (* NP_LOADDS NPN_GetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); +#define NewNPN_GetPropertyProc(FUNC) \ + ((NPN_GetPropertyUPP) (FUNC)) +#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + +#endif + +/* NPN_SetProperty */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_SetPropertyUPP; +enum { + uppNPN_SetPropertyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(const NPVariant*))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_SetPropertyProc(FUNC) \ + (NPN_SetPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetPropertyProcInfo, GetCurrentArchitecture()) +#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetPropertyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4)) + +#else + +typedef bool (* NP_LOADDS NPN_SetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); +#define NewNPN_SetPropertyProc(FUNC) \ + ((NPN_SetPropertyUPP) (FUNC)) +#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) + +#endif + +/* NPN_RemoveProperty */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_RemovePropertyUPP; +enum { + uppNPN_RemovePropertyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_RemovePropertyProc(FUNC) \ + (NPN_RemovePropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RemovePropertyProcInfo, GetCurrentArchitecture()) +#define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RemovePropertyProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef bool (* NP_LOADDS NPN_RemovePropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); +#define NewNPN_RemovePropertyProc(FUNC) \ + ((NPN_RemovePropertyUPP) (FUNC)) +#define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) + +#endif + +/* NPN_HasProperty */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_HasPropertyUPP; +enum { + uppNPN_HasPropertyProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_HasPropertyProc(FUNC) \ + (NPN_HasPropertyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_HasPropertyProcInfo, GetCurrentArchitecture()) +#define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_HasPropertyProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef bool (* NP_LOADDS NPN_HasPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); +#define NewNPN_HasPropertyProc(FUNC) \ + ((NPN_HasPropertyUPP) (FUNC)) +#define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) + +#endif + +/* NPN_HasMethod */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_HasMethodUPP; +enum { + uppNPN_HasMethodProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier))) + | RESULT_SIZE(SIZE_CODE(sizeof(bool))) +}; + +#define NewNPN_HasMethodProc(FUNC) \ + (NPN_HasMethodUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_HasMethodProcInfo, GetCurrentArchitecture()) +#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_HasMethodProcInfo, (ARG1), (ARG2), (ARG3)) + +#else + +typedef bool (* NP_LOADDS NPN_HasMethodUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); +#define NewNPN_HasMethodProc(FUNC) \ + ((NPN_HasMethodUPP) (FUNC)) +#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \ + (*(FUNC))((ARG1), (ARG2), (ARG3)) + +#endif + +/* NPN_ReleaseVariantValue */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_ReleaseVariantValue; +enum { + uppNPN_ReleaseVariantValueProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPVariant*))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_ReleaseVariantValueProc(FUNC) \ + (NPN_ReleaseVariantValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReleaseVariantValueProcInfo, GetCurrentArchitecture()) +#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReleaseVariantValueProcInfo, (ARG1)) + +#else + +typedef void (* NP_LOADDS NPN_ReleaseVariantValueUPP)(NPVariant *variant); +#define NewNPN_ReleaseVariantValueProc(FUNC) \ + ((NPN_ReleaseVariantValueUPP) (FUNC)) +#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + +/* NPN_SetException */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_SetExceptionUPP; +enum { + uppNPN_SetExceptionProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const NPUTF8*))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_SetExceptionProc(FUNC) \ + (NPN_SetExceptionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetExceptionProcInfo, GetCurrentArchitecture()) +#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetExceptionProcInfo, (ARG1), (ARG2)) + +#else + +typedef void (* NP_LOADDS NPN_SetExceptionUPP)(NPObject *obj, const NPUTF8 *message); +#define NewNPN_SetExceptionProc(FUNC) \ + ((NPN_SetExceptionUPP) (FUNC)) +#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + +/* NPN_PushPopupsEnabledStateUPP */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_PushPopupsEnabledStateUPP; +enum { + uppNPN_PushPopupsEnabledStateProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPBool))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_PushPopupsEnabledStateProc(FUNC) \ + (NPN_PushPopupsEnabledStateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PushPopupsEnabledStateProcInfo, GetCurrentArchitecture()) +#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PushPopupsEnabledStateProcInfo, (ARG1), (ARG2)) + +#else + +typedef bool (* NP_LOADDS NPN_PushPopupsEnabledStateUPP)(NPP npp, NPBool enabled); +#define NewNPN_PushPopupsEnabledStateProc(FUNC) \ + ((NPN_PushPopupsEnabledStateUPP) (FUNC)) +#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ + (*(FUNC))((ARG1), (ARG2)) + +#endif + +/* NPN_PopPopupsEnabledState */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPN_PopPopupsEnabledStateUPP; +enum { + uppNPN_PopPopupsEnabledStateProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) + | RESULT_SIZE(SIZE_CODE(0)) +}; + +#define NewNPN_PopPopupsEnabledStateProc(FUNC) \ + (NPN_PopPopupsEnabledStateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PopPopupsEnabledStateProcInfo, GetCurrentArchitecture()) +#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ + (jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PopPopupsEnabledStateProcInfo, (ARG1)) + +#else + +typedef bool (* NP_LOADDS NPN_PopPopupsEnabledStateUPP)(NPP npp); +#define NewNPN_PopPopupsEnabledStateProc(FUNC) \ + ((NPN_PopPopupsEnabledStateUPP) (FUNC)) +#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ + (*(FUNC))((ARG1)) + +#endif + + + +/****************************************************************************************** + * The actual plugin function table definitions + *******************************************************************************************/ + +#ifdef XP_MAC +#if PRAGMA_STRUCT_ALIGN +#pragma options align=mac68k +#endif +#endif + +typedef struct _NPPluginFuncs { + uint16 size; + uint16 version; + NPP_NewUPP newp; + NPP_DestroyUPP destroy; + NPP_SetWindowUPP setwindow; + NPP_NewStreamUPP newstream; + NPP_DestroyStreamUPP destroystream; + NPP_StreamAsFileUPP asfile; + NPP_WriteReadyUPP writeready; + NPP_WriteUPP write; + NPP_PrintUPP print; + NPP_HandleEventUPP event; + NPP_URLNotifyUPP urlnotify; + JRIGlobalRef javaClass; + NPP_GetValueUPP getvalue; + NPP_SetValueUPP setvalue; +} NPPluginFuncs; + +typedef struct _NPNetscapeFuncs { + uint16 size; + uint16 version; + NPN_GetURLUPP geturl; + NPN_PostURLUPP posturl; + NPN_RequestReadUPP requestread; + NPN_NewStreamUPP newstream; + NPN_WriteUPP write; + NPN_DestroyStreamUPP destroystream; + NPN_StatusUPP status; + NPN_UserAgentUPP uagent; + NPN_MemAllocUPP memalloc; + NPN_MemFreeUPP memfree; + NPN_MemFlushUPP memflush; + NPN_ReloadPluginsUPP reloadplugins; + NPN_GetJavaEnvUPP getJavaEnv; + NPN_GetJavaPeerUPP getJavaPeer; + NPN_GetURLNotifyUPP geturlnotify; + NPN_PostURLNotifyUPP posturlnotify; + NPN_GetValueUPP getvalue; + NPN_SetValueUPP setvalue; + NPN_InvalidateRectUPP invalidaterect; + NPN_InvalidateRegionUPP invalidateregion; + NPN_ForceRedrawUPP forceredraw; + NPN_GetStringIdentifierUPP getstringidentifier; + NPN_GetStringIdentifiersUPP getstringidentifiers; + NPN_GetIntIdentifierUPP getintidentifier; + NPN_IdentifierIsStringUPP identifierisstring; + NPN_UTF8FromIdentifierUPP utf8fromidentifier; + NPN_IntFromIdentifierUPP intfromidentifier; + NPN_CreateObjectUPP createobject; + NPN_RetainObjectUPP retainobject; + NPN_ReleaseObjectUPP releaseobject; + NPN_InvokeUPP invoke; + NPN_InvokeDefaultUPP invokeDefault; + NPN_EvaluateUPP evaluate; + NPN_GetPropertyUPP getproperty; + NPN_SetPropertyUPP setproperty; + NPN_RemovePropertyUPP removeproperty; + NPN_HasPropertyUPP hasproperty; + NPN_HasMethodUPP hasmethod; + NPN_ReleaseVariantValueUPP releasevariantvalue; + NPN_SetExceptionUPP setexception; + NPN_PushPopupsEnabledStateUPP pushpopupsenabledstate; + NPN_PopPopupsEnabledStateUPP poppopupsenabledstate; +} NPNetscapeFuncs; + +#ifdef XP_MAC +#if PRAGMA_STRUCT_ALIGN +#pragma options align=reset +#endif +#endif + + +#if defined(XP_MAC) || defined(XP_MACOSX) +/****************************************************************************************** + * Mac platform-specific plugin glue stuff + *******************************************************************************************/ + +/* + * Main entry point of the plugin. + * This routine will be called when the plugin is loaded. The function + * tables are passed in and the plugin fills in the NPPluginFuncs table + * and NPPShutdownUPP for Netscape's use. + */ + +#if _NPUPP_USE_UPP_ + +typedef UniversalProcPtr NPP_MainEntryUPP; +enum { + uppNPP_MainEntryProcInfo = kThinkCStackBased + | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*))) + | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*))) + | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*))) + | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) +}; +#define NewNPP_MainEntryProc(FUNC) \ + (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture()) +#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ + CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP)) + +#else + +typedef NPError (* NP_LOADDS NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); +#define NewNPP_MainEntryProc(FUNC) \ + ((NPP_MainEntryUPP) (FUNC)) +#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ + (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) + +#endif + + +/* + * Mac version(s) of NP_GetMIMEDescription(const char *) + * These can be called to retreive MIME information from the plugin dynamically + * + * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way + * to get mime info from the plugin only on OSX and may not be supported + * in furture version--use NP_GetMIMEDescription instead + */ + +enum +{ + kBPSupportedMIMETypesStructVers_1 = 1 +}; + +typedef struct _BPSupportedMIMETypes +{ + SInt32 structVersion; /* struct version */ + Handle typeStrings; /* STR# formated handle, allocated by plug-in */ + Handle infoStrings; /* STR# formated handle, allocated by plug-in */ +} BPSupportedMIMETypes; +OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); + +#if _NPUPP_USE_UPP_ + +#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescriptionRD" +typedef UniversalProcPtr NP_GetMIMEDescriptionUPP; +enum { + uppNP_GetMIMEDescEntryProc = kThinkCStackBased + | RESULT_SIZE(SIZE_CODE(sizeof(const char *))) +}; +#define NewNP_GetMIMEDescEntryProc(FUNC) \ + (NP_GetMIMEDescriptionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNP_GetMIMEDescEntryProc, GetCurrentArchitecture()) +#define CallNP_GetMIMEDescEntryProc(FUNC) \ + (const char *)CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNP_GetMIMEDescEntryProc) + + +#else /* !_NPUPP_USE_UPP_ */ + + /* NP_GetMIMEDescription */ +#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" +typedef const char* (* NP_LOADDS NP_GetMIMEDescriptionUPP)(); +#define NewNP_GetMIMEDescEntryProc(FUNC) \ + ((NP_GetMIMEDescriptionUPP) (FUNC)) +#define CallNP_GetMIMEDescEntryProc(FUNC) \ + (*(FUNC))() +/* BP_GetSupportedMIMETypes */ +typedef OSErr (* NP_LOADDS BP_GetSupportedMIMETypesUPP)(BPSupportedMIMETypes*, UInt32); +#define NewBP_GetSupportedMIMETypesEntryProc(FUNC) \ + ((BP_GetSupportedMIMETypesUPP) (FUNC)) +#define CallBP_GetMIMEDescEntryProc(FUNC, mimeInfo, flags) \ + (*(FUNC))((mimeInfo), (flags)) + +#endif +#endif /* MAC */ + +#if defined(_WINDOWS) +#define OSCALL WINAPI +#else +#if defined(__OS2__) +#define OSCALL _System +#else +#define OSCALL +#endif +#endif + +#if defined( _WINDOWS ) || defined (__OS2__) + +#ifdef __cplusplus +extern "C" { +#endif + +/* plugin meta member functions */ +#if defined(__OS2__) + +typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */ + char *pMimeTypes; + char *pFileExtents; + char *pFileOpenTemplate; + char *pProductName; + char *pProductDescription; + unsigned long dwProductVersionMS; + unsigned long dwProductVersionLS; +} NPPluginData; + +NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData); + +#endif + +NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs); + +NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs); + +NPError OSCALL NP_Shutdown(); + +char* NP_GetMIMEDescription(); + +#ifdef __cplusplus +} +#endif + +#endif /* _WINDOWS || __OS2__ */ + +#if defined(__OS2__) +#pragma pack() +#endif + +#ifdef XP_UNIX + +#ifdef __cplusplus +extern "C" { +#endif + +/* plugin meta member functions */ + +char* NP_GetMIMEDescription(void); +NPError NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*); +NPError NP_Shutdown(void); +NPError NP_GetValue(void *future, NPPVariable aVariable, void *aValue); + +#ifdef __cplusplus +} +#endif + +#endif /* XP_UNIX */ + +#endif /* _NPUPP_H_ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsBuildID.h b/Src/nprt_plugin/gecko/1.8/win/include/nsBuildID.h new file mode 100644 index 00000000..7c7bac47 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsBuildID.h @@ -0,0 +1,23 @@ +#ifndef _NSBUILDID_H_ +#define _NSBUILDID_H_ +/* Build ID file. +* +* If building MOZILLLA_OFFICIAL (release build) NS_BUILD_ID will be updated +* to a current build id. This will be used to determine if we need to +* re-register components. +* +*/ +#define NS_BUILD_ID 0000000000 + +/* GRE_BUILD_ID - GRE build version identifier + * + * If creating a release build (eg, MOZILLA_OFFICIAL is set), then + * GRE_BUILD_ID will be updated to contain <milestone>_<build id>. + * If building a milestone build (eg, MOZ_MILESTONE_RELEASE is set), then + * GRE_BUILD_ID will just contain <milestone>. + * + */ +#define GRE_BUILD_ID "1.8_0000000000" + +#endif /* _NSBUILDID_H_ */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsCOMPtr.h b/Src/nprt_plugin/gecko/1.8/win/include/nsCOMPtr.h new file mode 100644 index 00000000..5d1c8362 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsCOMPtr.h @@ -0,0 +1,1649 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Scott Collins <scc@mozilla.org> (original author) + * L. David Baron <dbaron@dbaron.org> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsCOMPtr_h___ +#define nsCOMPtr_h___ + +/* + Having problems? + + See the User Manual at: + http://www.mozilla.org/projects/xpcom/nsCOMPtr.html + + + nsCOMPtr + better than a raw pointer + for owning objects + -- scc +*/ + + + // Wrapping includes can speed up compiles (see "Large Scale C++ Software Design") +#ifndef nsDebug_h___ +#include "nsDebug.h" + // for |NS_PRECONDITION| +#endif + +#ifndef nsISupportsUtils_h__ +#include "nsISupportsUtils.h" + // for |nsresult|, |NS_ADDREF|, |NS_GET_IID| et al +#endif + +#ifndef nscore_h___ +#include "nscore.h" + // for |NS_..._CAST|, |NS_COM_GLUE| +#endif + + +/* + WARNING: + This file defines several macros for internal use only. These macros begin with the + prefix |NSCAP_|. Do not use these macros in your own code. They are for internal use + only for cross-platform compatibility, and are subject to change without notice. +*/ + + +#ifdef _MSC_VER + #define NSCAP_FEATURE_INLINE_STARTASSIGNMENT + // under VC++, we win by inlining StartAssignment + + // Also under VC++, at the highest warning level, we are overwhelmed with warnings + // about (unused) inline functions being removed. This is to be expected with + // templates, so we disable the warning. + #pragma warning( disable: 4514 ) +#endif + +#define NSCAP_FEATURE_USE_BASE + +#ifdef NS_DEBUG + #define NSCAP_FEATURE_TEST_DONTQUERY_CASES + #undef NSCAP_FEATURE_USE_BASE +//#define NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS +#endif + + /* + |...TEST_DONTQUERY_CASES| and |...DEBUG_PTR_TYPES| introduce some code that is + problematic on a select few of our platforms, e.g., QNX. Therefore, I'm providing + a mechanism by which these features can be explicitly disabled from the command-line. + */ + +#ifdef NSCAP_DISABLE_TEST_DONTQUERY_CASES + #undef NSCAP_FEATURE_TEST_DONTQUERY_CASES +#endif + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) + // Our use of nsCOMPtr_base::mRawPtr violates the C++ standard's aliasing + // rules. Mark it with the may_alias attribute so that gcc 3.3 and higher + // don't reorder instructions based on aliasing assumptions for + // this variable. Fortunately, gcc versions < 3.3 do not do any + // optimizations that break nsCOMPtr. + + #define NS_MAY_ALIAS_PTR(t) t* __attribute__((__may_alias__)) +#else + #define NS_MAY_ALIAS_PTR(t) t* +#endif + +#if defined(NSCAP_DISABLE_DEBUG_PTR_TYPES) + #define NSCAP_FEATURE_USE_BASE +#endif + + +#ifdef HAVE_CPP_BOOL + typedef bool NSCAP_BOOL; +#else + typedef PRBool NSCAP_BOOL; +#endif + + + + + /* + The following three macros (|NSCAP_ADDREF|, |NSCAP_RELEASE|, and |NSCAP_LOG_ASSIGNMENT|) + allow external clients the ability to add logging or other interesting debug facilities. + In fact, if you want |nsCOMPtr| to participate in the standard logging facility, you + provide (e.g., in "nsTraceRefcnt.h") suitable definitions + + #define NSCAP_ADDREF(this, ptr) NS_ADDREF(ptr) + #define NSCAP_RELEASE(this, ptr) NS_RELEASE(ptr) + */ + +#ifndef NSCAP_ADDREF + #define NSCAP_ADDREF(this, ptr) (ptr)->AddRef() +#endif + +#ifndef NSCAP_RELEASE + #define NSCAP_RELEASE(this, ptr) (ptr)->Release() +#endif + + // Clients can define |NSCAP_LOG_ASSIGNMENT| to perform logging. +#ifdef NSCAP_LOG_ASSIGNMENT + // Remember that |NSCAP_LOG_ASSIGNMENT| was defined by some client so that we know + // to instantiate |~nsGetterAddRefs| in turn to note the external assignment into + // the |nsCOMPtr|. + #define NSCAP_LOG_EXTERNAL_ASSIGNMENT +#else + // ...otherwise, just strip it out of the code + #define NSCAP_LOG_ASSIGNMENT(this, ptr) +#endif + +#ifndef NSCAP_LOG_RELEASE + #define NSCAP_LOG_RELEASE(this, ptr) +#endif + + + + + /* + WARNING: + VC++4.2 is very picky. To compile under VC++4.2, the classes must be defined + in an order that satisfies: + + nsDerivedSafe < nsCOMPtr + already_AddRefed < nsCOMPtr + nsCOMPtr < nsGetterAddRefs + + The other compilers probably won't complain, so please don't reorder these + classes, on pain of breaking 4.2 compatibility. + */ + + +template <class T> +class nsDerivedSafe : public T + /* + No client should ever see or have to type the name of this class. It is the + artifact that makes it a compile-time error to call |AddRef| and |Release| + on a |nsCOMPtr|. DO NOT USE THIS TYPE DIRECTLY IN YOUR CODE. + + See |nsCOMPtr::operator->|, |nsCOMPtr::operator*|, et al. + + This type should be a nested class inside |nsCOMPtr<T>|. + */ + { + private: +#ifdef HAVE_CPP_ACCESS_CHANGING_USING + using T::AddRef; + using T::Release; +#else + nsrefcnt AddRef(void); + nsrefcnt Release(void); +#endif + +#if !defined(AIX) && !defined(IRIX) + void operator delete( void*, size_t ); // NOT TO BE IMPLEMENTED + // declaring |operator delete| private makes calling delete on an interface pointer a compile error +#endif + + nsDerivedSafe<T>& operator=( const T& ); // NOT TO BE IMPLEMENTED + // you may not call |operator=()| through a dereferenced |nsCOMPtr|, because you'd get the wrong one + + /* + Compiler warnings and errors: nsDerivedSafe operator=() hides inherited operator=(). + If you see that, that means somebody checked in a [XP]COM interface class that declares an + |operator=()|, and that's _bad_. So bad, in fact, that this declaration exists explicitly + to stop people from doing it. + */ + + protected: + nsDerivedSafe(); // NOT TO BE IMPLEMENTED + /* + This ctor exists to avoid compile errors and warnings about nsDeriviedSafe using the + default ctor but inheriting classes without an empty ctor. See bug 209667. + */ + }; + +#if !defined(HAVE_CPP_ACCESS_CHANGING_USING) && defined(NEED_CPP_UNUSED_IMPLEMENTATIONS) +template <class T> +nsrefcnt +nsDerivedSafe<T>::AddRef() + { + return 0; + } + +template <class T> +nsrefcnt +nsDerivedSafe<T>::Release() + { + return 0; + } + +#endif + + + +template <class T> +struct already_AddRefed + /* + ...cooperates with |nsCOMPtr| to allow you to assign in a pointer _without_ + |AddRef|ing it. You might want to use this as a return type from a function + that produces an already |AddRef|ed pointer as a result. + + See also |getter_AddRefs()|, |dont_AddRef()|, and |class nsGetterAddRefs|. + + This type should be a nested class inside |nsCOMPtr<T>|. + + Yes, |already_AddRefed| could have been implemented as an |nsCOMPtr_helper| to + avoid adding specialized machinery to |nsCOMPtr| ... but this is the simplest + case, and perhaps worth the savings in time and space that its specific + implementation affords over the more general solution offered by + |nsCOMPtr_helper|. + */ + { + already_AddRefed( T* aRawPtr ) + : mRawPtr(aRawPtr) + { + // nothing else to do here + } + + T* get() const { return mRawPtr; } + + T* mRawPtr; + }; + +template <class T> +inline +const already_AddRefed<T> +getter_AddRefs( T* aRawPtr ) + /* + ...makes typing easier, because it deduces the template type, e.g., + you write |dont_AddRef(fooP)| instead of |already_AddRefed<IFoo>(fooP)|. + */ + { + return already_AddRefed<T>(aRawPtr); + } + +template <class T> +inline +const already_AddRefed<T> +getter_AddRefs( const already_AddRefed<T> aAlreadyAddRefedPtr ) + { + return aAlreadyAddRefedPtr; + } + +template <class T> +inline +const already_AddRefed<T> +dont_AddRef( T* aRawPtr ) + { + return already_AddRefed<T>(aRawPtr); + } + +template <class T> +inline +const already_AddRefed<T> +dont_AddRef( const already_AddRefed<T> aAlreadyAddRefedPtr ) + { + return aAlreadyAddRefedPtr; + } + + + +class nsCOMPtr_helper + /* + An |nsCOMPtr_helper| transforms commonly called getters into typesafe forms + that are more convenient to call, and more efficient to use with |nsCOMPtr|s. + Good candidates for helpers are |QueryInterface()|, |CreateInstance()|, etc. + + Here are the rules for a helper: + - it implements |operator()| to produce an interface pointer + - (except for its name) |operator()| is a valid [XP]COM `getter' + - the interface pointer that it returns is already |AddRef()|ed (as from any good getter) + - it matches the type requested with the supplied |nsIID| argument + - its constructor provides an optional |nsresult*| that |operator()| can fill + in with an error when it is executed + + See |class nsGetInterface| for an example. + */ + { + public: + virtual nsresult NS_FASTCALL operator()( const nsIID&, void** ) const = 0; + }; + +/* + |nsQueryInterface| could have been implemented as an |nsCOMPtr_helper| to + avoid adding specialized machinery in |nsCOMPtr|, But |do_QueryInterface| + is called often enough that the codesize savings are big enough to + warrant the specialcasing. +*/ + +class NS_COM_GLUE nsQueryInterface + { + public: + explicit + nsQueryInterface( nsISupports* aRawPtr ) + : mRawPtr(aRawPtr) + { + // nothing else to do here + } + + nsresult NS_FASTCALL operator()( const nsIID& aIID, void** ) const; + + private: + nsISupports* mRawPtr; + }; + +class NS_COM_GLUE nsQueryInterfaceWithError + { + public: + nsQueryInterfaceWithError( nsISupports* aRawPtr, nsresult* error ) + : mRawPtr(aRawPtr), + mErrorPtr(error) + { + // nothing else to do here + } + + nsresult NS_FASTCALL operator()( const nsIID& aIID, void** ) const; + + private: + nsISupports* mRawPtr; + nsresult* mErrorPtr; + }; + +inline +nsQueryInterface +do_QueryInterface( nsISupports* aRawPtr ) + { + return nsQueryInterface(aRawPtr); + } + +inline +nsQueryInterfaceWithError +do_QueryInterface( nsISupports* aRawPtr, nsresult* error ) + { + return nsQueryInterfaceWithError(aRawPtr, error); + } + +template <class T> +inline +void +do_QueryInterface( already_AddRefed<T>& ) + { + // This signature exists soley to _stop_ you from doing the bad thing. + // Saying |do_QueryInterface()| on a pointer that is not otherwise owned by + // someone else is an automatic leak. See <http://bugzilla.mozilla.org/show_bug.cgi?id=8221>. + } + +template <class T> +inline +void +do_QueryInterface( already_AddRefed<T>&, nsresult* ) + { + // This signature exists soley to _stop_ you from doing the bad thing. + // Saying |do_QueryInterface()| on a pointer that is not otherwise owned by + // someone else is an automatic leak. See <http://bugzilla.mozilla.org/show_bug.cgi?id=8221>. + } + + +//////////////////////////////////////////////////////////////////////////// +// Using servicemanager with COMPtrs +class NS_COM_GLUE nsGetServiceByCID +{ + public: + nsGetServiceByCID(const nsCID& aCID) + : mCID(aCID) + { + // nothing else to do + } + + nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + + private: + const nsCID& mCID; +}; + +class NS_COM_GLUE nsGetServiceByCIDWithError +{ + public: + nsGetServiceByCIDWithError( const nsCID& aCID, nsresult* aErrorPtr ) + : mCID(aCID), + mErrorPtr(aErrorPtr) + { + // nothing else to do + } + + nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + + private: + const nsCID& mCID; + nsresult* mErrorPtr; +}; + +class NS_COM_GLUE nsGetServiceByContractID +{ + public: + nsGetServiceByContractID(const char* aContractID) + : mContractID(aContractID) + { + // nothing else to do + } + + nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + + private: + const char* mContractID; +}; + +class NS_COM_GLUE nsGetServiceByContractIDWithError +{ + public: + nsGetServiceByContractIDWithError(const char* aContractID, nsresult* aErrorPtr) + : mContractID(aContractID), + mErrorPtr(aErrorPtr) + { + // nothing else to do + } + + nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + + private: + const char* mContractID; + nsresult* mErrorPtr; +}; + +class nsCOMPtr_base + /* + ...factors implementation for all template versions of |nsCOMPtr|. + + This should really be an |nsCOMPtr<nsISupports>|, but this wouldn't work + because unlike the + + Here's the way people normally do things like this + + template <class T> class Foo { ... }; + template <> class Foo<void*> { ... }; + template <class T> class Foo<T*> : private Foo<void*> { ... }; + */ + { + public: + + nsCOMPtr_base( nsISupports* rawPtr = 0 ) + : mRawPtr(rawPtr) + { + // nothing else to do here + } + + NS_COM_GLUE NS_FASTCALL ~nsCOMPtr_base(); + + NS_COM_GLUE void NS_FASTCALL assign_with_AddRef( nsISupports* ); + NS_COM_GLUE void NS_FASTCALL assign_from_qi( const nsQueryInterface, const nsIID& ); + NS_COM_GLUE void NS_FASTCALL assign_from_qi_with_error( const nsQueryInterfaceWithError&, const nsIID& ); + NS_COM_GLUE void NS_FASTCALL assign_from_gs_cid( const nsGetServiceByCID, const nsIID& ); + NS_COM_GLUE void NS_FASTCALL assign_from_gs_cid_with_error( const nsGetServiceByCIDWithError&, const nsIID& ); + NS_COM_GLUE void NS_FASTCALL assign_from_gs_contractid( const nsGetServiceByContractID, const nsIID& ); + NS_COM_GLUE void NS_FASTCALL assign_from_gs_contractid_with_error( const nsGetServiceByContractIDWithError&, const nsIID& ); + NS_COM_GLUE void NS_FASTCALL assign_from_helper( const nsCOMPtr_helper&, const nsIID& ); + NS_COM_GLUE void** NS_FASTCALL begin_assignment(); + + protected: + NS_MAY_ALIAS_PTR(nsISupports) mRawPtr; + + 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); + } + }; + +// template <class T> class nsGetterAddRefs; + +template <class T> +class nsCOMPtr +#ifdef NSCAP_FEATURE_USE_BASE + : private nsCOMPtr_base +#endif + { + +#ifdef NSCAP_FEATURE_USE_BASE + #define NSCAP_CTOR_BASE(x) nsCOMPtr_base(x) +#else + #define NSCAP_CTOR_BASE(x) mRawPtr(x) + + private: + void assign_with_AddRef( nsISupports* ); + void assign_from_qi( const nsQueryInterface, const nsIID& ); + void assign_from_qi_with_error( const nsQueryInterfaceWithError&, const nsIID& ); + void assign_from_gs_cid( const nsGetServiceByCID, const nsIID& ); + void assign_from_gs_cid_with_error( const nsGetServiceByCIDWithError&, const nsIID& ); + void assign_from_gs_contractid( const nsGetServiceByContractID, const nsIID& ); + void assign_from_gs_contractid_with_error( const nsGetServiceByContractIDWithError&, const nsIID& ); + void assign_from_helper( const nsCOMPtr_helper&, const nsIID& ); + void** begin_assignment(); + + void + assign_assuming_AddRef( T* newPtr ) + { + T* oldPtr = mRawPtr; + mRawPtr = newPtr; + NSCAP_LOG_ASSIGNMENT(this, newPtr); + NSCAP_LOG_RELEASE(this, oldPtr); + if ( oldPtr ) + NSCAP_RELEASE(this, oldPtr); + } + + private: + T* mRawPtr; +#endif + + public: + typedef T element_type; + +#ifndef NSCAP_FEATURE_USE_BASE + ~nsCOMPtr() + { + NSCAP_LOG_RELEASE(this, mRawPtr); + if ( mRawPtr ) + NSCAP_RELEASE(this, mRawPtr); + } +#endif + +#ifdef NSCAP_FEATURE_TEST_DONTQUERY_CASES + void + Assert_NoQueryNeeded() + { + if ( mRawPtr ) + { + nsCOMPtr<T> query_result( do_QueryInterface(mRawPtr) ); + NS_ASSERTION(query_result.get() == mRawPtr, "QueryInterface needed"); + } + } + + #define NSCAP_ASSERT_NO_QUERY_NEEDED() Assert_NoQueryNeeded(); +#else + #define NSCAP_ASSERT_NO_QUERY_NEEDED() +#endif + + + // Constructors + + nsCOMPtr() + : NSCAP_CTOR_BASE(0) + // default constructor + { + NSCAP_LOG_ASSIGNMENT(this, 0); + } + + nsCOMPtr( const nsCOMPtr<T>& aSmartPtr ) + : NSCAP_CTOR_BASE(aSmartPtr.mRawPtr) + // copy-constructor + { + if ( mRawPtr ) + NSCAP_ADDREF(this, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, aSmartPtr.mRawPtr); + } + + nsCOMPtr( T* aRawPtr ) + : NSCAP_CTOR_BASE(aRawPtr) + // construct from a raw pointer (of the right type) + { + if ( mRawPtr ) + NSCAP_ADDREF(this, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, aRawPtr); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + } + + nsCOMPtr( const already_AddRefed<T>& aSmartPtr ) + : NSCAP_CTOR_BASE(aSmartPtr.mRawPtr) + // construct from |dont_AddRef(expr)| + { + NSCAP_LOG_ASSIGNMENT(this, aSmartPtr.mRawPtr); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + } + + nsCOMPtr( const nsQueryInterface qi ) + : NSCAP_CTOR_BASE(0) + // construct from |do_QueryInterface(expr)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_qi(qi, NS_GET_IID(T)); + } + + nsCOMPtr( const nsQueryInterfaceWithError& qi ) + : NSCAP_CTOR_BASE(0) + // construct from |do_QueryInterface(expr, &rv)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_qi_with_error(qi, NS_GET_IID(T)); + } + + nsCOMPtr( const nsGetServiceByCID gs ) + : NSCAP_CTOR_BASE(0) + // construct from |do_GetService(cid_expr)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_gs_cid(gs, NS_GET_IID(T)); + } + + nsCOMPtr( const nsGetServiceByCIDWithError& gs ) + : NSCAP_CTOR_BASE(0) + // construct from |do_GetService(cid_expr, &rv)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_gs_cid_with_error(gs, NS_GET_IID(T)); + } + + nsCOMPtr( const nsGetServiceByContractID gs ) + : NSCAP_CTOR_BASE(0) + // construct from |do_GetService(contractid_expr)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_gs_contractid(gs, NS_GET_IID(T)); + } + + nsCOMPtr( const nsGetServiceByContractIDWithError& gs ) + : NSCAP_CTOR_BASE(0) + // construct from |do_GetService(contractid_expr, &rv)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_gs_contractid_with_error(gs, NS_GET_IID(T)); + } + + nsCOMPtr( const nsCOMPtr_helper& helper ) + : NSCAP_CTOR_BASE(0) + // ...and finally, anything else we might need to construct from + // can exploit the |nsCOMPtr_helper| facility + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_helper(helper, NS_GET_IID(T)); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + } + + + // Assignment operators + + nsCOMPtr<T>& + operator=( const nsCOMPtr<T>& rhs ) + // copy assignment operator + { + assign_with_AddRef(rhs.mRawPtr); + return *this; + } + + nsCOMPtr<T>& + operator=( T* rhs ) + // assign from a raw pointer (of the right type) + { + assign_with_AddRef(rhs); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + return *this; + } + + nsCOMPtr<T>& + operator=( const already_AddRefed<T>& rhs ) + // assign from |dont_AddRef(expr)| + { + assign_assuming_AddRef(rhs.mRawPtr); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + return *this; + } + + nsCOMPtr<T>& + operator=( const nsQueryInterface rhs ) + // assign from |do_QueryInterface(expr)| + { + assign_from_qi(rhs, NS_GET_IID(T)); + return *this; + } + + nsCOMPtr<T>& + operator=( const nsQueryInterfaceWithError& rhs ) + // assign from |do_QueryInterface(expr, &rv)| + { + assign_from_qi_with_error(rhs, NS_GET_IID(T)); + return *this; + } + + nsCOMPtr<T>& + operator=( const nsGetServiceByCID rhs ) + // assign from |do_GetService(cid_expr)| + { + assign_from_gs_cid(rhs, NS_GET_IID(T)); + return *this; + } + + nsCOMPtr<T>& + operator=( const nsGetServiceByCIDWithError& rhs ) + // assign from |do_GetService(cid_expr, &rv)| + { + assign_from_gs_cid_with_error(rhs, NS_GET_IID(T)); + return *this; + } + + nsCOMPtr<T>& + operator=( const nsGetServiceByContractID rhs ) + // assign from |do_GetService(contractid_expr)| + { + assign_from_gs_contractid(rhs, NS_GET_IID(T)); + return *this; + } + + nsCOMPtr<T>& + operator=( const nsGetServiceByContractIDWithError& rhs ) + // assign from |do_GetService(contractid_expr, &rv)| + { + assign_from_gs_contractid_with_error(rhs, NS_GET_IID(T)); + return *this; + } + + nsCOMPtr<T>& + operator=( const nsCOMPtr_helper& rhs ) + // ...and finally, anything else we might need to assign from + // can exploit the |nsCOMPtr_helper| facility. + { + assign_from_helper(rhs, NS_GET_IID(T)); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + return *this; + } + + void + swap( nsCOMPtr<T>& rhs ) + // ...exchange ownership with |rhs|; can save a pair of refcount operations + { +#ifdef NSCAP_FEATURE_USE_BASE + nsISupports* temp = rhs.mRawPtr; +#else + T* temp = rhs.mRawPtr; +#endif + NSCAP_LOG_ASSIGNMENT(&rhs, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, temp); + NSCAP_LOG_RELEASE(this, mRawPtr); + NSCAP_LOG_RELEASE(&rhs, temp); + rhs.mRawPtr = mRawPtr; + mRawPtr = temp; + // |rhs| maintains the same invariants, so we don't need to |NSCAP_ASSERT_NO_QUERY_NEEDED| + } + + void + swap( T*& rhs ) + // ...exchange ownership with |rhs|; can save a pair of refcount operations + { +#ifdef NSCAP_FEATURE_USE_BASE + nsISupports* temp = rhs; +#else + T* temp = rhs; +#endif + NSCAP_LOG_ASSIGNMENT(this, temp); + NSCAP_LOG_RELEASE(this, mRawPtr); + rhs = NS_REINTERPRET_CAST(T*, mRawPtr); + mRawPtr = temp; + NSCAP_ASSERT_NO_QUERY_NEEDED(); + } + + + // Other pointer operators + + nsDerivedSafe<T>* + get() const + /* + Prefer the implicit conversion provided automatically by |operator nsDerivedSafe<T>*() const|. + Use |get()| _only_ to resolve ambiguity. + + Returns a |nsDerivedSafe<T>*| to deny clients the use of |AddRef| and |Release|. + */ + { + return NS_REINTERPRET_CAST(nsDerivedSafe<T>*, mRawPtr); + } + + operator nsDerivedSafe<T>*() const + /* + ...makes an |nsCOMPtr| act like its underlying raw pointer type (except against |AddRef()|, |Release()|, + and |delete|) whenever it is used in a context where a raw pointer is expected. It is this operator + that makes an |nsCOMPtr| substitutable for a raw pointer. + + Prefer the implicit use of this operator to calling |get()|, except where necessary to resolve ambiguity. + */ + { + return get(); + } + + nsDerivedSafe<T>* + operator->() const + { + NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator->()."); + return get(); + } + +#ifdef CANT_RESOLVE_CPP_CONST_AMBIGUITY + // broken version for IRIX + + nsCOMPtr<T>* + get_address() const + // This is not intended to be used by clients. See |address_of| + // below. + { + return NS_CONST_CAST(nsCOMPtr<T>*, this); + } + +#else // CANT_RESOLVE_CPP_CONST_AMBIGUITY + + nsCOMPtr<T>* + get_address() + // This is not intended to be used by clients. See |address_of| + // below. + { + return this; + } + + const nsCOMPtr<T>* + get_address() const + // This is not intended to be used by clients. See |address_of| + // below. + { + return this; + } + +#endif // CANT_RESOLVE_CPP_CONST_AMBIGUITY + + public: + nsDerivedSafe<T>& + operator*() const + { + NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator*()."); + return *get(); + } + +#if 0 + private: + friend class nsGetterAddRefs<T>; +#endif + + T** + StartAssignment() + { +#ifndef NSCAP_FEATURE_INLINE_STARTASSIGNMENT + return NS_REINTERPRET_CAST(T**, begin_assignment()); +#else + assign_assuming_AddRef(0); + return NS_REINTERPRET_CAST(T**, &mRawPtr); +#endif + } + }; + + + + /* + Specializing |nsCOMPtr| for |nsISupports| allows us to use |nsCOMPtr<nsISupports>| the + same way people use |nsISupports*| and |void*|, i.e., as a `catch-all' pointer pointing + to any valid [XP]COM interface. Otherwise, an |nsCOMPtr<nsISupports>| would only be able + to point to the single [XP]COM-correct |nsISupports| instance within an object; extra + querying ensues. Clients need to be able to pass around arbitrary interface pointers, + without hassles, through intermediary code that doesn't know the exact type. + */ + +NS_SPECIALIZE_TEMPLATE +class nsCOMPtr<nsISupports> + : private nsCOMPtr_base + { + public: + typedef nsISupports element_type; + + // Constructors + + nsCOMPtr() + : nsCOMPtr_base(0) + // default constructor + { + NSCAP_LOG_ASSIGNMENT(this, 0); + } + + nsCOMPtr( const nsCOMPtr<nsISupports>& aSmartPtr ) + : nsCOMPtr_base(aSmartPtr.mRawPtr) + // copy constructor + { + if ( mRawPtr ) + NSCAP_ADDREF(this, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, aSmartPtr.mRawPtr); + } + + nsCOMPtr( nsISupports* aRawPtr ) + : nsCOMPtr_base(aRawPtr) + // construct from a raw pointer (of the right type) + { + if ( mRawPtr ) + NSCAP_ADDREF(this, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, aRawPtr); + } + + nsCOMPtr( const already_AddRefed<nsISupports>& aSmartPtr ) + : nsCOMPtr_base(aSmartPtr.mRawPtr) + // construct from |dont_AddRef(expr)| + { + NSCAP_LOG_ASSIGNMENT(this, aSmartPtr.mRawPtr); + } + + nsCOMPtr( const nsQueryInterface qi ) + : nsCOMPtr_base(0) + // assign from |do_QueryInterface(expr)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_qi(qi, NS_GET_IID(nsISupports)); + } + + nsCOMPtr( const nsQueryInterfaceWithError& qi ) + : nsCOMPtr_base(0) + // assign from |do_QueryInterface(expr, &rv)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_qi_with_error(qi, NS_GET_IID(nsISupports)); + } + + nsCOMPtr( const nsGetServiceByCID gs ) + : nsCOMPtr_base(0) + // assign from |do_GetService(cid_expr)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_gs_cid(gs, NS_GET_IID(nsISupports)); + } + + nsCOMPtr( const nsGetServiceByCIDWithError& gs ) + : nsCOMPtr_base(0) + // assign from |do_GetService(cid_expr, &rv)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_gs_cid_with_error(gs, NS_GET_IID(nsISupports)); + } + + nsCOMPtr( const nsGetServiceByContractID gs ) + : nsCOMPtr_base(0) + // assign from |do_GetService(contractid_expr)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_gs_contractid(gs, NS_GET_IID(nsISupports)); + } + + nsCOMPtr( const nsGetServiceByContractIDWithError& gs ) + : nsCOMPtr_base(0) + // assign from |do_GetService(contractid_expr, &rv)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_gs_contractid_with_error(gs, NS_GET_IID(nsISupports)); + } + + nsCOMPtr( const nsCOMPtr_helper& helper ) + : nsCOMPtr_base(0) + // ...and finally, anything else we might need to construct from + // can exploit the |nsCOMPtr_helper| facility + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_helper(helper, NS_GET_IID(nsISupports)); + } + + + // Assignment operators + + nsCOMPtr<nsISupports>& + operator=( const nsCOMPtr<nsISupports>& rhs ) + // copy assignment operator + { + assign_with_AddRef(rhs.mRawPtr); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( nsISupports* rhs ) + // assign from a raw pointer (of the right type) + { + assign_with_AddRef(rhs); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( const already_AddRefed<nsISupports>& rhs ) + // assign from |dont_AddRef(expr)| + { + assign_assuming_AddRef(rhs.mRawPtr); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( const nsQueryInterface rhs ) + // assign from |do_QueryInterface(expr)| + { + assign_from_qi(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( const nsQueryInterfaceWithError& rhs ) + // assign from |do_QueryInterface(expr, &rv)| + { + assign_from_qi_with_error(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( const nsGetServiceByCID rhs ) + // assign from |do_GetService(cid_expr)| + { + assign_from_gs_cid(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( const nsGetServiceByCIDWithError& rhs ) + // assign from |do_GetService(cid_expr, &rv)| + { + assign_from_gs_cid_with_error(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( const nsGetServiceByContractID rhs ) + // assign from |do_GetService(contractid_expr)| + { + assign_from_gs_contractid(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( const nsGetServiceByContractIDWithError& rhs ) + // assign from |do_GetService(contractid_expr, &rv)| + { + assign_from_gs_contractid_with_error(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + nsCOMPtr<nsISupports>& + operator=( const nsCOMPtr_helper& rhs ) + // ...and finally, anything else we might need to assign from + // can exploit the |nsCOMPtr_helper| facility. + { + assign_from_helper(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + void + swap( nsCOMPtr<nsISupports>& rhs ) + // ...exchange ownership with |rhs|; can save a pair of refcount operations + { + nsISupports* temp = rhs.mRawPtr; + NSCAP_LOG_ASSIGNMENT(&rhs, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, temp); + NSCAP_LOG_RELEASE(this, mRawPtr); + NSCAP_LOG_RELEASE(&rhs, temp); + rhs.mRawPtr = mRawPtr; + mRawPtr = temp; + } + + void + swap( nsISupports*& rhs ) + // ...exchange ownership with |rhs|; can save a pair of refcount operations + { + nsISupports* temp = rhs; + NSCAP_LOG_ASSIGNMENT(this, temp); + NSCAP_LOG_RELEASE(this, mRawPtr); + rhs = mRawPtr; + mRawPtr = temp; + } + + + // Other pointer operators + + nsDerivedSafe<nsISupports>* + get() const + /* + Prefer the implicit conversion provided automatically by |operator nsDerivedSafe<nsISupports>*() const|. + Use |get()| _only_ to resolve ambiguity. + + Returns a |nsDerivedSafe<nsISupports>*| to deny clients the use of |AddRef| and |Release|. + */ + { + return NS_REINTERPRET_CAST(nsDerivedSafe<nsISupports>*, mRawPtr); + } + + operator nsDerivedSafe<nsISupports>*() const + /* + ...makes an |nsCOMPtr| act like its underlying raw pointer type (except against |AddRef()|, |Release()|, + and |delete|) whenever it is used in a context where a raw pointer is expected. It is this operator + that makes an |nsCOMPtr| substitutable for a raw pointer. + + Prefer the implicit use of this operator to calling |get()|, except where necessary to resolve ambiguity. + */ + { + return get(); + } + + nsDerivedSafe<nsISupports>* + operator->() const + { + NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator->()."); + return get(); + } + +#ifdef CANT_RESOLVE_CPP_CONST_AMBIGUITY + // broken version for IRIX + + nsCOMPtr<nsISupports>* + get_address() const + // This is not intended to be used by clients. See |address_of| + // below. + { + return NS_CONST_CAST(nsCOMPtr<nsISupports>*, this); + } + +#else // CANT_RESOLVE_CPP_CONST_AMBIGUITY + + nsCOMPtr<nsISupports>* + get_address() + // This is not intended to be used by clients. See |address_of| + // below. + { + return this; + } + + const nsCOMPtr<nsISupports>* + get_address() const + // This is not intended to be used by clients. See |address_of| + // below. + { + return this; + } + +#endif // CANT_RESOLVE_CPP_CONST_AMBIGUITY + + public: + + nsDerivedSafe<nsISupports>& + operator*() const + { + NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator*()."); + return *get(); + } + +#if 0 + private: + friend class nsGetterAddRefs<nsISupports>; +#endif + + nsISupports** + StartAssignment() + { +#ifndef NSCAP_FEATURE_INLINE_STARTASSIGNMENT + return NS_REINTERPRET_CAST(nsISupports**, begin_assignment()); +#else + assign_assuming_AddRef(0); + return NS_REINTERPRET_CAST(nsISupports**, &mRawPtr); +#endif + } + }; + +#ifndef NSCAP_FEATURE_USE_BASE +template <class T> +void +nsCOMPtr<T>::assign_with_AddRef( nsISupports* rawPtr ) + { + if ( rawPtr ) + NSCAP_ADDREF(this, rawPtr); + assign_assuming_AddRef(NS_REINTERPRET_CAST(T*, rawPtr)); + } + +template <class T> +void +nsCOMPtr<T>::assign_from_qi( const nsQueryInterface qi, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( qi(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template <class T> +void +nsCOMPtr<T>::assign_from_qi_with_error( const nsQueryInterfaceWithError& qi, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( qi(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template <class T> +void +nsCOMPtr<T>::assign_from_gs_cid( const nsGetServiceByCID gs, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( gs(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template <class T> +void +nsCOMPtr<T>::assign_from_gs_cid_with_error( const nsGetServiceByCIDWithError& gs, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( gs(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template <class T> +void +nsCOMPtr<T>::assign_from_gs_contractid( const nsGetServiceByContractID gs, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( gs(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template <class T> +void +nsCOMPtr<T>::assign_from_gs_contractid_with_error( const nsGetServiceByContractIDWithError& gs, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( gs(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template <class T> +void +nsCOMPtr<T>::assign_from_helper( const nsCOMPtr_helper& helper, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( helper(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template <class T> +void** +nsCOMPtr<T>::begin_assignment() + { + assign_assuming_AddRef(0); + return NS_REINTERPRET_CAST(void**, &mRawPtr); + } +#endif + +#ifdef CANT_RESOLVE_CPP_CONST_AMBIGUITY + +// This is the broken version for IRIX, which can't handle the version below. + +template <class T> +inline +nsCOMPtr<T>* +address_of( const nsCOMPtr<T>& aPtr ) + { + return aPtr.get_address(); + } + +#else // CANT_RESOLVE_CPP_CONST_AMBIGUITY + +template <class T> +inline +nsCOMPtr<T>* +address_of( nsCOMPtr<T>& aPtr ) + { + return aPtr.get_address(); + } + +template <class T> +inline +const nsCOMPtr<T>* +address_of( const nsCOMPtr<T>& aPtr ) + { + return aPtr.get_address(); + } + +#endif // CANT_RESOLVE_CPP_CONST_AMBIGUITY + +template <class T> +class nsGetterAddRefs + /* + ... + + This class is designed to be used for anonymous temporary objects in the + argument list of calls that return COM interface pointers, e.g., + + nsCOMPtr<IFoo> fooP; + ...->QueryInterface(iid, getter_AddRefs(fooP)) + + DO NOT USE THIS TYPE DIRECTLY IN YOUR CODE. Use |getter_AddRefs()| instead. + + When initialized with a |nsCOMPtr|, as in the example above, it returns + a |void**|, a |T**|, or an |nsISupports**| as needed, that the outer call (|QueryInterface| in this + case) can fill in. + + This type should be a nested class inside |nsCOMPtr<T>|. + */ + { + public: + explicit + nsGetterAddRefs( nsCOMPtr<T>& aSmartPtr ) + : mTargetSmartPtr(aSmartPtr) + { + // nothing else to do + } + +#if defined(NSCAP_FEATURE_TEST_DONTQUERY_CASES) || defined(NSCAP_LOG_EXTERNAL_ASSIGNMENT) + ~nsGetterAddRefs() + { +#ifdef NSCAP_LOG_EXTERNAL_ASSIGNMENT + NSCAP_LOG_ASSIGNMENT(NS_REINTERPRET_CAST(void *, address_of(mTargetSmartPtr)), mTargetSmartPtr.get()); +#endif + +#ifdef NSCAP_FEATURE_TEST_DONTQUERY_CASES + mTargetSmartPtr.Assert_NoQueryNeeded(); +#endif + } +#endif + + operator void**() + { + return NS_REINTERPRET_CAST(void**, mTargetSmartPtr.StartAssignment()); + } + + operator nsISupports**() + { + return NS_REINTERPRET_CAST(nsISupports**, mTargetSmartPtr.StartAssignment()); + } + + operator T**() + { + return mTargetSmartPtr.StartAssignment(); + } + + T*& + operator*() + { + return *(mTargetSmartPtr.StartAssignment()); + } + + private: + nsCOMPtr<T>& mTargetSmartPtr; + }; + + +NS_SPECIALIZE_TEMPLATE +class nsGetterAddRefs<nsISupports> + { + public: + explicit + nsGetterAddRefs( nsCOMPtr<nsISupports>& aSmartPtr ) + : mTargetSmartPtr(aSmartPtr) + { + // nothing else to do + } + +#ifdef NSCAP_LOG_EXTERNAL_ASSIGNMENT + ~nsGetterAddRefs() + { + NSCAP_LOG_ASSIGNMENT(NS_REINTERPRET_CAST(void *, address_of(mTargetSmartPtr)), mTargetSmartPtr.get()); + } +#endif + + operator void**() + { + return NS_REINTERPRET_CAST(void**, mTargetSmartPtr.StartAssignment()); + } + + operator nsISupports**() + { + return mTargetSmartPtr.StartAssignment(); + } + + nsISupports*& + operator*() + { + return *(mTargetSmartPtr.StartAssignment()); + } + + private: + nsCOMPtr<nsISupports>& mTargetSmartPtr; + }; + + +template <class T> +inline +nsGetterAddRefs<T> +getter_AddRefs( nsCOMPtr<T>& aSmartPtr ) + /* + Used around a |nsCOMPtr| when + ...makes the class |nsGetterAddRefs<T>| invisible. + */ + { + return nsGetterAddRefs<T>(aSmartPtr); + } + + + + // Comparing two |nsCOMPtr|s + +template <class T, class U> +inline +NSCAP_BOOL +operator==( const nsCOMPtr<T>& lhs, const nsCOMPtr<U>& rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) == NS_STATIC_CAST(const U*, rhs.get()); + } + + +template <class T, class U> +inline +NSCAP_BOOL +operator!=( const nsCOMPtr<T>& lhs, const nsCOMPtr<U>& rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) != NS_STATIC_CAST(const U*, rhs.get()); + } + + + // Comparing an |nsCOMPtr| to a raw pointer + +template <class T, class U> +inline +NSCAP_BOOL +operator==( const nsCOMPtr<T>& lhs, const U* rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) == rhs; + } + +template <class T, class U> +inline +NSCAP_BOOL +operator==( const U* lhs, const nsCOMPtr<T>& rhs ) + { + return lhs == NS_STATIC_CAST(const T*, rhs.get()); + } + +template <class T, class U> +inline +NSCAP_BOOL +operator!=( const nsCOMPtr<T>& lhs, const U* rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) != rhs; + } + +template <class T, class U> +inline +NSCAP_BOOL +operator!=( const U* lhs, const nsCOMPtr<T>& rhs ) + { + return lhs != NS_STATIC_CAST(const T*, rhs.get()); + } + + // To avoid ambiguities caused by the presence of builtin |operator==|s + // creating a situation where one of the |operator==| defined above + // has a better conversion for one argument and the builtin has a + // better conversion for the other argument, define additional + // |operator==| without the |const| on the raw pointer. + // See bug 65664 for details. + +// This is defined by an autoconf test, but VC++ also has a bug that +// prevents us from using these. (It also, fortunately, has the bug +// that we don't need them either.) +#if defined(_MSC_VER) && (_MSC_VER < 1310) +#ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ +#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ +#endif +#endif + +#ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ +template <class T, class U> +inline +NSCAP_BOOL +operator==( const nsCOMPtr<T>& lhs, U* rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) == NS_CONST_CAST(const U*, rhs); + } + +template <class T, class U> +inline +NSCAP_BOOL +operator==( U* lhs, const nsCOMPtr<T>& rhs ) + { + return NS_CONST_CAST(const U*, lhs) == NS_STATIC_CAST(const T*, rhs.get()); + } + +template <class T, class U> +inline +NSCAP_BOOL +operator!=( const nsCOMPtr<T>& lhs, U* rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) != NS_CONST_CAST(const U*, rhs); + } + +template <class T, class U> +inline +NSCAP_BOOL +operator!=( U* lhs, const nsCOMPtr<T>& rhs ) + { + return NS_CONST_CAST(const U*, lhs) != NS_STATIC_CAST(const T*, rhs.get()); + } +#endif + + + + // Comparing an |nsCOMPtr| to |0| + +class NSCAP_Zero; + +template <class T> +inline +NSCAP_BOOL +operator==( const nsCOMPtr<T>& lhs, NSCAP_Zero* rhs ) + // specifically to allow |smartPtr == 0| + { + return NS_STATIC_CAST(const void*, lhs.get()) == NS_REINTERPRET_CAST(const void*, rhs); + } + +template <class T> +inline +NSCAP_BOOL +operator==( NSCAP_Zero* lhs, const nsCOMPtr<T>& rhs ) + // specifically to allow |0 == smartPtr| + { + return NS_REINTERPRET_CAST(const void*, lhs) == NS_STATIC_CAST(const void*, rhs.get()); + } + +template <class T> +inline +NSCAP_BOOL +operator!=( const nsCOMPtr<T>& lhs, NSCAP_Zero* rhs ) + // specifically to allow |smartPtr != 0| + { + return NS_STATIC_CAST(const void*, lhs.get()) != NS_REINTERPRET_CAST(const void*, rhs); + } + +template <class T> +inline +NSCAP_BOOL +operator!=( NSCAP_Zero* lhs, const nsCOMPtr<T>& rhs ) + // specifically to allow |0 != smartPtr| + { + return NS_REINTERPRET_CAST(const void*, lhs) != NS_STATIC_CAST(const void*, rhs.get()); + } + + +#ifdef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO + + // We need to explicitly define comparison operators for `int' + // because the compiler is lame. + +template <class T> +inline +NSCAP_BOOL +operator==( const nsCOMPtr<T>& lhs, int rhs ) + // specifically to allow |smartPtr == 0| + { + return NS_STATIC_CAST(const void*, lhs.get()) == NS_REINTERPRET_CAST(const void*, rhs); + } + +template <class T> +inline +NSCAP_BOOL +operator==( int lhs, const nsCOMPtr<T>& rhs ) + // specifically to allow |0 == smartPtr| + { + return NS_REINTERPRET_CAST(const void*, lhs) == NS_STATIC_CAST(const void*, rhs.get()); + } + +#endif // !defined(HAVE_CPP_TROUBLE_COMPARING_TO_ZERO) + + // Comparing any two [XP]COM objects for identity + +inline +NSCAP_BOOL +SameCOMIdentity( nsISupports* lhs, nsISupports* rhs ) + { + return nsCOMPtr<nsISupports>( do_QueryInterface(lhs) ) == nsCOMPtr<nsISupports>( do_QueryInterface(rhs) ); + } + + + +template <class SourceType, class DestinationType> +inline +nsresult +CallQueryInterface( nsCOMPtr<SourceType>& aSourcePtr, DestinationType** aDestPtr ) + { + return CallQueryInterface(aSourcePtr.get(), aDestPtr); + } + +#endif // !defined(nsCOMPtr_h___) diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsComponentManagerUtils.h b/Src/nprt_plugin/gecko/1.8/win/include/nsComponentManagerUtils.h new file mode 100644 index 00000000..e55accfe --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsComponentManagerUtils.h @@ -0,0 +1,336 @@ +/* -*- 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 mozilla.org Code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsComponentManagerUtils_h__ +#define nsComponentManagerUtils_h__ + +#ifndef nscore_h__ +#include "nscore.h" +#endif + +#ifndef nsCOMPtr_h__ +#include "nsCOMPtr.h" +#endif + +#include "nsIFactory.h" + + +NS_COM_GLUE nsresult +CallCreateInstance + (const nsCID &aClass, nsISupports *aDelegate, const nsIID &aIID, + void **aResult); + +NS_COM_GLUE nsresult +CallCreateInstance + (const char *aContractID, nsISupports *aDelegate, const nsIID &aIID, + void **aResult); + +NS_COM_GLUE nsresult +CallGetClassObject + (const nsCID &aClass, const nsIID &aIID, void **aResult); + +NS_COM_GLUE nsresult +CallGetClassObject + (const char *aContractID, const nsIID &aIID, void **aResult); + + +class NS_COM_GLUE nsCreateInstanceByCID : public nsCOMPtr_helper +{ +public: + nsCreateInstanceByCID( const nsCID& aCID, nsISupports* aOuter, nsresult* aErrorPtr ) + : mCID(aCID), + mOuter(aOuter), + mErrorPtr(aErrorPtr) + { + // nothing else to do here + } + + virtual nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + +private: + const nsCID& mCID; + nsISupports* mOuter; + nsresult* mErrorPtr; +}; + +class NS_COM_GLUE nsCreateInstanceByContractID : public nsCOMPtr_helper +{ +public: + nsCreateInstanceByContractID( const char* aContractID, nsISupports* aOuter, nsresult* aErrorPtr ) + : mContractID(aContractID), + mOuter(aOuter), + mErrorPtr(aErrorPtr) + { + // nothing else to do here + } + + virtual nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + +private: + const char* mContractID; + nsISupports* mOuter; + nsresult* mErrorPtr; +}; + +class NS_COM_GLUE nsCreateInstanceFromFactory : public nsCOMPtr_helper +{ +public: + nsCreateInstanceFromFactory( nsIFactory* aFactory, nsISupports* aOuter, nsresult* aErrorPtr ) + : mFactory(aFactory), + mOuter(aOuter), + mErrorPtr(aErrorPtr) + { + // nothing else to do here + } + + virtual nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + +private: + nsIFactory* mFactory; + nsISupports* mOuter; + nsresult* mErrorPtr; +}; + + +inline +const nsCreateInstanceByCID +do_CreateInstance( const nsCID& aCID, nsresult* error = 0 ) +{ + return nsCreateInstanceByCID(aCID, 0, error); +} + +inline +const nsCreateInstanceByCID +do_CreateInstance( const nsCID& aCID, nsISupports* aOuter, nsresult* error = 0 ) +{ + return nsCreateInstanceByCID(aCID, aOuter, error); +} + +inline +const nsCreateInstanceByContractID +do_CreateInstance( const char* aContractID, nsresult* error = 0 ) +{ + return nsCreateInstanceByContractID(aContractID, 0, error); +} + +inline +const nsCreateInstanceByContractID +do_CreateInstance( const char* aContractID, nsISupports* aOuter, nsresult* error = 0 ) +{ + return nsCreateInstanceByContractID(aContractID, aOuter, error); +} + +inline +const nsCreateInstanceFromFactory +do_CreateInstance( nsIFactory* aFactory, nsresult* error = 0 ) +{ + return nsCreateInstanceFromFactory(aFactory, 0, error); +} + +inline +const nsCreateInstanceFromFactory +do_CreateInstance( nsIFactory* aFactory, nsISupports* aOuter, nsresult* error = 0 ) +{ + return nsCreateInstanceFromFactory(aFactory, aOuter, error); +} + + +class NS_COM_GLUE nsGetClassObjectByCID : public nsCOMPtr_helper +{ +public: + nsGetClassObjectByCID( const nsCID& aCID, nsresult* aErrorPtr ) + : mCID(aCID), + mErrorPtr(aErrorPtr) + { + // nothing else to do here + } + + virtual nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + +private: + const nsCID& mCID; + nsresult* mErrorPtr; +}; + +class NS_COM_GLUE nsGetClassObjectByContractID : public nsCOMPtr_helper +{ +public: + nsGetClassObjectByContractID( const char* aContractID, nsresult* aErrorPtr ) + : mContractID(aContractID), + mErrorPtr(aErrorPtr) + { + // nothing else to do here + } + + virtual nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + +private: + const char* mContractID; + nsresult* mErrorPtr; +}; + +/** + * do_GetClassObject can be used to improve performance of callers + * that call |CreateInstance| many times. They can cache the factory + * and call do_CreateInstance or CallCreateInstance with the cached + * factory rather than having the component manager retrieve it every + * time. + */ +inline const nsGetClassObjectByCID +do_GetClassObject( const nsCID& aCID, nsresult* error = 0 ) +{ + return nsGetClassObjectByCID(aCID, error); +} + +inline const nsGetClassObjectByContractID +do_GetClassObject( const char* aContractID, nsresult* error = 0 ) +{ + return nsGetClassObjectByContractID(aContractID, error); +} + +// type-safe shortcuts for calling |CreateInstance| +template <class DestinationType> +inline +nsresult +CallCreateInstance( const nsCID &aClass, + nsISupports *aDelegate, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + return CallCreateInstance(aClass, aDelegate, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template <class DestinationType> +inline +nsresult +CallCreateInstance( const nsCID &aClass, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + return CallCreateInstance(aClass, nsnull, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template <class DestinationType> +inline +nsresult +CallCreateInstance( const char *aContractID, + nsISupports *aDelegate, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aContractID, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return CallCreateInstance(aContractID, + aDelegate, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template <class DestinationType> +inline +nsresult +CallCreateInstance( const char *aContractID, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aContractID, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return CallCreateInstance(aContractID, nsnull, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template <class DestinationType> +inline +nsresult +CallCreateInstance( nsIFactory *aFactory, + nsISupports *aDelegate, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aFactory, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return aFactory->CreateInstance(aDelegate, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template <class DestinationType> +inline +nsresult +CallCreateInstance( nsIFactory *aFactory, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aFactory, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return aFactory->CreateInstance(nsnull, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template <class DestinationType> +inline +nsresult +CallGetClassObject( const nsCID &aClass, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + return CallGetClassObject(aClass, + NS_GET_IID(DestinationType), NS_REINTERPRET_CAST(void**, aDestination)); +} + +template <class DestinationType> +inline +nsresult +CallGetClassObject( const char* aContractID, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + return CallGetClassObject(aContractID, + NS_GET_IID(DestinationType), NS_REINTERPRET_CAST(void**, aDestination)); +} + +#endif /* nsComponentManagerUtils_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsDebug.h b/Src/nprt_plugin/gecko/1.8/win/include/nsDebug.h new file mode 100644 index 00000000..52dd7569 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsDebug.h @@ -0,0 +1,279 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsDebug_h___ +#define nsDebug_h___ + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +#ifndef nsError_h__ +#include "nsError.h" +#endif + +#ifdef DEBUG +#define NS_DEBUG +#endif + +/** + * Namespace for debugging methods. Note that your code must use the + * macros defined later in this file so that the debug code can be + * conditionally compiled out. + */ + +PR_BEGIN_EXTERN_C + +/** + * Log a warning message to the debug log. + */ +NS_COM_GLUE void NS_FASTCALL +NSGlue_Warning(const char *aMessage, const char *aFile, PRIntn aLine); + +/** + * Abort the executing program. This works on all architectures. + */ +NS_COM_GLUE void NS_FASTCALL +NSGlue_Abort(const char *aFile, PRIntn aLine); + +/** + * Break the executing program into the debugger. + */ +NS_COM_GLUE void NS_FASTCALL +NSGlue_Break(const char* aFile, PRIntn aLine); + +/** + * Log an assertion message to the debug log + */ +NS_COM_GLUE void NS_FASTCALL +NSGlue_Assertion(const char* aStr, const char* aExpr, + const char* aFile, PRIntn aLine); + +PR_END_EXTERN_C + +#ifdef DEBUG + +/** + * Abort the execution of the program if the expression evaluates to + * false. + * + * There is no status value returned from the macro. + * + * Note that the non-debug version of this macro does <b>not</b> + * evaluate the expression argument. Hence side effect statements + * as arguments to the macro will yield improper execution in a + * non-debug build. For example: + * + * NS_ABORT_IF_FALSE(0 == foo++, "yikes foo should be zero"); + * + * Note also that the non-debug version of this macro does <b>not</b> + * evaluate the message argument. + */ +#define NS_ABORT_IF_FALSE(_expr, _msg) \ + PR_BEGIN_MACRO \ + if (!(_expr)) { \ + NSGlue_Assertion(_msg, #_expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * Warn if a given condition is false. + * + * Program execution continues past the usage of this macro. + * + * Note also that the non-debug version of this macro does <b>not</b> + * evaluate the message argument. + */ +#define NS_WARN_IF_FALSE(_expr,_msg) \ + PR_BEGIN_MACRO \ + if (!(_expr)) { \ + NSGlue_Assertion(_msg, #_expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * Test a precondition for truth. If the expression is not true then + * trigger a program failure. + */ +#define NS_PRECONDITION(expr, str) \ + PR_BEGIN_MACRO \ + if (!(expr)) { \ + NSGlue_Assertion(str, #expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * Test an assertion for truth. If the expression is not true then + * trigger a program failure. + */ +#define NS_ASSERTION(expr, str) \ + PR_BEGIN_MACRO \ + if (!(expr)) { \ + NSGlue_Assertion(str, #expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * Test a post-condition for truth. If the expression is not true then + * trigger a program failure. + */ +#define NS_POSTCONDITION(expr, str) \ + PR_BEGIN_MACRO \ + if (!(expr)) { \ + NSGlue_Assertion(str, #expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * This macros triggers a program failure if executed. It indicates that + * an attempt was made to execute some unimplemented functionality. + */ +#define NS_NOTYETIMPLEMENTED(str) \ + NSGlue_Assertion(str, "NotYetImplemented", __FILE__, __LINE__) + +/** + * This macros triggers a program failure if executed. It indicates that + * an attempt was made to execute some unimplemented functionality. + */ +#define NS_NOTREACHED(str) \ + NSGlue_Assertion(str, "Not Reached", __FILE__, __LINE__) + +/** + * Log an error message. + */ +#define NS_ERROR(str) \ + NSGlue_Assertion(str, "Error", __FILE__, __LINE__) + +/** + * Log a warning message. + */ +#define NS_WARNING(str) \ + NSGlue_Warning(str, __FILE__, __LINE__) + +/** + * Trigger an abort + */ +#define NS_ABORT() \ + NSGlue_Abort(__FILE__, __LINE__) + +/** + * Cause a break + */ +#define NS_BREAK() \ + NSGlue_Break(__FILE__, __LINE__) + +#else /* NS_DEBUG */ + +/** + * The non-debug version of these macros do not evaluate the + * expression or the message arguments to the macro. + */ +#define NS_ABORT_IF_FALSE(_expr, _msg) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_WARN_IF_FALSE(_expr, _msg) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_PRECONDITION(expr, str) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_ASSERTION(expr, str) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_POSTCONDITION(expr, str) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_NOTYETIMPLEMENTED(str) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_NOTREACHED(str) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_ERROR(str) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_WARNING(str) PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_ABORT() PR_BEGIN_MACRO /* nothing */ PR_END_MACRO +#define NS_BREAK() PR_BEGIN_MACRO /* nothing */ PR_END_MACRO + +#endif /* ! NS_DEBUG */ + +/* Macros for checking the trueness of an expression passed in within an + * interface implementation. These need to be compiled regardless of the */ +/* NS_DEBUG flag +******************************************************************************/ + +#define NS_ENSURE_TRUE(x, ret) \ + PR_BEGIN_MACRO \ + if (NS_UNLIKELY(!(x))) { \ + NS_WARNING("NS_ENSURE_TRUE(" #x ") failed"); \ + return ret; \ + } \ + PR_END_MACRO + +#define NS_ENSURE_FALSE(x, ret) \ + NS_ENSURE_TRUE(!(x), ret) + +/****************************************************************************** +** Macros for checking results +******************************************************************************/ + +#define NS_ENSURE_SUCCESS(res, ret) \ + NS_ENSURE_TRUE(NS_SUCCEEDED(res), ret) + +/****************************************************************************** +** Macros for checking state and arguments upon entering interface boundaries +******************************************************************************/ + +#define NS_ENSURE_ARG(arg) \ + NS_ENSURE_TRUE(arg, NS_ERROR_INVALID_ARG) + +#define NS_ENSURE_ARG_POINTER(arg) \ + NS_ENSURE_TRUE(arg, NS_ERROR_INVALID_POINTER) + +#define NS_ENSURE_ARG_MIN(arg, min) \ + NS_ENSURE_TRUE((arg) >= min, NS_ERROR_INVALID_ARG) + +#define NS_ENSURE_ARG_MAX(arg, max) \ + NS_ENSURE_TRUE((arg) <= max, NS_ERROR_INVALID_ARG) + +#define NS_ENSURE_ARG_RANGE(arg, min, max) \ + NS_ENSURE_TRUE(((arg) >= min) && ((arg) <= max), NS_ERROR_INVALID_ARG) + +#define NS_ENSURE_STATE(state) \ + NS_ENSURE_TRUE(state, NS_ERROR_UNEXPECTED) + +#define NS_ENSURE_NO_AGGREGATION(outer) \ + NS_ENSURE_FALSE(outer, NS_ERROR_NO_AGGREGATION) + +#define NS_ENSURE_PROPER_AGGREGATION(outer, iid) \ + NS_ENSURE_FALSE(outer && !iid.Equals(NS_GET_IID(nsISupports)), NS_ERROR_INVALID_ARG) + +/*****************************************************************************/ + +#ifdef XPCOM_GLUE +#define NS_CheckThreadSafe +#else +#define NS_CheckThreadSafe(owningThread, msg) \ + NS_ASSERTION(owningThread == PR_GetCurrentThread(), msg) +#endif + +#endif /* nsDebug_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsDirectoryServiceDefs.h b/Src/nprt_plugin/gecko/1.8/win/include/nsDirectoryServiceDefs.h new file mode 100644 index 00000000..de28282c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsDirectoryServiceDefs.h @@ -0,0 +1,204 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Conrad Carlen conrad@ingress.com + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +/** + * Defines the property names for directories available from + * nsIDirectoryService. These dirs are always available even if no + * nsIDirectoryServiceProviders have been registered with the service. + * Application level keys are defined in nsAppDirectoryServiceDefs.h. + * + * Keys whose definition ends in "DIR" or "FILE" return a single nsIFile (or + * subclass). Keys whose definition ends in "LIST" return an nsISimpleEnumerator + * which enumerates a list of file objects. + * + * Defines listed in this file are FROZEN. This list may grow. + */ + +#ifndef nsDirectoryServiceDefs_h___ +#define nsDirectoryServiceDefs_h___ + +/* General OS specific locations */ + +#define NS_OS_HOME_DIR "Home" +#define NS_OS_TEMP_DIR "TmpD" +#define NS_OS_CURRENT_WORKING_DIR "CurWorkD" +/* Files stored in this directory will appear on the user's desktop, + * if there is one, otherwise it's just the same as "Home" + */ +#define NS_OS_DESKTOP_DIR "Desk" + +/* Property returns the directory in which the procces was started from. + * On Unix this will be the path in the MOZILLA_FIVE_HOME env var and if + * unset will be the current working directory. + */ +#define NS_OS_CURRENT_PROCESS_DIR "CurProcD" + +/* This location is similar to NS_OS_CURRENT_PROCESS_DIR, however, + * NS_XPCOM_CURRENT_PROCESS_DIR can be overriden by passing a "bin + * directory" to NS_InitXPCOM2(). + */ +#define NS_XPCOM_CURRENT_PROCESS_DIR "XCurProcD" + +/* Property will return the location of the application components + * directory. By default, this directory will be contained in the + * NS_XPCOM_CURRENT_PROCESS_DIR. + */ +#define NS_XPCOM_COMPONENT_DIR "ComsD" + +/* Property will return a list of components directories that will + * will be registered after the application components directory. + */ +#define NS_XPCOM_COMPONENT_DIR_LIST "ComsDL" + +/* Property will return the location of the application components + * registry file. + */ +#define NS_XPCOM_COMPONENT_REGISTRY_FILE "ComRegF" + +/* Property will return the location of the application XPTI + * registry file. + */ +#define NS_XPCOM_XPTI_REGISTRY_FILE "XptiRegF" + +/* Property will return the location of the the XPCOM Shared Library. + */ +#define NS_XPCOM_LIBRARY_FILE "XpcomLib" + +/* Property will return the current location of the the GRE directory. + * If no GRE is used, this propery will behave like + * NS_XPCOM_CURRENT_PROCESS_DIR. + */ +#define NS_GRE_DIR "GreD" + +/* Property will return the current location of the the GRE component + * directory. If no GRE is used, this propery will behave like + * NS_XPCOM_COMPONENT_DIR. + */ +#define NS_GRE_COMPONENT_DIR "GreComsD" + + +/* Platform Specific Locations */ + +#if !defined (XP_UNIX) || defined(XP_MACOSX) + #define NS_OS_SYSTEM_DIR "SysD" +#endif + +#if defined (XP_MACOSX) + #define NS_MAC_DESKTOP_DIR NS_OS_DESKTOP_DIR + #define NS_MAC_TRASH_DIR "Trsh" + #define NS_MAC_STARTUP_DIR "Strt" + #define NS_MAC_SHUTDOWN_DIR "Shdwn" + #define NS_MAC_APPLE_MENU_DIR "ApplMenu" + #define NS_MAC_CONTROL_PANELS_DIR "CntlPnl" + #define NS_MAC_EXTENSIONS_DIR "Exts" + #define NS_MAC_FONTS_DIR "Fnts" + #define NS_MAC_PREFS_DIR "Prfs" + #define NS_MAC_DOCUMENTS_DIR "Docs" + #define NS_MAC_INTERNET_SEARCH_DIR "ISrch" + #define NS_OSX_HOME_DIR NS_OS_HOME_DIR + #define NS_MAC_HOME_DIR NS_OS_HOME_DIR + #define NS_MAC_DEFAULT_DOWNLOAD_DIR "DfltDwnld" + #define NS_MAC_USER_LIB_DIR "ULibDir" // Only available under OS X + #define NS_OSX_DEFAULT_DOWNLOAD_DIR NS_MAC_DEFAULT_DOWNLOAD_DIR + #define NS_OSX_USER_DESKTOP_DIR "UsrDsk" + #define NS_OSX_LOCAL_DESKTOP_DIR "LocDsk" + #define NS_OSX_USER_APPLICATIONS_DIR "UsrApp" + #define NS_OSX_LOCAL_APPLICATIONS_DIR "LocApp" + #define NS_OSX_USER_DOCUMENTS_DIR "UsrDocs" + #define NS_OSX_LOCAL_DOCUMENTS_DIR "LocDocs" + #define NS_OSX_USER_INTERNET_PLUGIN_DIR "UsrIntrntPlgn" + #define NS_OSX_LOCAL_INTERNET_PLUGIN_DIR "LoclIntrntPlgn" + #define NS_OSX_USER_FRAMEWORKS_DIR "UsrFrmwrks" + #define NS_OSX_LOCAL_FRAMEWORKS_DIR "LocFrmwrks" + #define NS_OSX_USER_PREFERENCES_DIR "UsrPrfs" + #define NS_OSX_LOCAL_PREFERENCES_DIR "LocPrfs" + #define NS_OSX_PICTURE_DOCUMENTS_DIR "Pct" + #define NS_OSX_MOVIE_DOCUMENTS_DIR "Mov" + #define NS_OSX_MUSIC_DOCUMENTS_DIR "Music" + #define NS_OSX_INTERNET_SITES_DIR "IntrntSts" +#elif defined (XP_WIN) + #define NS_WIN_WINDOWS_DIR "WinD" + #define NS_WIN_PROGRAM_FILES_DIR "ProgF" + #define NS_WIN_HOME_DIR NS_OS_HOME_DIR + #define NS_WIN_DESKTOP_DIR "DeskV" // virtual folder at the root of the namespace + #define NS_WIN_PROGRAMS_DIR "Progs" // User start menu programs directory! + #define NS_WIN_CONTROLS_DIR "Cntls" + #define NS_WIN_PRINTERS_DIR "Prnts" + #define NS_WIN_PERSONAL_DIR "Pers" + #define NS_WIN_FAVORITES_DIR "Favs" + #define NS_WIN_STARTUP_DIR "Strt" + #define NS_WIN_RECENT_DIR "Rcnt" + #define NS_WIN_SEND_TO_DIR "SndTo" + #define NS_WIN_BITBUCKET_DIR "Buckt" + #define NS_WIN_STARTMENU_DIR "Strt" +// This gives the same thing as NS_OS_DESKTOP_DIR + #define NS_WIN_DESKTOP_DIRECTORY "DeskP" // file sys dir which physically stores objects on desktop + #define NS_WIN_DRIVES_DIR "Drivs" + #define NS_WIN_NETWORK_DIR "NetW" + #define NS_WIN_NETHOOD_DIR "netH" + #define NS_WIN_FONTS_DIR "Fnts" + #define NS_WIN_TEMPLATES_DIR "Tmpls" + #define NS_WIN_COMMON_STARTMENU_DIR "CmStrt" + #define NS_WIN_COMMON_PROGRAMS_DIR "CmPrgs" + #define NS_WIN_COMMON_STARTUP_DIR "CmStrt" + #define NS_WIN_COMMON_DESKTOP_DIRECTORY "CmDeskP" + #define NS_WIN_APPDATA_DIR "AppData" + #define NS_WIN_LOCAL_APPDATA_DIR "LocalAppData" + #define NS_WIN_PRINTHOOD "PrntHd" + #define NS_WIN_COOKIES_DIR "CookD" +#elif defined (XP_UNIX) + #define NS_UNIX_LOCAL_DIR "Locl" + #define NS_UNIX_LIB_DIR "LibD" + #define NS_UNIX_HOME_DIR NS_OS_HOME_DIR +#elif defined (XP_OS2) + #define NS_OS2_DIR "OS2Dir" + #define NS_OS2_HOME_DIR NS_OS_HOME_DIR + #define NS_OS2_DESKTOP_DIR NS_OS_DESKTOP_DIR +#elif defined (XP_BEOS) + #define NS_BEOS_SETTINGS_DIR "Setngs" + #define NS_BEOS_HOME_DIR NS_OS_HOME_DIR + #define NS_BEOS_DESKTOP_DIR NS_OS_DESKTOP_DIR +#endif + +/* Deprecated */ + +#define NS_OS_DRIVE_DIR "DrvD" + + + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsDirectoryServiceUtils.h b/Src/nprt_plugin/gecko/1.8/win/include/nsDirectoryServiceUtils.h new file mode 100644 index 00000000..1fa66cd4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsDirectoryServiceUtils.h @@ -0,0 +1,60 @@ +/* -*- 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 Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsDirectoryServiceUtils_h___ +#define nsDirectoryServiceUtils_h___ + +#include "nsIServiceManager.h" +#include "nsIProperties.h" +#include "nsServiceManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsXPCOMCID.h" + +inline nsresult +NS_GetSpecialDirectory(const char* specialDirName, nsIFile* *result) +{ + nsresult rv; + nsCOMPtr<nsIProperties> serv(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv)); + if (NS_FAILED(rv)) + return rv; + + return serv->Get(specialDirName, NS_GET_IID(nsIFile), + NS_REINTERPRET_CAST(void**, result)); +} + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedAPI.h b/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedAPI.h new file mode 100644 index 00000000..a50a7662 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedAPI.h @@ -0,0 +1,172 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Adam Lock <adamlock@netscape.com> + * Benjamin Smedberg <benjamin@smedbergs.us> + * + * 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 ***** */ + +#ifndef NSEMBEDAPI_H +#define NSEMBEDAPI_H + +#include "nscore.h" +#include "nsXPCOM.h" +#include "nsILocalFile.h" +#include "nsIDirectoryService.h" + +/** + * @file + * @brief The Gecko embedding API functions, structures and definitions. + */ + +/** + * Initialises the Gecko embedding layer. You <I>must</I> + * call this method before proceeding to use Gecko. This function ensures + * XPCOM is started, creates the component registry if necessary and + * starts global services. + * + * @status FROZEN + * + * @note Use <CODE>NS_NewLocalFile</CODE> to create the file object you + * supply as the bin directory path in this call. The function + * may be safely called before the rest of XPCOM or embedding has + * been initialised. + * + * @param aMozBinDirectory The Gecko directory containing the component + * registry and runtime libraries; + * or use <CODE>nsnull</CODE> to use the working + * directory. + * @param aAppFileLocProvider The object to be used by Gecko that specifies + * to Gecko where to find profiles, the component + * registry preferences and so on; or use + * <CODE>nsnull</CODE> for the default behaviour. + * @param aStaticComponents An array of static components (see NS_InitXPCOM3). + * may be null. + * @param aStaticComponentCount Number of static components in the + * aStaticComponents array. + * + * @see NS_NewLocalFile + * @see nsILocalFile + * @see nsIDirectoryServiceProvider + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_HIDDEN NS_METHOD +NS_InitEmbedding(nsILocalFile *aMozBinDirectory, + nsIDirectoryServiceProvider *aAppFileLocProvider, + nsStaticModuleInfo const *aStaticComponents = nsnull, + PRUint32 aStaticComponentCount = 0); + + +/** + * Terminates the Gecko embedding layer. Call this function during shutdown to + * ensure that global services are unloaded, files are closed and + * XPCOM is shutdown. + * + * @status FROZEN + * + * @note Release any XPCOM objects within Gecko that you may be holding a + * reference to before calling this function. + * + * @return NS_OK + */ +extern "C" NS_HIDDEN NS_METHOD +NS_TermEmbedding(); + +/*---------------------------------------------------------------------------*/ +/* Event processing APIs. The native OS dependencies mean you must be */ +/* building on a supported platform to get the functions below. */ +/*---------------------------------------------------------------------------*/ + +#undef MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING + +/* Win32 specific stuff */ +#if defined (WIN32) || defined (WINCE) +#include "windows.h" +/** + * @var typedef MSG nsEmbedNativeEvent + * + * Embedding events are native <CODE>MSG</CODE> structs on Win32. + */ +typedef MSG nsEmbedNativeEvent; +#define MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING +#endif + +/* OS/2 specific stuff */ +#ifdef XP_OS2 +#include "os2.h" + +/** + * @var typedef MSG nsEmbedNativeEvent + * + * Embedding events are native <CODE>QMSG</CODE> structs on OS/2. + */ +typedef QMSG nsEmbedNativeEvent; +#define MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING +#endif + +/* Mac specific stuff */ +/* TODO implementation left as an exercise for the reader */ + +/* GTK specific stuff */ +/* TODO implementation left as an exercise for the reader */ + + +#ifdef MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING + +/** + * @fn nsresult NS_HandleEmbeddingEvent(nsEmbedNativeEvent &aEvent, PRBool &aWasHandled) + * + * This function gives Gecko the chance to process a native window events. + * Call this function from your message processing loop. + * + * @status UNDER_REVIEW + * + * @param aEvent The native UI event + * @param aWasHandled Returns with <CODE>PR_TRUE</CODE> if the end was + * handled; in which case it should not be handled by your + * application. + * + * @return NS_OK + */ +extern "C" NS_HIDDEN NS_METHOD +NS_HandleEmbeddingEvent(nsEmbedNativeEvent &aEvent, PRBool &aWasHandled); + +#endif /* MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING */ + +#endif /* NSEMBEDAPI_H */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedCID.h b/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedCID.h new file mode 100644 index 00000000..f89f9288 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedCID.h @@ -0,0 +1,78 @@ +/* ***** 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 Mozilla.org code. + * + * The Initial Developer of the Original Code is + * Boris Zbarsky <bzbarsky@mit.edu>. + * Portions created by the Initial Developer are Copyright (C) 2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef NSEMBEDCID_H +#define NSEMBEDCID_H + +/** + * @file + * @brief List of, and documentation for, frozen Gecko embedding contracts. + */ + +/** + * Web Browser ContractID + * Creating an instance of this ContractID (via createInstanceByContractID) + * is the basic way to instantiate a Gecko browser. + * + * This contract implements the following interfaces: + * nsIWebBrowser + * nsIWebBrowserSetup + * nsIInterfaceRequestor + * + * @note This contract does not guarantee implementation of any other + * interfaces and does not guarantee ability to get any particular + * interfaces via the nsIInterfaceRequestor implementation. + */ +#define NS_WEBBROWSER_CONTRACTID \ + "@mozilla.org/embedding/browser/nsWebBrowser;1" + +/** + * Prompt Service ContractID + * The prompt service (which can be gotten by calling getServiceByContractID + * on this ContractID) is the way to pose various prompts, alerts, + * and confirmation dialogs to the user. + * + * This contract implements the following interfaces: + * nsIPromptService + * + * Embedders may override this ContractID with their own implementation if they + * want more control over the way prompts, alerts, and confirmation dialogs are + * presented to the user. + */ +#define NS_PROMPTSERVICE_CONTRACTID \ + "@mozilla.org/embedcomp/prompt-service;1" + +#endif // NSEMBEDCID_H diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedString.h b/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedString.h new file mode 100644 index 00000000..9c8f1b9a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsEmbedString.h @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 8; 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 a small implementation of the nsAString and nsACString. + * + * The Initial Developer of the Original Code is + * Peter Annema <jaggernaut@netscape.com>. + * + * Portions created by the Initial Developer are Copyright (C) 2002 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Darin Fisher <darin@meer.net> + * + * 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 ***** */ + +#ifndef nsEmbedString_h___ +#define nsEmbedString_h___ + +#include "nsStringAPI.h" + +/** + * compatibility + */ +typedef nsString nsEmbedString; +typedef nsCString nsEmbedCString; + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsError.h b/Src/nprt_plugin/gecko/1.8/win/include/nsError.h new file mode 100644 index 00000000..f957bdc4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsError.h @@ -0,0 +1,317 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsError_h__ +#define nsError_h__ + +#ifndef nscore_h___ +#include "nscore.h" /* needed for nsresult */ +#endif + +/* + * To add error code to your module, you need to do the following: + * + * 1) Add a module offset code. Add yours to the bottom of the list + * right below this comment, adding 1. + * + * 2) In your module, define a header file which uses one of the + * NE_ERROR_GENERATExxxxxx macros. Some examples below: + * + * #define NS_ERROR_MYMODULE_MYERROR1 NS_ERROR_GENERATE(NS_ERROR_SEVERITY_ERROR,NS_ERROR_MODULE_MYMODULE,1) + * #define NS_ERROR_MYMODULE_MYERROR2 NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_MYMODULE,2) + * #define NS_ERROR_MYMODULE_MYERROR3 NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MYMODULE,3) + * + */ + + +/** + * @name Standard Module Offset Code. Each Module should identify a unique number + * and then all errors associated with that module become offsets from the + * base associated with that module id. There are 16 bits of code bits for + * each module. + */ + +#define NS_ERROR_MODULE_XPCOM 1 +#define NS_ERROR_MODULE_BASE 2 +#define NS_ERROR_MODULE_GFX 3 +#define NS_ERROR_MODULE_WIDGET 4 +#define NS_ERROR_MODULE_CALENDAR 5 +#define NS_ERROR_MODULE_NETWORK 6 +#define NS_ERROR_MODULE_PLUGINS 7 +#define NS_ERROR_MODULE_LAYOUT 8 +#define NS_ERROR_MODULE_HTMLPARSER 9 +#define NS_ERROR_MODULE_RDF 10 +#define NS_ERROR_MODULE_UCONV 11 +#define NS_ERROR_MODULE_REG 12 +#define NS_ERROR_MODULE_FILES 13 +#define NS_ERROR_MODULE_DOM 14 +#define NS_ERROR_MODULE_IMGLIB 15 +#define NS_ERROR_MODULE_MAILNEWS 16 +#define NS_ERROR_MODULE_EDITOR 17 +#define NS_ERROR_MODULE_XPCONNECT 18 +#define NS_ERROR_MODULE_PROFILE 19 +#define NS_ERROR_MODULE_LDAP 20 +#define NS_ERROR_MODULE_SECURITY 21 +#define NS_ERROR_MODULE_DOM_XPATH 22 +#define NS_ERROR_MODULE_DOM_RANGE 23 +#define NS_ERROR_MODULE_URILOADER 24 +#define NS_ERROR_MODULE_CONTENT 25 +#define NS_ERROR_MODULE_PYXPCOM 26 +#define NS_ERROR_MODULE_XSLT 27 +#define NS_ERROR_MODULE_IPC 28 +#define NS_ERROR_MODULE_SVG 29 +#define NS_ERROR_MODULE_STORAGE 30 +#define NS_ERROR_MODULE_SCHEMA 31 + +/* NS_ERROR_MODULE_GENERAL should be used by modules that do not + * care if return code values overlap. Callers of methods that + * return such codes should be aware that they are not + * globally unique. Implementors should be careful about blindly + * returning codes from other modules that might also use + * the generic base. + */ +#define NS_ERROR_MODULE_GENERAL 51 + +/** + * @name Standard Error Handling Macros + */ + +#define NS_FAILED(_nsresult) (NS_UNLIKELY((_nsresult) & 0x80000000)) +#define NS_SUCCEEDED(_nsresult) (NS_LIKELY(!((_nsresult) & 0x80000000))) + +/** + * @name Severity Code. This flag identifies the level of warning + */ + +#define NS_ERROR_SEVERITY_SUCCESS 0 +#define NS_ERROR_SEVERITY_ERROR 1 + +/** + * @name Mozilla Code. This flag separates consumers of mozilla code + * from the native platform + */ + +#define NS_ERROR_MODULE_BASE_OFFSET 0x45 + +/** + * @name Standard Error Generating Macros + */ + +#define NS_ERROR_GENERATE(sev,module,code) \ + ((nsresult) (((PRUint32)(sev)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) ) + +#define NS_ERROR_GENERATE_SUCCESS(module,code) \ + ((nsresult) (((PRUint32)(NS_ERROR_SEVERITY_SUCCESS)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) ) + +#define NS_ERROR_GENERATE_FAILURE(module,code) \ + ((nsresult) (((PRUint32)(NS_ERROR_SEVERITY_ERROR)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) ) + +/** + * @name Standard Macros for retrieving error bits + */ + +#define NS_ERROR_GET_CODE(err) ((err) & 0xffff) +#define NS_ERROR_GET_MODULE(err) (((((err) >> 16) - NS_ERROR_MODULE_BASE_OFFSET) & 0x1fff)) +#define NS_ERROR_GET_SEVERITY(err) (((err) >> 31) & 0x1) + +/** + * @name Standard return values + */ + +/*@{*/ + +/* Standard "it worked" return value */ +#define NS_OK 0 + +#define NS_ERROR_BASE ((nsresult) 0xC1F30000) + +/* Returned when an instance is not initialized */ +#define NS_ERROR_NOT_INITIALIZED (NS_ERROR_BASE + 1) + +/* Returned when an instance is already initialized */ +#define NS_ERROR_ALREADY_INITIALIZED (NS_ERROR_BASE + 2) + +/* Returned by a not implemented function */ +#define NS_ERROR_NOT_IMPLEMENTED ((nsresult) 0x80004001L) + +/* Returned when a given interface is not supported. */ +#define NS_NOINTERFACE ((nsresult) 0x80004002L) +#define NS_ERROR_NO_INTERFACE NS_NOINTERFACE + +#define NS_ERROR_INVALID_POINTER ((nsresult) 0x80004003L) +#define NS_ERROR_NULL_POINTER NS_ERROR_INVALID_POINTER + +/* Returned when a function aborts */ +#define NS_ERROR_ABORT ((nsresult) 0x80004004L) + +/* Returned when a function fails */ +#define NS_ERROR_FAILURE ((nsresult) 0x80004005L) + +/* Returned when an unexpected error occurs */ +#define NS_ERROR_UNEXPECTED ((nsresult) 0x8000ffffL) + +/* Returned when a memory allocation fails */ +#define NS_ERROR_OUT_OF_MEMORY ((nsresult) 0x8007000eL) + +/* Returned when an illegal value is passed */ +#define NS_ERROR_ILLEGAL_VALUE ((nsresult) 0x80070057L) +#define NS_ERROR_INVALID_ARG NS_ERROR_ILLEGAL_VALUE + +/* Returned when a class doesn't allow aggregation */ +#define NS_ERROR_NO_AGGREGATION ((nsresult) 0x80040110L) + +/* Returned when an operation can't complete due to an unavailable resource */ +#define NS_ERROR_NOT_AVAILABLE ((nsresult) 0x80040111L) + +/* Returned when a class is not registered */ +#define NS_ERROR_FACTORY_NOT_REGISTERED ((nsresult) 0x80040154L) + +/* Returned when a class cannot be registered, but may be tried again later */ +#define NS_ERROR_FACTORY_REGISTER_AGAIN ((nsresult) 0x80040155L) + +/* Returned when a dynamically loaded factory couldn't be found */ +#define NS_ERROR_FACTORY_NOT_LOADED ((nsresult) 0x800401f8L) + +/* Returned when a factory doesn't support signatures */ +#define NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT \ + (NS_ERROR_BASE + 0x101) + +/* Returned when a factory already is registered */ +#define NS_ERROR_FACTORY_EXISTS (NS_ERROR_BASE + 0x100) + + +/* For COM compatibility reasons, we want to use exact error code numbers + for NS_ERROR_PROXY_INVALID_IN_PARAMETER and NS_ERROR_PROXY_INVALID_OUT_PARAMETER. + The first matches: + + #define RPC_E_INVALID_PARAMETER _HRESULT_TYPEDEF_(0x80010010L) + + Errors returning this mean that the xpcom proxy code could not create a proxy for + one of the in paramaters. + + Because of this, we are ignoring the convention if using a base and offset for + error numbers. + +*/ + +/* Returned when a proxy could not be create a proxy for one of the IN parameters + This is returned only when the "real" meathod has NOT been invoked. +*/ + +#define NS_ERROR_PROXY_INVALID_IN_PARAMETER ((nsresult) 0x80010010L) + +/* Returned when a proxy could not be create a proxy for one of the OUT parameters + This is returned only when the "real" meathod has ALREADY been invoked. +*/ + +#define NS_ERROR_PROXY_INVALID_OUT_PARAMETER ((nsresult) 0x80010011L) + + +/*@}*/ + + /* I/O Errors */ + + /* Stream closed */ +#define NS_BASE_STREAM_CLOSED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 2) + /* Error from the operating system */ +#define NS_BASE_STREAM_OSERROR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 3) + /* Illegal arguments */ +#define NS_BASE_STREAM_ILLEGAL_ARGS NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 4) + /* For unichar streams */ +#define NS_BASE_STREAM_NO_CONVERTER NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 5) + /* For unichar streams */ +#define NS_BASE_STREAM_BAD_CONVERSION NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 6) + +#define NS_BASE_STREAM_WOULD_BLOCK NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 7) + + +#define NS_ERROR_FILE_UNRECOGNIZED_PATH NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 1) +#define NS_ERROR_FILE_UNRESOLVABLE_SYMLINK NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 2) +#define NS_ERROR_FILE_EXECUTION_FAILED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 3) +#define NS_ERROR_FILE_UNKNOWN_TYPE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 4) +#define NS_ERROR_FILE_DESTINATION_NOT_DIR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 5) +#define NS_ERROR_FILE_TARGET_DOES_NOT_EXIST NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 6) +#define NS_ERROR_FILE_COPY_OR_MOVE_FAILED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 7) +#define NS_ERROR_FILE_ALREADY_EXISTS NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 8) +#define NS_ERROR_FILE_INVALID_PATH NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 9) +#define NS_ERROR_FILE_DISK_FULL NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 10) +#define NS_ERROR_FILE_CORRUPTED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 11) +#define NS_ERROR_FILE_NOT_DIRECTORY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 12) +#define NS_ERROR_FILE_IS_DIRECTORY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 13) +#define NS_ERROR_FILE_IS_LOCKED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 14) +#define NS_ERROR_FILE_TOO_BIG NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 15) +#define NS_ERROR_FILE_NO_DEVICE_SPACE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 16) +#define NS_ERROR_FILE_NAME_TOO_LONG NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 17) +#define NS_ERROR_FILE_NOT_FOUND NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 18) +#define NS_ERROR_FILE_READ_ONLY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 19) +#define NS_ERROR_FILE_DIR_NOT_EMPTY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 20) +#define NS_ERROR_FILE_ACCESS_DENIED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 21) + +#define NS_SUCCESS_FILE_DIRECTORY_EMPTY NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_FILES, 1) + + /* Result codes used by nsIDirectoryServiceProvider2 */ + +#define NS_SUCCESS_AGGREGATE_RESULT NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_FILES, 2) + + /* Result codes used by nsIVariant */ + +#define NS_ERROR_CANNOT_CONVERT_DATA NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 1) +#define NS_ERROR_OBJECT_IS_IMMUTABLE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 2) +#define NS_ERROR_LOSS_OF_SIGNIFICANT_DATA NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 3) + +#define NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 1) + + + /* + * This will return the nsresult corresponding to the most recent NSPR failure + * returned by PR_GetError. + * + *********************************************************************** + * Do not depend on this function. It will be going away! + *********************************************************************** + */ +extern NS_COM nsresult +NS_ErrorAccordingToNSPR(); + + +#ifdef _MSC_VER +#pragma warning(disable: 4251) /* 'nsCOMPtr<class nsIInputStream>' needs to have dll-interface to be used by clients of class 'nsInputStream' */ +#pragma warning(disable: 4275) /* non dll-interface class 'nsISupports' used as base for dll-interface class 'nsIRDFNode' */ +#endif + +#endif + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsGenericFactory.h b/Src/nprt_plugin/gecko/1.8/win/include/nsGenericFactory.h new file mode 100644 index 00000000..149f39fc --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsGenericFactory.h @@ -0,0 +1,127 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsGenericFactory_h___ +#define nsGenericFactory_h___ + +#include "nsCOMPtr.h" +#include "nsIGenericFactory.h" +#include "nsIClassInfo.h" + +/** + * Most factories follow this simple pattern, so why not just use a function + * pointer for most creation operations? + */ +class nsGenericFactory : public nsIGenericFactory, public nsIClassInfo { +public: + NS_DEFINE_STATIC_CID_ACCESSOR(NS_GENERICFACTORY_CID); + + nsGenericFactory(const nsModuleComponentInfo *info = NULL); + + NS_DECL_ISUPPORTS + NS_DECL_NSICLASSINFO + + /* nsIGenericFactory methods */ + NS_IMETHOD SetComponentInfo(const nsModuleComponentInfo *info); + NS_IMETHOD GetComponentInfo(const nsModuleComponentInfo **infop); + + NS_IMETHOD CreateInstance(nsISupports *aOuter, REFNSIID aIID, void **aResult); + + NS_IMETHOD LockFactory(PRBool aLock); + + static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr); +private: + ~nsGenericFactory(); + + const nsModuleComponentInfo *mInfo; +}; + +//////////////////////////////////////////////////////////////////////////////// + +#include "nsIModule.h" +#include "plhash.h" + +class nsGenericModule : public nsIModule +{ +public: + nsGenericModule(const char* moduleName, + PRUint32 componentCount, + const nsModuleComponentInfo* components, + nsModuleConstructorProc ctor, + nsModuleDestructorProc dtor); + +private: + ~nsGenericModule(); + +public: + NS_DECL_ISUPPORTS + + NS_DECL_NSIMODULE + + struct FactoryNode + { + FactoryNode(nsIGenericFactory* fact, FactoryNode* next) + { + mFactory = fact; + mNext = next; + } + ~FactoryNode(){} + + nsCOMPtr<nsIGenericFactory> mFactory; + FactoryNode* mNext; + }; + + + + +protected: + nsresult Initialize(nsIComponentManager* compMgr); + + void Shutdown(); + nsresult AddFactoryNode(nsIGenericFactory* fact); + + PRBool mInitialized; + const char* mModuleName; + PRUint32 mComponentCount; + const nsModuleComponentInfo* mComponents; + FactoryNode* mFactoriesNotToBeRegistered; + nsModuleConstructorProc mCtor; + nsModuleDestructorProc mDtor; +}; + +#endif /* nsGenericFactory_h___ */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIASN1Object.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIASN1Object.h new file mode 100644 index 00000000..aa759c2b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIASN1Object.h @@ -0,0 +1,230 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/ssl/public/nsIASN1Object.idl + */ + +#ifndef __gen_nsIASN1Object_h__ +#define __gen_nsIASN1Object_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIASN1Object */ +#define NS_IASN1OBJECT_IID_STR "ba8bf582-1dd1-11b2-898c-f40246bc9a63" + +#define NS_IASN1OBJECT_IID \ + {0xba8bf582, 0x1dd1, 0x11b2, \ + { 0x89, 0x8c, 0xf4, 0x02, 0x46, 0xbc, 0x9a, 0x63 }} + +/** + * This represents an ASN.1 object, + * where ASN.1 is "Abstract Syntax Notation number One". + * + * The additional state information carried in this interface + * makes it fit for being used as the data structure + * when working with visual reprenstation of ASN.1 objects + * in a human user interface, like in a tree widget + * where open/close state of nodes must be remembered. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIASN1Object : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IASN1OBJECT_IID) + + /** + * Identifiers for the possible types of object. + */ + enum { ASN1_END_CONTENTS = 0U }; + + enum { ASN1_BOOLEAN = 1U }; + + enum { ASN1_INTEGER = 2U }; + + enum { ASN1_BIT_STRING = 3U }; + + enum { ASN1_OCTET_STRING = 4U }; + + enum { ASN1_NULL = 5U }; + + enum { ASN1_OBJECT_ID = 6U }; + + enum { ASN1_ENUMERATED = 10U }; + + enum { ASN1_UTF8_STRING = 12U }; + + enum { ASN1_SEQUENCE = 16U }; + + enum { ASN1_SET = 17U }; + + enum { ASN1_PRINTABLE_STRING = 19U }; + + enum { ASN1_T61_STRING = 20U }; + + enum { ASN1_IA5_STRING = 22U }; + + enum { ASN1_UTC_TIME = 23U }; + + enum { ASN1_GEN_TIME = 24U }; + + enum { ASN1_VISIBLE_STRING = 26U }; + + enum { ASN1_UNIVERSAL_STRING = 28U }; + + enum { ASN1_BMP_STRING = 30U }; + + enum { ASN1_HIGH_TAG_NUMBER = 31U }; + + enum { ASN1_CONTEXT_SPECIFIC = 32U }; + + enum { ASN1_APPLICATION = 33U }; + + enum { ASN1_PRIVATE = 34U }; + + /** + * "type" will be equal to one of the defined object identifiers. + */ + /* attribute unsigned long type; */ + NS_IMETHOD GetType(PRUint32 *aType) = 0; + NS_IMETHOD SetType(PRUint32 aType) = 0; + + /** + * This contains a tag as explained in ASN.1 standards documents. + */ + /* attribute unsigned long tag; */ + NS_IMETHOD GetTag(PRUint32 *aTag) = 0; + NS_IMETHOD SetTag(PRUint32 aTag) = 0; + + /** + * "displayName" contains a human readable explanatory label. + */ + /* attribute AString displayName; */ + NS_IMETHOD GetDisplayName(nsAString & aDisplayName) = 0; + NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) = 0; + + /** + * "displayValue" contains the human readable value. + */ + /* attribute AString displayValue; */ + NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) = 0; + NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIASN1OBJECT \ + NS_IMETHOD GetType(PRUint32 *aType); \ + NS_IMETHOD SetType(PRUint32 aType); \ + NS_IMETHOD GetTag(PRUint32 *aTag); \ + NS_IMETHOD SetTag(PRUint32 aTag); \ + NS_IMETHOD GetDisplayName(nsAString & aDisplayName); \ + NS_IMETHOD SetDisplayName(const nsAString & aDisplayName); \ + NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue); \ + NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIASN1OBJECT(_to) \ + NS_IMETHOD GetType(PRUint32 *aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(PRUint32 aType) { return _to SetType(aType); } \ + NS_IMETHOD GetTag(PRUint32 *aTag) { return _to GetTag(aTag); } \ + NS_IMETHOD SetTag(PRUint32 aTag) { return _to SetTag(aTag); } \ + NS_IMETHOD GetDisplayName(nsAString & aDisplayName) { return _to GetDisplayName(aDisplayName); } \ + NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) { return _to SetDisplayName(aDisplayName); } \ + NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) { return _to GetDisplayValue(aDisplayValue); } \ + NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) { return _to SetDisplayValue(aDisplayValue); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIASN1OBJECT(_to) \ + NS_IMETHOD GetType(PRUint32 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(PRUint32 aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } \ + NS_IMETHOD GetTag(PRUint32 *aTag) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTag(aTag); } \ + NS_IMETHOD SetTag(PRUint32 aTag) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTag(aTag); } \ + NS_IMETHOD GetDisplayName(nsAString & aDisplayName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayName(aDisplayName); } \ + NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisplayName(aDisplayName); } \ + NS_IMETHOD GetDisplayValue(nsAString & aDisplayValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayValue(aDisplayValue); } \ + NS_IMETHOD SetDisplayValue(const nsAString & aDisplayValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisplayValue(aDisplayValue); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsASN1Object : public nsIASN1Object +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIASN1OBJECT + + nsASN1Object(); + +private: + ~nsASN1Object(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsASN1Object, nsIASN1Object) + +nsASN1Object::nsASN1Object() +{ + /* member initializers and constructor code */ +} + +nsASN1Object::~nsASN1Object() +{ + /* destructor code */ +} + +/* attribute unsigned long type; */ +NS_IMETHODIMP nsASN1Object::GetType(PRUint32 *aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsASN1Object::SetType(PRUint32 aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute unsigned long tag; */ +NS_IMETHODIMP nsASN1Object::GetTag(PRUint32 *aTag) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsASN1Object::SetTag(PRUint32 aTag) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AString displayName; */ +NS_IMETHODIMP nsASN1Object::GetDisplayName(nsAString & aDisplayName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsASN1Object::SetDisplayName(const nsAString & aDisplayName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AString displayValue; */ +NS_IMETHODIMP nsASN1Object::GetDisplayValue(nsAString & aDisplayValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsASN1Object::SetDisplayValue(const nsAString & aDisplayValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIASN1Object_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIASN1Sequence.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIASN1Sequence.h new file mode 100644 index 00000000..7b2abb2a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIASN1Sequence.h @@ -0,0 +1,181 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/ssl/public/nsIASN1Sequence.idl + */ + +#ifndef __gen_nsIASN1Sequence_h__ +#define __gen_nsIASN1Sequence_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsIASN1Object_h__ +#include "nsIASN1Object.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIMutableArray; /* forward declaration */ + + +/* starting interface: nsIASN1Sequence */ +#define NS_IASN1SEQUENCE_IID_STR "b6b957e6-1dd1-11b2-89d7-e30624f50b00" + +#define NS_IASN1SEQUENCE_IID \ + {0xb6b957e6, 0x1dd1, 0x11b2, \ + { 0x89, 0xd7, 0xe3, 0x06, 0x24, 0xf5, 0x0b, 0x00 }} + +/** + * This represents a sequence of ASN.1 objects, + * where ASN.1 is "Abstract Syntax Notation number One". + * + * Overview of how this ASN1 interface is intended to + * work. + * + * First off, the nsIASN1Sequence is any type in ASN1 + * that consists of sub-elements (ie SEQUENCE, SET) + * nsIASN1Printable Items are all the other types that + * can be viewed by themselves without interpreting further. + * Examples would include INTEGER, UTF-8 STRING, OID. + * These are not intended to directly reflect the numberous + * types that exist in ASN1, but merely an interface to ease + * producing a tree display the ASN1 structure of any DER + * object. + * + * The additional state information carried in this interface + * makes it fit for being used as the data structure + * when working with visual reprenstation of ASN.1 objects + * in a human user interface, like in a tree widget + * where open/close state of nodes must be remembered. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIASN1Sequence : public nsIASN1Object { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IASN1SEQUENCE_IID) + + /** + * The array of objects stored in the sequence. + */ + /* attribute nsIMutableArray ASN1Objects; */ + NS_IMETHOD GetASN1Objects(nsIMutableArray * *aASN1Objects) = 0; + NS_IMETHOD SetASN1Objects(nsIMutableArray * aASN1Objects) = 0; + + /** + * Whether the node at this position in the ASN.1 data structure + * sequence contains sub elements understood by the + * application. + */ + /* attribute boolean isValidContainer; */ + NS_IMETHOD GetIsValidContainer(PRBool *aIsValidContainer) = 0; + NS_IMETHOD SetIsValidContainer(PRBool aIsValidContainer) = 0; + + /** + * Whether the contained objects should be shown or hidden. + * A UI implementation can use this flag to store the current + * expansion state when shown in a tree widget. + */ + /* attribute boolean isExpanded; */ + NS_IMETHOD GetIsExpanded(PRBool *aIsExpanded) = 0; + NS_IMETHOD SetIsExpanded(PRBool aIsExpanded) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIASN1SEQUENCE \ + NS_IMETHOD GetASN1Objects(nsIMutableArray * *aASN1Objects); \ + NS_IMETHOD SetASN1Objects(nsIMutableArray * aASN1Objects); \ + NS_IMETHOD GetIsValidContainer(PRBool *aIsValidContainer); \ + NS_IMETHOD SetIsValidContainer(PRBool aIsValidContainer); \ + NS_IMETHOD GetIsExpanded(PRBool *aIsExpanded); \ + NS_IMETHOD SetIsExpanded(PRBool aIsExpanded); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIASN1SEQUENCE(_to) \ + NS_IMETHOD GetASN1Objects(nsIMutableArray * *aASN1Objects) { return _to GetASN1Objects(aASN1Objects); } \ + NS_IMETHOD SetASN1Objects(nsIMutableArray * aASN1Objects) { return _to SetASN1Objects(aASN1Objects); } \ + NS_IMETHOD GetIsValidContainer(PRBool *aIsValidContainer) { return _to GetIsValidContainer(aIsValidContainer); } \ + NS_IMETHOD SetIsValidContainer(PRBool aIsValidContainer) { return _to SetIsValidContainer(aIsValidContainer); } \ + NS_IMETHOD GetIsExpanded(PRBool *aIsExpanded) { return _to GetIsExpanded(aIsExpanded); } \ + NS_IMETHOD SetIsExpanded(PRBool aIsExpanded) { return _to SetIsExpanded(aIsExpanded); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIASN1SEQUENCE(_to) \ + NS_IMETHOD GetASN1Objects(nsIMutableArray * *aASN1Objects) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetASN1Objects(aASN1Objects); } \ + NS_IMETHOD SetASN1Objects(nsIMutableArray * aASN1Objects) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetASN1Objects(aASN1Objects); } \ + NS_IMETHOD GetIsValidContainer(PRBool *aIsValidContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsValidContainer(aIsValidContainer); } \ + NS_IMETHOD SetIsValidContainer(PRBool aIsValidContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsValidContainer(aIsValidContainer); } \ + NS_IMETHOD GetIsExpanded(PRBool *aIsExpanded) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsExpanded(aIsExpanded); } \ + NS_IMETHOD SetIsExpanded(PRBool aIsExpanded) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsExpanded(aIsExpanded); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsASN1Sequence : public nsIASN1Sequence +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIASN1SEQUENCE + + nsASN1Sequence(); + +private: + ~nsASN1Sequence(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsASN1Sequence, nsIASN1Sequence) + +nsASN1Sequence::nsASN1Sequence() +{ + /* member initializers and constructor code */ +} + +nsASN1Sequence::~nsASN1Sequence() +{ + /* destructor code */ +} + +/* attribute nsIMutableArray ASN1Objects; */ +NS_IMETHODIMP nsASN1Sequence::GetASN1Objects(nsIMutableArray * *aASN1Objects) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsASN1Sequence::SetASN1Objects(nsIMutableArray * aASN1Objects) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean isValidContainer; */ +NS_IMETHODIMP nsASN1Sequence::GetIsValidContainer(PRBool *aIsValidContainer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsASN1Sequence::SetIsValidContainer(PRBool aIsValidContainer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean isExpanded; */ +NS_IMETHODIMP nsASN1Sequence::GetIsExpanded(PRBool *aIsExpanded) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsASN1Sequence::SetIsExpanded(PRBool aIsExpanded) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIASN1Sequence_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIBadCertListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIBadCertListener.h new file mode 100644 index 00000000..43b33132 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIBadCertListener.h @@ -0,0 +1,219 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/ssl/public/nsIBadCertListener.idl + */ + +#ifndef __gen_nsIBadCertListener_h__ +#define __gen_nsIBadCertListener_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIX509Cert; /* forward declaration */ + +class nsIInterfaceRequestor; /* forward declaration */ + + +/* starting interface: nsIBadCertListener */ +#define NS_IBADCERTLISTENER_IID_STR "86960956-edb0-11d4-998b-00b0d02354a0" + +#define NS_IBADCERTLISTENER_IID \ + {0x86960956, 0xedb0, 0x11d4, \ + { 0x99, 0x8b, 0x00, 0xb0, 0xd0, 0x23, 0x54, 0xa0 }} + +/** + * Functions that display warnings for problems with web site trust. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIBadCertListener : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBADCERTLISTENER_IID) + + /** + * No decision was made by the user, whether to trust a cert. + */ + enum { UNINIT_ADD_FLAG = -1 }; + + /** + * The user decided to add trust to a certificate temporarily + * for the current application session only. + */ + enum { ADD_TRUSTED_FOR_SESSION = 1 }; + + /** + * The user decided to add trust to a certificate permanently. + */ + enum { ADD_TRUSTED_PERMANENTLY = 2 }; + + /** + * Inform the user there are problems with the trust of a certificate, + * and request a decision from the user. + * The UI should offer the user a way to look at the certificate in detail. + * The following is a sample UI message to be shown to the user: + * + * Unable to verify the identity of %S as a trusted site. + * Possible reasons for this error: + * - Your browser does not recognize the Certificate Authority + * that issued the site's certificate. + * - The site's certificate is incomplete due to a + * server misconfiguration. + * - You are connected to a site pretending to be %S, + * possibly to obtain your confidential information. + * Please notify the site's webmaster about this problem. + * Before accepting this certificate, you should examine this site's + * certificate carefully. Are you willing to to accept this certificate + * for the purpose of identifying the Web site %S? + * o Accept this certificate permanently + * x Accept this certificate temporarily for this session + * o Do not accept this certificate and do not connect to this Web site + * + * @param socketInfo A network communication context that can be used to obtain more information + * about the active connection. + * @param cert The certificate that is not trusted and that is having the problem. + * @param certAddType The user's trust decision. See constants defined above. + * + * @return true if the user decided to connect anyway, false if the user decided to not connect + */ + /* boolean confirmUnknownIssuer (in nsIInterfaceRequestor socketInfo, in nsIX509Cert cert, out short certAddType); */ + NS_IMETHOD ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval) = 0; + + /** + * Inform the user there are problems with the trust of a certificate, + * and request a decision from the user. + * The hostname mentioned in the server's certificate is not the hostname + * that was used as a destination address for the current connection. + * + * @param socketInfo A network communication context that can be used to obtain more information + * about the active connection. + * @param targetURL The URL that was used to open the current connection. + * @param cert The certificate that was presented by the server. + * + * @return true if the user decided to connect anyway, false if the user decided to not connect + */ + /* boolean confirmMismatchDomain (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert); */ + NS_IMETHOD ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert, PRBool *_retval) = 0; + + /** + * Inform the user there are problems with the trust of a certificate, + * and request a decision from the user. + * The certificate presented by the server is no longer valid because + * the validity period has expired. + * + * @param socketInfo A network communication context that can be used to obtain more information + * about the active connection. + * @param cert The certificate that was presented by the server. + * + * @return true if the user decided to connect anyway, false if the user decided to not connect + */ + /* boolean confirmCertExpired (in nsIInterfaceRequestor socketInfo, in nsIX509Cert cert); */ + NS_IMETHOD ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRBool *_retval) = 0; + + /** + * Inform the user there are problems with the trust of a certificate, + * and request a decision from the user. + * The Certificate Authority (CA) that issued the server's certificate has issued a + * Certificate Revocation List (CRL). + * However, the application does not have a current version of the CA's CRL. + * Due to the application configuration, the application disallows the connection + * to the remote site. + * + * @param socketInfo A network communication context that can be used to obtain more information + * about the active connection. + * @param targetURL The URL that was used to open the current connection. + * @param cert The certificate that was presented by the server. + */ + /* void notifyCrlNextupdate (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert); */ + NS_IMETHOD NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIBADCERTLISTENER \ + NS_IMETHOD ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval); \ + NS_IMETHOD ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert, PRBool *_retval); \ + NS_IMETHOD ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRBool *_retval); \ + NS_IMETHOD NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIBADCERTLISTENER(_to) \ + NS_IMETHOD ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval) { return _to ConfirmUnknownIssuer(socketInfo, cert, certAddType, _retval); } \ + NS_IMETHOD ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert, PRBool *_retval) { return _to ConfirmMismatchDomain(socketInfo, targetURL, cert, _retval); } \ + NS_IMETHOD ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRBool *_retval) { return _to ConfirmCertExpired(socketInfo, cert, _retval); } \ + NS_IMETHOD NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert) { return _to NotifyCrlNextupdate(socketInfo, targetURL, cert); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIBADCERTLISTENER(_to) \ + NS_IMETHOD ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmUnknownIssuer(socketInfo, cert, certAddType, _retval); } \ + NS_IMETHOD ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmMismatchDomain(socketInfo, targetURL, cert, _retval); } \ + NS_IMETHOD ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmCertExpired(socketInfo, cert, _retval); } \ + NS_IMETHOD NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyCrlNextupdate(socketInfo, targetURL, cert); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsBadCertListener : public nsIBadCertListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIBADCERTLISTENER + + nsBadCertListener(); + +private: + ~nsBadCertListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsBadCertListener, nsIBadCertListener) + +nsBadCertListener::nsBadCertListener() +{ + /* member initializers and constructor code */ +} + +nsBadCertListener::~nsBadCertListener() +{ + /* destructor code */ +} + +/* boolean confirmUnknownIssuer (in nsIInterfaceRequestor socketInfo, in nsIX509Cert cert, out short certAddType); */ +NS_IMETHODIMP nsBadCertListener::ConfirmUnknownIssuer(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRInt16 *certAddType, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirmMismatchDomain (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert); */ +NS_IMETHODIMP nsBadCertListener::ConfirmMismatchDomain(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirmCertExpired (in nsIInterfaceRequestor socketInfo, in nsIX509Cert cert); */ +NS_IMETHODIMP nsBadCertListener::ConfirmCertExpired(nsIInterfaceRequestor *socketInfo, nsIX509Cert *cert, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void notifyCrlNextupdate (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert); */ +NS_IMETHODIMP nsBadCertListener::NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const nsACString & targetURL, nsIX509Cert *cert) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_BADCERTLISTENER_CONTRACTID "@mozilla.org/nsBadCertListener;1" + +#endif /* __gen_nsIBadCertListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsICRLInfo.h b/Src/nprt_plugin/gecko/1.8/win/include/nsICRLInfo.h new file mode 100644 index 00000000..c16e3706 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsICRLInfo.h @@ -0,0 +1,205 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/ssl/public/nsICRLInfo.idl + */ + +#ifndef __gen_nsICRLInfo_h__ +#define __gen_nsICRLInfo_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsICRLInfo */ +#define NS_ICRLINFO_IID_STR "c185d920-4a3e-11d5-ba27-00108303b117" + +#define NS_ICRLINFO_IID \ + {0xc185d920, 0x4a3e, 0x11d5, \ + { 0xba, 0x27, 0x00, 0x10, 0x83, 0x03, 0xb1, 0x17 }} + +/** + * Information on a Certificate Revocation List (CRL) + * issued by a Aertificate Authority (CA). + * + * @status FROZEN + */ +class NS_NO_VTABLE nsICRLInfo : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICRLINFO_IID) + + /** + * The issuing CA's organization. + */ + /* readonly attribute AString organization; */ + NS_IMETHOD GetOrganization(nsAString & aOrganization) = 0; + + /** + * The issuing CA's organizational unit. + */ + /* readonly attribute AString organizationalUnit; */ + NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) = 0; + + /** + * The time this CRL was created at. + */ + /* readonly attribute PRTime lastUpdate; */ + NS_IMETHOD GetLastUpdate(PRTime *aLastUpdate) = 0; + + /** + * The time the suggested next update for this CRL. + */ + /* readonly attribute PRTime nextUpdate; */ + NS_IMETHOD GetNextUpdate(PRTime *aNextUpdate) = 0; + + /** + * lastUpdate formatted as a human readable string + * formatted according to the environment locale. + */ + /* readonly attribute AString lastUpdateLocale; */ + NS_IMETHOD GetLastUpdateLocale(nsAString & aLastUpdateLocale) = 0; + + /** + * nextUpdate formatted as a human readable string + * formatted according to the environment locale. + */ + /* readonly attribute AString nextUpdateLocale; */ + NS_IMETHOD GetNextUpdateLocale(nsAString & aNextUpdateLocale) = 0; + + /** + * The key identifying the CRL in the database. + */ + /* readonly attribute AString nameInDb; */ + NS_IMETHOD GetNameInDb(nsAString & aNameInDb) = 0; + + /** + * The URL this CRL was last fetched from. + */ + /* readonly attribute AUTF8String lastFetchURL; */ + NS_IMETHOD GetLastFetchURL(nsACString & aLastFetchURL) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICRLINFO \ + NS_IMETHOD GetOrganization(nsAString & aOrganization); \ + NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit); \ + NS_IMETHOD GetLastUpdate(PRTime *aLastUpdate); \ + NS_IMETHOD GetNextUpdate(PRTime *aNextUpdate); \ + NS_IMETHOD GetLastUpdateLocale(nsAString & aLastUpdateLocale); \ + NS_IMETHOD GetNextUpdateLocale(nsAString & aNextUpdateLocale); \ + NS_IMETHOD GetNameInDb(nsAString & aNameInDb); \ + NS_IMETHOD GetLastFetchURL(nsACString & aLastFetchURL); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICRLINFO(_to) \ + NS_IMETHOD GetOrganization(nsAString & aOrganization) { return _to GetOrganization(aOrganization); } \ + NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) { return _to GetOrganizationalUnit(aOrganizationalUnit); } \ + NS_IMETHOD GetLastUpdate(PRTime *aLastUpdate) { return _to GetLastUpdate(aLastUpdate); } \ + NS_IMETHOD GetNextUpdate(PRTime *aNextUpdate) { return _to GetNextUpdate(aNextUpdate); } \ + NS_IMETHOD GetLastUpdateLocale(nsAString & aLastUpdateLocale) { return _to GetLastUpdateLocale(aLastUpdateLocale); } \ + NS_IMETHOD GetNextUpdateLocale(nsAString & aNextUpdateLocale) { return _to GetNextUpdateLocale(aNextUpdateLocale); } \ + NS_IMETHOD GetNameInDb(nsAString & aNameInDb) { return _to GetNameInDb(aNameInDb); } \ + NS_IMETHOD GetLastFetchURL(nsACString & aLastFetchURL) { return _to GetLastFetchURL(aLastFetchURL); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICRLINFO(_to) \ + NS_IMETHOD GetOrganization(nsAString & aOrganization) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrganization(aOrganization); } \ + NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrganizationalUnit(aOrganizationalUnit); } \ + NS_IMETHOD GetLastUpdate(PRTime *aLastUpdate) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastUpdate(aLastUpdate); } \ + NS_IMETHOD GetNextUpdate(PRTime *aNextUpdate) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextUpdate(aNextUpdate); } \ + NS_IMETHOD GetLastUpdateLocale(nsAString & aLastUpdateLocale) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastUpdateLocale(aLastUpdateLocale); } \ + NS_IMETHOD GetNextUpdateLocale(nsAString & aNextUpdateLocale) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextUpdateLocale(aNextUpdateLocale); } \ + NS_IMETHOD GetNameInDb(nsAString & aNameInDb) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNameInDb(aNameInDb); } \ + NS_IMETHOD GetLastFetchURL(nsACString & aLastFetchURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastFetchURL(aLastFetchURL); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsCRLInfo : public nsICRLInfo +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICRLINFO + + nsCRLInfo(); + +private: + ~nsCRLInfo(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsCRLInfo, nsICRLInfo) + +nsCRLInfo::nsCRLInfo() +{ + /* member initializers and constructor code */ +} + +nsCRLInfo::~nsCRLInfo() +{ + /* destructor code */ +} + +/* readonly attribute AString organization; */ +NS_IMETHODIMP nsCRLInfo::GetOrganization(nsAString & aOrganization) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString organizationalUnit; */ +NS_IMETHODIMP nsCRLInfo::GetOrganizationalUnit(nsAString & aOrganizationalUnit) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRTime lastUpdate; */ +NS_IMETHODIMP nsCRLInfo::GetLastUpdate(PRTime *aLastUpdate) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRTime nextUpdate; */ +NS_IMETHODIMP nsCRLInfo::GetNextUpdate(PRTime *aNextUpdate) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString lastUpdateLocale; */ +NS_IMETHODIMP nsCRLInfo::GetLastUpdateLocale(nsAString & aLastUpdateLocale) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString nextUpdateLocale; */ +NS_IMETHODIMP nsCRLInfo::GetNextUpdateLocale(nsAString & aNextUpdateLocale) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString nameInDb; */ +NS_IMETHODIMP nsCRLInfo::GetNameInDb(nsAString & aNameInDb) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AUTF8String lastFetchURL; */ +NS_IMETHODIMP nsCRLInfo::GetLastFetchURL(nsACString & aLastFetchURL) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsICRLInfo_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsICategoryManager.h b/Src/nprt_plugin/gecko/1.8/win/include/nsICategoryManager.h new file mode 100644 index 00000000..03ea41ea --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsICategoryManager.h @@ -0,0 +1,190 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsICategoryManager.idl + */ + +#ifndef __gen_nsICategoryManager_h__ +#define __gen_nsICategoryManager_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsISimpleEnumerator_h__ +#include "nsISimpleEnumerator.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsICategoryManager */ +#define NS_ICATEGORYMANAGER_IID_STR "3275b2cd-af6d-429a-80d7-f0c5120342ac" + +#define NS_ICATEGORYMANAGER_IID \ + {0x3275b2cd, 0xaf6d, 0x429a, \ + { 0x80, 0xd7, 0xf0, 0xc5, 0x12, 0x03, 0x42, 0xac }} + +class NS_NO_VTABLE nsICategoryManager : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICATEGORYMANAGER_IID) + + /** + * Get the value for the given category's entry. + * @param aCategory The name of the category ("protocol") + * @param aEntry The entry you're looking for ("http") + * @return The value. + */ + /* string getCategoryEntry (in string aCategory, in string aEntry); */ + NS_IMETHOD GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval) = 0; + + /** + * Add an entry to a category. + * @param aCategory The name of the category ("protocol") + * @param aEntry The entry to be added ("http") + * @param aValue The value for the entry ("moz.httprulez.1") + * @param aPersist Should this data persist between invocations? + * @param aReplace Should we replace an existing entry? + * @return Previous entry, if any + */ + /* string addCategoryEntry (in string aCategory, in string aEntry, in string aValue, in boolean aPersist, in boolean aReplace); */ + NS_IMETHOD AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval) = 0; + + /** + * Delete an entry from the category. + * @param aCategory The name of the category ("protocol") + * @param aEntry The entry to be added ("http") + * @param aPersist Delete persistent data from registry, if present? + */ + /* void deleteCategoryEntry (in string aCategory, in string aEntry, in boolean aPersist); */ + NS_IMETHOD DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist) = 0; + + /** + * Delete a category and all entries. + * @param aCategory The category to be deleted. + */ + /* void deleteCategory (in string aCategory); */ + NS_IMETHOD DeleteCategory(const char *aCategory) = 0; + + /** + * Enumerate the entries in a category. + * @param aCategory The category to be enumerated. + * @return a simple enumerator, each result QIs to + * nsISupportsCString. + */ + /* nsISimpleEnumerator enumerateCategory (in string aCategory); */ + NS_IMETHOD EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval) = 0; + + /** + * Enumerate all existing categories + * @param aCategory The category to be enumerated. + * @return a simple enumerator, each result QIs to + * nsISupportsCString. + */ + /* nsISimpleEnumerator enumerateCategories (); */ + NS_IMETHOD EnumerateCategories(nsISimpleEnumerator **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICATEGORYMANAGER \ + NS_IMETHOD GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval); \ + NS_IMETHOD AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval); \ + NS_IMETHOD DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist); \ + NS_IMETHOD DeleteCategory(const char *aCategory); \ + NS_IMETHOD EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval); \ + NS_IMETHOD EnumerateCategories(nsISimpleEnumerator **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICATEGORYMANAGER(_to) \ + NS_IMETHOD GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval) { return _to GetCategoryEntry(aCategory, aEntry, _retval); } \ + NS_IMETHOD AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval) { return _to AddCategoryEntry(aCategory, aEntry, aValue, aPersist, aReplace, _retval); } \ + NS_IMETHOD DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist) { return _to DeleteCategoryEntry(aCategory, aEntry, aPersist); } \ + NS_IMETHOD DeleteCategory(const char *aCategory) { return _to DeleteCategory(aCategory); } \ + NS_IMETHOD EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval) { return _to EnumerateCategory(aCategory, _retval); } \ + NS_IMETHOD EnumerateCategories(nsISimpleEnumerator **_retval) { return _to EnumerateCategories(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICATEGORYMANAGER(_to) \ + NS_IMETHOD GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCategoryEntry(aCategory, aEntry, _retval); } \ + NS_IMETHOD AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddCategoryEntry(aCategory, aEntry, aValue, aPersist, aReplace, _retval); } \ + NS_IMETHOD DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCategoryEntry(aCategory, aEntry, aPersist); } \ + NS_IMETHOD DeleteCategory(const char *aCategory) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCategory(aCategory); } \ + NS_IMETHOD EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCategory(aCategory, _retval); } \ + NS_IMETHOD EnumerateCategories(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCategories(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsCategoryManager : public nsICategoryManager +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICATEGORYMANAGER + + nsCategoryManager(); + +private: + ~nsCategoryManager(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsCategoryManager, nsICategoryManager) + +nsCategoryManager::nsCategoryManager() +{ + /* member initializers and constructor code */ +} + +nsCategoryManager::~nsCategoryManager() +{ + /* destructor code */ +} + +/* string getCategoryEntry (in string aCategory, in string aEntry); */ +NS_IMETHODIMP nsCategoryManager::GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string addCategoryEntry (in string aCategory, in string aEntry, in string aValue, in boolean aPersist, in boolean aReplace); */ +NS_IMETHODIMP nsCategoryManager::AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, PRBool aPersist, PRBool aReplace, char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteCategoryEntry (in string aCategory, in string aEntry, in boolean aPersist); */ +NS_IMETHODIMP nsCategoryManager::DeleteCategoryEntry(const char *aCategory, const char *aEntry, PRBool aPersist) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteCategory (in string aCategory); */ +NS_IMETHODIMP nsCategoryManager::DeleteCategory(const char *aCategory) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISimpleEnumerator enumerateCategory (in string aCategory); */ +NS_IMETHODIMP nsCategoryManager::EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISimpleEnumerator enumerateCategories (); */ +NS_IMETHODIMP nsCategoryManager::EnumerateCategories(nsISimpleEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsICategoryManager_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsICertificateDialogs.h b/Src/nprt_plugin/gecko/1.8/win/include/nsICertificateDialogs.h new file mode 100644 index 00000000..c5eefb7b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsICertificateDialogs.h @@ -0,0 +1,220 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/ssl/public/nsICertificateDialogs.idl + */ + +#ifndef __gen_nsICertificateDialogs_h__ +#define __gen_nsICertificateDialogs_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIInterfaceRequestor; /* forward declaration */ + +class nsIX509Cert; /* forward declaration */ + +class nsICRLInfo; /* forward declaration */ + + +/* starting interface: nsICertificateDialogs */ +#define NS_ICERTIFICATEDIALOGS_IID_STR "a03ca940-09be-11d5-ac5d-000064657374" + +#define NS_ICERTIFICATEDIALOGS_IID \ + {0xa03ca940, 0x09be, 0x11d5, \ + { 0xac, 0x5d, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }} + +/** + * Functions that implement user interface dialogs to manage certificates. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsICertificateDialogs : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICERTIFICATEDIALOGS_IID) + + /** + * UI shown when a user is asked to download a new CA cert. + * Provides user with ability to choose trust settings for the cert. + * Asks the user to grant permission to import the certificate. + * + * @param ctx A user interface context. + * @param cert The certificate that is about to get installed. + * @param trust a bit mask of trust flags, + * see nsIX509CertDB for possible values. + * + * @return true if the user allows to import the certificate. + */ + /* boolean confirmDownloadCACert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert, out unsigned long trust); */ + NS_IMETHOD ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval) = 0; + + /** + * UI shown when a web site has delivered a CA certificate to + * be imported, but the certificate is already contained in the + * user's storage. + * + * @param ctx A user interface context. + */ + /* void notifyCACertExists (in nsIInterfaceRequestor ctx); */ + NS_IMETHOD NotifyCACertExists(nsIInterfaceRequestor *ctx) = 0; + + /** + * UI shown when a user's personal certificate is going to be + * exported to a backup file. + * The implementation of this dialog should make sure + * to prompt the user to type the password twice in order to + * confirm correct input. + * The wording in the dialog should also motivate the user + * to enter a strong password. + * + * @param ctx A user interface context. + * @param password The password provided by the user. + * + * @return false if the user requests to cancel. + */ + /* boolean setPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password); */ + NS_IMETHOD SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) = 0; + + /** + * UI shown when a user is about to restore a personal + * certificate from a backup file. + * The user is requested to enter the password + * that was used in the past to protect that backup file. + * + * @param ctx A user interface context. + * @param password The password provided by the user. + * + * @return false if the user requests to cancel. + */ + /* boolean getPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password); */ + NS_IMETHOD GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) = 0; + + /** + * UI shown when a certificate needs to be shown to the user. + * The implementation should try to display as many attributes + * as possible. + * + * @param ctx A user interface context. + * @param cert The certificate to be shown to the user. + */ + /* void viewCert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert); */ + NS_IMETHOD ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert) = 0; + + /** + * UI shown after a Certificate Revocation List (CRL) has been + * successfully imported. + * + * @param ctx A user interface context. + * @param crl Information describing the CRL that was imported. + */ + /* void crlImportStatusDialog (in nsIInterfaceRequestor ctx, in nsICRLInfo crl); */ + NS_IMETHOD CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICERTIFICATEDIALOGS \ + NS_IMETHOD ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval); \ + NS_IMETHOD NotifyCACertExists(nsIInterfaceRequestor *ctx); \ + NS_IMETHOD SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval); \ + NS_IMETHOD GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval); \ + NS_IMETHOD ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert); \ + NS_IMETHOD CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICERTIFICATEDIALOGS(_to) \ + NS_IMETHOD ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval) { return _to ConfirmDownloadCACert(ctx, cert, trust, _retval); } \ + NS_IMETHOD NotifyCACertExists(nsIInterfaceRequestor *ctx) { return _to NotifyCACertExists(ctx); } \ + NS_IMETHOD SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) { return _to SetPKCS12FilePassword(ctx, password, _retval); } \ + NS_IMETHOD GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) { return _to GetPKCS12FilePassword(ctx, password, _retval); } \ + NS_IMETHOD ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert) { return _to ViewCert(ctx, cert); } \ + NS_IMETHOD CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) { return _to CrlImportStatusDialog(ctx, crl); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICERTIFICATEDIALOGS(_to) \ + NS_IMETHOD ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmDownloadCACert(ctx, cert, trust, _retval); } \ + NS_IMETHOD NotifyCACertExists(nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyCACertExists(ctx); } \ + NS_IMETHOD SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPKCS12FilePassword(ctx, password, _retval); } \ + NS_IMETHOD GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPKCS12FilePassword(ctx, password, _retval); } \ + NS_IMETHOD ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert) { return !_to ? NS_ERROR_NULL_POINTER : _to->ViewCert(ctx, cert); } \ + NS_IMETHOD CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) { return !_to ? NS_ERROR_NULL_POINTER : _to->CrlImportStatusDialog(ctx, crl); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsCertificateDialogs : public nsICertificateDialogs +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICERTIFICATEDIALOGS + + nsCertificateDialogs(); + +private: + ~nsCertificateDialogs(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsCertificateDialogs, nsICertificateDialogs) + +nsCertificateDialogs::nsCertificateDialogs() +{ + /* member initializers and constructor code */ +} + +nsCertificateDialogs::~nsCertificateDialogs() +{ + /* destructor code */ +} + +/* boolean confirmDownloadCACert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert, out unsigned long trust); */ +NS_IMETHODIMP nsCertificateDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void notifyCACertExists (in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsCertificateDialogs::NotifyCACertExists(nsIInterfaceRequestor *ctx) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean setPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password); */ +NS_IMETHODIMP nsCertificateDialogs::SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean getPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password); */ +NS_IMETHODIMP nsCertificateDialogs::GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void viewCert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert); */ +NS_IMETHODIMP nsCertificateDialogs::ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void crlImportStatusDialog (in nsIInterfaceRequestor ctx, in nsICRLInfo crl); */ +NS_IMETHODIMP nsCertificateDialogs::CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_CERTIFICATEDIALOGS_CONTRACTID "@mozilla.org/nsCertificateDialogs;1" + +#endif /* __gen_nsICertificateDialogs_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIChannel.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIChannel.h new file mode 100644 index 00000000..aa7066f4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIChannel.h @@ -0,0 +1,404 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIChannel.idl + */ + +#ifndef __gen_nsIChannel_h__ +#define __gen_nsIChannel_h__ + + +#ifndef __gen_nsIRequest_h__ +#include "nsIRequest.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIURI; /* forward declaration */ + +class nsIInterfaceRequestor; /* forward declaration */ + +class nsIInputStream; /* forward declaration */ + +class nsIStreamListener; /* forward declaration */ + + +/* starting interface: nsIChannel */ +#define NS_ICHANNEL_IID_STR "c63a055a-a676-4e71-bf3c-6cfa11082018" + +#define NS_ICHANNEL_IID \ + {0xc63a055a, 0xa676, 0x4e71, \ + { 0xbf, 0x3c, 0x6c, 0xfa, 0x11, 0x08, 0x20, 0x18 }} + +/** + * The nsIChannel interface allows clients to construct "GET" requests for + * specific protocols, and manage them in a uniform way. Once a channel is + * created (via nsIIOService::newChannel), parameters for that request may + * be set by using the channel attributes, or by QI'ing to a subclass of + * nsIChannel for protocol-specific parameters. Then, the URI can be fetched + * by calling nsIChannel::open or nsIChannel::asyncOpen. + * + * After a request has been completed, the channel is still valid for accessing + * protocol-specific results. For example, QI'ing to nsIHttpChannel allows + * response headers to be retrieved for the corresponding http transaction. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIChannel : public nsIRequest { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICHANNEL_IID) + + /** + * The original URI used to construct the channel. This is used in the case + * of a redirect or URI "resolution" (e.g. resolving a resource: URI to a + * file: URI) so that the original pre-redirect URI can still be obtained. + * + * NOTE: this is distinctly different from the http Referer (referring URI), + * which is typically the page that contained the original URI (accessible + * from nsIHttpChannel). + */ + /* attribute nsIURI originalURI; */ + NS_IMETHOD GetOriginalURI(nsIURI * *aOriginalURI) = 0; + NS_IMETHOD SetOriginalURI(nsIURI * aOriginalURI) = 0; + + /** + * The URI corresponding to the channel. Its value is immutable. + */ + /* readonly attribute nsIURI URI; */ + NS_IMETHOD GetURI(nsIURI * *aURI) = 0; + + /** + * The owner, corresponding to the entity that is responsible for this + * channel. Used by the security manager to grant or deny privileges to + * mobile code loaded from this channel. + * + * NOTE: this is a strong reference to the owner, so if the owner is also + * holding a strong reference to the channel, care must be taken to + * explicitly drop its reference to the channel. + */ + /* attribute nsISupports owner; */ + NS_IMETHOD GetOwner(nsISupports * *aOwner) = 0; + NS_IMETHOD SetOwner(nsISupports * aOwner) = 0; + + /** + * The notification callbacks for the channel. This is set by clients, who + * wish to provide a means to receive progress, status and protocol-specific + * notifications. If this value is NULL, the channel implementation may use + * the notification callbacks from its load group. The channel may also + * query the notification callbacks from its load group if its notification + * callbacks do not supply the requested interface. + * + * Interfaces commonly requested include: nsIProgressEventSink, nsIPrompt, + * and nsIAuthPrompt. + * + * When the channel is done, it must not continue holding references to + * this object. + * + * NOTE: A channel implementation should take care when "caching" an + * interface pointer queried from its notification callbacks. If the + * notification callbacks are changed, then a cached interface pointer may + * become invalid and may therefore need to be re-queried. + */ + /* attribute nsIInterfaceRequestor notificationCallbacks; */ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) = 0; + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) = 0; + + /** + * Transport-level security information (if any) corresponding to the channel. + */ + /* readonly attribute nsISupports securityInfo; */ + NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) = 0; + + /** + * The MIME type of the channel's content if available. + * + * NOTE: the content type can often be wrongly specified (e.g., wrong file + * extension, wrong MIME type, wrong document type stored on a server, etc.), + * and the caller most likely wants to verify with the actual data. + * + * Setting contentType before the channel has been opened provides a hint + * to the channel as to what the MIME type is. The channel may ignore this + * hint in deciding on the actual MIME type that it will report. + * + * Setting contentType after onStartRequest has been fired or after open() + * is called will override the type determined by the channel. + * + * Setting contentType between the time that asyncOpen() is called and the + * time when onStartRequest is fired has undefined behavior at this time. + * + * The value of the contentType attribute is a lowercase string. A value + * assigned to this attribute will be parsed and normalized as follows: + * 1- any parameters (delimited with a ';') will be stripped. + * 2- if a charset parameter is given, then its value will replace the + * the contentCharset attribute of the channel. + * 3- the stripped contentType will be lowercased. + * Any implementation of nsIChannel must follow these rules. + */ + /* attribute ACString contentType; */ + NS_IMETHOD GetContentType(nsACString & aContentType) = 0; + NS_IMETHOD SetContentType(const nsACString & aContentType) = 0; + + /** + * The character set of the channel's content if available and if applicable. + * This attribute only applies to textual data. + * + * The value of the contentCharset attribute is a mixedcase string. + */ + /* attribute ACString contentCharset; */ + NS_IMETHOD GetContentCharset(nsACString & aContentCharset) = 0; + NS_IMETHOD SetContentCharset(const nsACString & aContentCharset) = 0; + + /** + * The length of the data associated with the channel if available. A value + * of -1 indicates that the content length is unknown. + * + * Callers should prefer getting the "content-length" property + * as 64-bit value by QIing the channel to nsIPropertyBag2, + * if that interface is exposed by the channel. + */ + /* attribute long contentLength; */ + NS_IMETHOD GetContentLength(PRInt32 *aContentLength) = 0; + NS_IMETHOD SetContentLength(PRInt32 aContentLength) = 0; + + /** + * Synchronously open the channel. + * + * @return blocking input stream to the channel's data. + * + * NOTE: nsIChannel implementations are not required to implement this + * method. Moreover, since this method may block the calling thread, it + * should not be called on a thread that processes UI events. + */ + /* nsIInputStream open (); */ + NS_IMETHOD Open(nsIInputStream **_retval) = 0; + + /** + * Asynchronously open this channel. Data is fed to the specified stream + * listener as it becomes available. The stream listener's methods are + * called on the thread that calls asyncOpen and are not called until + * after asyncOpen returns. + * + * @param aListener the nsIStreamListener implementation + * @param aContext an opaque parameter forwarded to aListener's methods + */ + /* void asyncOpen (in nsIStreamListener aListener, in nsISupports aContext); */ + NS_IMETHOD AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext) = 0; + + /************************************************************************** + * Channel specific load flags: + * + * Bits 21-31 are reserved for future use by this interface or one of its + * derivatives (e.g., see nsICachingChannel). + */ +/** + * Set (e.g., by the docshell) to indicate whether or not the channel + * corresponds to a document URI. + */ + enum { LOAD_DOCUMENT_URI = 65536U }; + + /** + * If the end consumer for this load has been retargeted after discovering + * it's content, this flag will be set: + */ + enum { LOAD_RETARGETED_DOCUMENT_URI = 131072U }; + + /** + * This flag is set to indicate that onStopRequest may be followed by + * another onStartRequest/onStopRequest pair. This flag is, for example, + * used by the multipart/replace stream converter. + */ + enum { LOAD_REPLACE = 262144U }; + + /** + * Set (e.g., by the docshell) to indicate whether or not the channel + * corresponds to an initial document URI load (e.g., link click). + */ + enum { LOAD_INITIAL_DOCUMENT_URI = 524288U }; + + /** + * Set (e.g., by the URILoader) to indicate whether or not the end consumer + * for this load has been determined. + */ + enum { LOAD_TARGETED = 1048576U }; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICHANNEL \ + NS_IMETHOD GetOriginalURI(nsIURI * *aOriginalURI); \ + NS_IMETHOD SetOriginalURI(nsIURI * aOriginalURI); \ + NS_IMETHOD GetURI(nsIURI * *aURI); \ + NS_IMETHOD GetOwner(nsISupports * *aOwner); \ + NS_IMETHOD SetOwner(nsISupports * aOwner); \ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks); \ + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks); \ + NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo); \ + NS_IMETHOD GetContentType(nsACString & aContentType); \ + NS_IMETHOD SetContentType(const nsACString & aContentType); \ + NS_IMETHOD GetContentCharset(nsACString & aContentCharset); \ + NS_IMETHOD SetContentCharset(const nsACString & aContentCharset); \ + NS_IMETHOD GetContentLength(PRInt32 *aContentLength); \ + NS_IMETHOD SetContentLength(PRInt32 aContentLength); \ + NS_IMETHOD Open(nsIInputStream **_retval); \ + NS_IMETHOD AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext); \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICHANNEL(_to) \ + NS_IMETHOD GetOriginalURI(nsIURI * *aOriginalURI) { return _to GetOriginalURI(aOriginalURI); } \ + NS_IMETHOD SetOriginalURI(nsIURI * aOriginalURI) { return _to SetOriginalURI(aOriginalURI); } \ + NS_IMETHOD GetURI(nsIURI * *aURI) { return _to GetURI(aURI); } \ + NS_IMETHOD GetOwner(nsISupports * *aOwner) { return _to GetOwner(aOwner); } \ + NS_IMETHOD SetOwner(nsISupports * aOwner) { return _to SetOwner(aOwner); } \ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return _to GetNotificationCallbacks(aNotificationCallbacks); } \ + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return _to SetNotificationCallbacks(aNotificationCallbacks); } \ + NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) { return _to GetSecurityInfo(aSecurityInfo); } \ + NS_IMETHOD GetContentType(nsACString & aContentType) { return _to GetContentType(aContentType); } \ + NS_IMETHOD SetContentType(const nsACString & aContentType) { return _to SetContentType(aContentType); } \ + NS_IMETHOD GetContentCharset(nsACString & aContentCharset) { return _to GetContentCharset(aContentCharset); } \ + NS_IMETHOD SetContentCharset(const nsACString & aContentCharset) { return _to SetContentCharset(aContentCharset); } \ + NS_IMETHOD GetContentLength(PRInt32 *aContentLength) { return _to GetContentLength(aContentLength); } \ + NS_IMETHOD SetContentLength(PRInt32 aContentLength) { return _to SetContentLength(aContentLength); } \ + NS_IMETHOD Open(nsIInputStream **_retval) { return _to Open(_retval); } \ + NS_IMETHOD AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext) { return _to AsyncOpen(aListener, aContext); } \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICHANNEL(_to) \ + NS_IMETHOD GetOriginalURI(nsIURI * *aOriginalURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginalURI(aOriginalURI); } \ + NS_IMETHOD SetOriginalURI(nsIURI * aOriginalURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOriginalURI(aOriginalURI); } \ + NS_IMETHOD GetURI(nsIURI * *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURI(aURI); } \ + NS_IMETHOD GetOwner(nsISupports * *aOwner) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOwner(aOwner); } \ + NS_IMETHOD SetOwner(nsISupports * aOwner) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOwner(aOwner); } \ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotificationCallbacks(aNotificationCallbacks); } \ + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNotificationCallbacks(aNotificationCallbacks); } \ + NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityInfo(aSecurityInfo); } \ + NS_IMETHOD GetContentType(nsACString & aContentType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentType(aContentType); } \ + NS_IMETHOD SetContentType(const nsACString & aContentType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContentType(aContentType); } \ + NS_IMETHOD GetContentCharset(nsACString & aContentCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentCharset(aContentCharset); } \ + NS_IMETHOD SetContentCharset(const nsACString & aContentCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContentCharset(aContentCharset); } \ + NS_IMETHOD GetContentLength(PRInt32 *aContentLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentLength(aContentLength); } \ + NS_IMETHOD SetContentLength(PRInt32 aContentLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContentLength(aContentLength); } \ + NS_IMETHOD Open(nsIInputStream **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(_retval); } \ + NS_IMETHOD AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncOpen(aListener, aContext); } \ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsChannel : public nsIChannel +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICHANNEL + + nsChannel(); + +private: + ~nsChannel(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsChannel, nsIChannel) + +nsChannel::nsChannel() +{ + /* member initializers and constructor code */ +} + +nsChannel::~nsChannel() +{ + /* destructor code */ +} + +/* attribute nsIURI originalURI; */ +NS_IMETHODIMP nsChannel::GetOriginalURI(nsIURI * *aOriginalURI) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsChannel::SetOriginalURI(nsIURI * aOriginalURI) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIURI URI; */ +NS_IMETHODIMP nsChannel::GetURI(nsIURI * *aURI) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsISupports owner; */ +NS_IMETHODIMP nsChannel::GetOwner(nsISupports * *aOwner) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsChannel::SetOwner(nsISupports * aOwner) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIInterfaceRequestor notificationCallbacks; */ +NS_IMETHODIMP nsChannel::GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsChannel::SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsISupports securityInfo; */ +NS_IMETHODIMP nsChannel::GetSecurityInfo(nsISupports * *aSecurityInfo) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute ACString contentType; */ +NS_IMETHODIMP nsChannel::GetContentType(nsACString & aContentType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsChannel::SetContentType(const nsACString & aContentType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute ACString contentCharset; */ +NS_IMETHODIMP nsChannel::GetContentCharset(nsACString & aContentCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsChannel::SetContentCharset(const nsACString & aContentCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long contentLength; */ +NS_IMETHODIMP nsChannel::GetContentLength(PRInt32 *aContentLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsChannel::SetContentLength(PRInt32 aContentLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIInputStream open (); */ +NS_IMETHODIMP nsChannel::Open(nsIInputStream **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void asyncOpen (in nsIStreamListener aListener, in nsISupports aContext); */ +NS_IMETHODIMP nsChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIChannel_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIClassInfo.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIClassInfo.h new file mode 100644 index 00000000..615afd39 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIClassInfo.h @@ -0,0 +1,245 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsIClassInfo.idl + */ + +#ifndef __gen_nsIClassInfo_h__ +#define __gen_nsIClassInfo_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsIProgrammingLanguage_h__ +#include "nsIProgrammingLanguage.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIClassInfo */ +#define NS_ICLASSINFO_IID_STR "986c11d0-f340-11d4-9075-0010a4e73d9a" + +#define NS_ICLASSINFO_IID \ + {0x986c11d0, 0xf340, 0x11d4, \ + { 0x90, 0x75, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }} + +/** + * Provides information about a specific implementation class + * @status FROZEN + */ +class NS_NO_VTABLE nsIClassInfo : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLASSINFO_IID) + + /** + * 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) = 0; + + /** + * 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) = 0; + + /** + * 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) = 0; + + /** + * A human readable string naming the class, or null. + */ + /* readonly attribute string classDescription; */ + NS_IMETHOD GetClassDescription(char * *aClassDescription) = 0; + + /** + * 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) = 0; + + /** + * Return language type from list in nsIProgrammingLanguage + */ + /* readonly attribute PRUint32 implementationLanguage; */ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) = 0; + + /** + * Bitflags for 'flags' attribute. + */ + enum { SINGLETON = 1U }; + + enum { THREADSAFE = 2U }; + + enum { MAIN_THREAD_ONLY = 4U }; + + enum { DOM_OBJECT = 8U }; + + enum { PLUGIN_OBJECT = 16U }; + + enum { EAGER_CLASSINFO = 32U }; + + /** + * 'flags' attribute bitflag: whether objects of this type implement + * nsIContent. + */ + enum { CONTENT_NODE = 64U }; + + enum { RESERVED = 2147483648U }; + + /* readonly attribute PRUint32 flags; */ + NS_IMETHOD GetFlags(PRUint32 *aFlags) = 0; + + /** + * 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) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICLASSINFO \ + NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array); \ + NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval); \ + NS_IMETHOD GetContractID(char * *aContractID); \ + NS_IMETHOD GetClassDescription(char * *aClassDescription); \ + NS_IMETHOD GetClassID(nsCID * *aClassID); \ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage); \ + NS_IMETHOD GetFlags(PRUint32 *aFlags); \ + NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICLASSINFO(_to) \ + NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) { return _to GetInterfaces(count, array); } \ + NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) { return _to GetHelperForLanguage(language, _retval); } \ + NS_IMETHOD GetContractID(char * *aContractID) { return _to GetContractID(aContractID); } \ + NS_IMETHOD GetClassDescription(char * *aClassDescription) { return _to GetClassDescription(aClassDescription); } \ + NS_IMETHOD GetClassID(nsCID * *aClassID) { return _to GetClassID(aClassID); } \ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) { return _to GetImplementationLanguage(aImplementationLanguage); } \ + NS_IMETHOD GetFlags(PRUint32 *aFlags) { return _to GetFlags(aFlags); } \ + NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) { return _to GetClassIDNoAlloc(aClassIDNoAlloc); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICLASSINFO(_to) \ + NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaces(count, array); } \ + NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHelperForLanguage(language, _retval); } \ + NS_IMETHOD GetContractID(char * *aContractID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContractID(aContractID); } \ + NS_IMETHOD GetClassDescription(char * *aClassDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassDescription(aClassDescription); } \ + NS_IMETHOD GetClassID(nsCID * *aClassID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassID(aClassID); } \ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImplementationLanguage(aImplementationLanguage); } \ + NS_IMETHOD GetFlags(PRUint32 *aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \ + NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassIDNoAlloc(aClassIDNoAlloc); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsClassInfo : public nsIClassInfo +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICLASSINFO + + nsClassInfo(); + +private: + ~nsClassInfo(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsClassInfo, nsIClassInfo) + +nsClassInfo::nsClassInfo() +{ + /* member initializers and constructor code */ +} + +nsClassInfo::~nsClassInfo() +{ + /* destructor code */ +} + +/* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */ +NS_IMETHODIMP nsClassInfo::GetInterfaces(PRUint32 *count, nsIID * **array) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISupports getHelperForLanguage (in PRUint32 language); */ +NS_IMETHODIMP nsClassInfo::GetHelperForLanguage(PRUint32 language, nsISupports **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute string contractID; */ +NS_IMETHODIMP nsClassInfo::GetContractID(char * *aContractID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute string classDescription; */ +NS_IMETHODIMP nsClassInfo::GetClassDescription(char * *aClassDescription) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsCIDPtr classID; */ +NS_IMETHODIMP nsClassInfo::GetClassID(nsCID * *aClassID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRUint32 implementationLanguage; */ +NS_IMETHODIMP nsClassInfo::GetImplementationLanguage(PRUint32 *aImplementationLanguage) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRUint32 flags; */ +NS_IMETHODIMP nsClassInfo::GetFlags(PRUint32 *aFlags) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ +NS_IMETHODIMP nsClassInfo::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIClassInfo_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIClipboardCommands.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIClipboardCommands.h new file mode 100644 index 00000000..f24ceca0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIClipboardCommands.h @@ -0,0 +1,317 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/webshell/public/nsIClipboardCommands.idl + */ + +#ifndef __gen_nsIClipboardCommands_h__ +#define __gen_nsIClipboardCommands_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIClipboardCommands */ +#define NS_ICLIPBOARDCOMMANDS_IID_STR "b8100c90-73be-11d2-92a5-00105a1b0d64" + +#define NS_ICLIPBOARDCOMMANDS_IID \ + {0xb8100c90, 0x73be, 0x11d2, \ + { 0x92, 0xa5, 0x00, 0x10, 0x5a, 0x1b, 0x0d, 0x64 }} + +/** + * An interface for embedding clients who wish to interact with + * the system-wide OS clipboard. Mozilla does not use a private + * clipboard, instead it places its data directly onto the system + * clipboard. The webshell implements this interface. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIClipboardCommands : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLIPBOARDCOMMANDS_IID) + + /** + * Returns whether there is a selection and it is not read-only. + * + * @return <code>true</code> if the current selection can be cut, + * <code>false</code> otherwise. + */ + /* boolean canCutSelection (); */ + NS_IMETHOD CanCutSelection(PRBool *_retval) = 0; + + /** + * Returns whether there is a selection and it is copyable. + * + * @return <code>true</code> if there is a selection, + * <code>false</code> otherwise. + */ + /* boolean canCopySelection (); */ + NS_IMETHOD CanCopySelection(PRBool *_retval) = 0; + + /** + * Returns whether we can copy a link location. + * + * @return <code>true</code> if a link is selected, + * <code>false</code> otherwise. + */ + /* boolean canCopyLinkLocation (); */ + NS_IMETHOD CanCopyLinkLocation(PRBool *_retval) = 0; + + /** + * Returns whether we can copy an image location. + * + * @return <code>true</code> if an image is selected, + <code>false</code> otherwise. + */ + /* boolean canCopyImageLocation (); */ + NS_IMETHOD CanCopyImageLocation(PRBool *_retval) = 0; + + /** + * Returns whether we can copy an image's contents. + * + * @return <code>true</code> if an image is selected, + * <code>false</code> otherwise + */ + /* boolean canCopyImageContents (); */ + NS_IMETHOD CanCopyImageContents(PRBool *_retval) = 0; + + /** + * Returns whether the current contents of the clipboard can be + * pasted and if the current selection is not read-only. + * + * @return <code>true</code> there is data to paste on the clipboard + * and the current selection is not read-only, + * <code>false</code> otherwise + */ + /* boolean canPaste (); */ + NS_IMETHOD CanPaste(PRBool *_retval) = 0; + + /** + * Cut the current selection onto the clipboard. + */ + /* void cutSelection (); */ + NS_IMETHOD CutSelection(void) = 0; + + /** + * Copy the current selection onto the clipboard. + */ + /* void copySelection (); */ + NS_IMETHOD CopySelection(void) = 0; + + /** + * Copy the link location of the current selection (e.g., + * the |href| attribute of a selected |a| tag). + */ + /* void copyLinkLocation (); */ + NS_IMETHOD CopyLinkLocation(void) = 0; + + /** + * Copy the location of the selected image. + */ + /* void copyImageLocation (); */ + NS_IMETHOD CopyImageLocation(void) = 0; + + /** + * Copy the contents of the selected image. + */ + /* void copyImageContents (); */ + NS_IMETHOD CopyImageContents(void) = 0; + + /** + * Paste the contents of the clipboard into the current selection. + */ + /* void paste (); */ + NS_IMETHOD Paste(void) = 0; + + /** + * Select the entire contents. + */ + /* void selectAll (); */ + NS_IMETHOD SelectAll(void) = 0; + + /** + * Clear the current selection (if any). Insertion point ends up + * at beginning of current selection. + */ + /* void selectNone (); */ + NS_IMETHOD SelectNone(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICLIPBOARDCOMMANDS \ + NS_IMETHOD CanCutSelection(PRBool *_retval); \ + NS_IMETHOD CanCopySelection(PRBool *_retval); \ + NS_IMETHOD CanCopyLinkLocation(PRBool *_retval); \ + NS_IMETHOD CanCopyImageLocation(PRBool *_retval); \ + NS_IMETHOD CanCopyImageContents(PRBool *_retval); \ + NS_IMETHOD CanPaste(PRBool *_retval); \ + NS_IMETHOD CutSelection(void); \ + NS_IMETHOD CopySelection(void); \ + NS_IMETHOD CopyLinkLocation(void); \ + NS_IMETHOD CopyImageLocation(void); \ + NS_IMETHOD CopyImageContents(void); \ + NS_IMETHOD Paste(void); \ + NS_IMETHOD SelectAll(void); \ + NS_IMETHOD SelectNone(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICLIPBOARDCOMMANDS(_to) \ + NS_IMETHOD CanCutSelection(PRBool *_retval) { return _to CanCutSelection(_retval); } \ + NS_IMETHOD CanCopySelection(PRBool *_retval) { return _to CanCopySelection(_retval); } \ + NS_IMETHOD CanCopyLinkLocation(PRBool *_retval) { return _to CanCopyLinkLocation(_retval); } \ + NS_IMETHOD CanCopyImageLocation(PRBool *_retval) { return _to CanCopyImageLocation(_retval); } \ + NS_IMETHOD CanCopyImageContents(PRBool *_retval) { return _to CanCopyImageContents(_retval); } \ + NS_IMETHOD CanPaste(PRBool *_retval) { return _to CanPaste(_retval); } \ + NS_IMETHOD CutSelection(void) { return _to CutSelection(); } \ + NS_IMETHOD CopySelection(void) { return _to CopySelection(); } \ + NS_IMETHOD CopyLinkLocation(void) { return _to CopyLinkLocation(); } \ + NS_IMETHOD CopyImageLocation(void) { return _to CopyImageLocation(); } \ + NS_IMETHOD CopyImageContents(void) { return _to CopyImageContents(); } \ + NS_IMETHOD Paste(void) { return _to Paste(); } \ + NS_IMETHOD SelectAll(void) { return _to SelectAll(); } \ + NS_IMETHOD SelectNone(void) { return _to SelectNone(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICLIPBOARDCOMMANDS(_to) \ + NS_IMETHOD CanCutSelection(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCutSelection(_retval); } \ + NS_IMETHOD CanCopySelection(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopySelection(_retval); } \ + NS_IMETHOD CanCopyLinkLocation(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyLinkLocation(_retval); } \ + NS_IMETHOD CanCopyImageLocation(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyImageLocation(_retval); } \ + NS_IMETHOD CanCopyImageContents(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyImageContents(_retval); } \ + NS_IMETHOD CanPaste(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanPaste(_retval); } \ + NS_IMETHOD CutSelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CutSelection(); } \ + NS_IMETHOD CopySelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopySelection(); } \ + NS_IMETHOD CopyLinkLocation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyLinkLocation(); } \ + NS_IMETHOD CopyImageLocation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyImageLocation(); } \ + NS_IMETHOD CopyImageContents(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyImageContents(); } \ + NS_IMETHOD Paste(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Paste(); } \ + NS_IMETHOD SelectAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectAll(); } \ + NS_IMETHOD SelectNone(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectNone(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsClipboardCommands : public nsIClipboardCommands +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICLIPBOARDCOMMANDS + + nsClipboardCommands(); + +private: + ~nsClipboardCommands(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsClipboardCommands, nsIClipboardCommands) + +nsClipboardCommands::nsClipboardCommands() +{ + /* member initializers and constructor code */ +} + +nsClipboardCommands::~nsClipboardCommands() +{ + /* destructor code */ +} + +/* boolean canCutSelection (); */ +NS_IMETHODIMP nsClipboardCommands::CanCutSelection(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean canCopySelection (); */ +NS_IMETHODIMP nsClipboardCommands::CanCopySelection(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean canCopyLinkLocation (); */ +NS_IMETHODIMP nsClipboardCommands::CanCopyLinkLocation(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean canCopyImageLocation (); */ +NS_IMETHODIMP nsClipboardCommands::CanCopyImageLocation(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean canCopyImageContents (); */ +NS_IMETHODIMP nsClipboardCommands::CanCopyImageContents(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean canPaste (); */ +NS_IMETHODIMP nsClipboardCommands::CanPaste(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void cutSelection (); */ +NS_IMETHODIMP nsClipboardCommands::CutSelection() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void copySelection (); */ +NS_IMETHODIMP nsClipboardCommands::CopySelection() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void copyLinkLocation (); */ +NS_IMETHODIMP nsClipboardCommands::CopyLinkLocation() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void copyImageLocation (); */ +NS_IMETHODIMP nsClipboardCommands::CopyImageLocation() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void copyImageContents (); */ +NS_IMETHODIMP nsClipboardCommands::CopyImageContents() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void paste (); */ +NS_IMETHODIMP nsClipboardCommands::Paste() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void selectAll (); */ +NS_IMETHODIMP nsClipboardCommands::SelectAll() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void selectNone (); */ +NS_IMETHODIMP nsClipboardCommands::SelectNone() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIClipboardCommands_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIComponentManager.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIComponentManager.h new file mode 100644 index 00000000..e14052d5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIComponentManager.h @@ -0,0 +1,165 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsIComponentManager.idl + */ + +#ifndef __gen_nsIComponentManager_h__ +#define __gen_nsIComponentManager_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIFactory; /* forward declaration */ + + +/* starting interface: nsIComponentManager */ +#define NS_ICOMPONENTMANAGER_IID_STR "a88e5a60-205a-4bb1-94e1-2628daf51eae" + +#define NS_ICOMPONENTMANAGER_IID \ + {0xa88e5a60, 0x205a, 0x4bb1, \ + { 0x94, 0xe1, 0x26, 0x28, 0xda, 0xf5, 0x1e, 0xae }} + +class NS_NO_VTABLE nsIComponentManager : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOMPONENTMANAGER_IID) + + /** + * 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); */ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) = 0; + + /** + * 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); */ + NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) = 0; + + /** + * 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); */ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) = 0; + + /** + * 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); */ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICOMPONENTMANAGER \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result); \ + NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result); \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result); \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICOMPONENTMANAGER(_to) \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) { return _to GetClassObject(aClass, aIID, result); } \ + NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return _to GetClassObjectByContractID(aContractID, aIID, result); } \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return _to CreateInstance(aClass, aDelegate, aIID, result); } \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return _to CreateInstanceByContractID(aContractID, aDelegate, aIID, result); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICOMPONENTMANAGER(_to) \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObject(aClass, aIID, result); } \ + NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObjectByContractID(aContractID, aIID, result); } \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstance(aClass, aDelegate, aIID, result); } \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstanceByContractID(aContractID, aDelegate, aIID, result); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsComponentManager : public nsIComponentManager +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICOMPONENTMANAGER + + nsComponentManager(); + +private: + ~nsComponentManager(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsComponentManager, nsIComponentManager) + +nsComponentManager::nsComponentManager() +{ + /* member initializers and constructor code */ +} + +nsComponentManager::~nsComponentManager() +{ + /* destructor code */ +} + +/* void getClassObject (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsComponentManager::GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getClassObjectByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsComponentManager::GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsComponentManager::CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsComponentManager::CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#ifdef MOZILLA_INTERNAL_API +#include "nsComponentManagerUtils.h" +#endif + +#endif /* __gen_nsIComponentManager_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIComponentRegistrar.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIComponentRegistrar.h new file mode 100644 index 00000000..41057888 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIComponentRegistrar.h @@ -0,0 +1,375 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsIComponentRegistrar.idl + */ + +#ifndef __gen_nsIComponentRegistrar_h__ +#define __gen_nsIComponentRegistrar_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIFile; /* forward declaration */ + +class nsIFactory; /* forward declaration */ + +class nsISimpleEnumerator; /* forward declaration */ + + +/* starting interface: nsIComponentRegistrar */ +#define NS_ICOMPONENTREGISTRAR_IID_STR "2417cbfe-65ad-48a6-b4b6-eb84db174392" + +#define NS_ICOMPONENTREGISTRAR_IID \ + {0x2417cbfe, 0x65ad, 0x48a6, \ + { 0xb4, 0xb6, 0xeb, 0x84, 0xdb, 0x17, 0x43, 0x92 }} + +class NS_NO_VTABLE nsIComponentRegistrar : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOMPONENTREGISTRAR_IID) + + /** + * autoRegister + * + * Register a component file or all component files in a directory. + * + * Component files must have an associated loader and export the required + * symbols which this loader defines. For example, if the given file is a + * native library (which is built into XPCOM), it must export the symbol + * "NSGetModule". Other loaders may have different semantics. + * + * This method may only be called from the main thread. + * + * @param aSpec : Filename spec for component file's location. If aSpec + * is a directory, then every component file in the + * directory will be registered. + * If the aSpec is null, then the application component's + * directory as defined by NS_XPCOM_COMPONENT_DIR will be + * registered (see nsIDirectoryService.idl) + * + * @return NS_OK : Registration was successful. + * NS_ERROR: Method failure. + */ + /* void autoRegister (in nsIFile aSpec); */ + NS_IMETHOD AutoRegister(nsIFile *aSpec) = 0; + + /** + * autoUnregister + * + * Unregister a component file or all component files in a directory. + * This method may only be called from the main thread. + * + * @param aSpec : Filename spec for component file's location. If aSpec + * is a directory, the every component file in the directory + * will be registered. + * If aSpec is null, then the application component's + * directory as defined by NS_XPCOM_COMPONENT_DIR will be + * registered. (see nsIDirectoryService.idl) + * + * @return NS_OK Unregistration was successful. + * NS_ERROR* Method failure. + */ + /* void autoUnregister (in nsIFile aSpec); */ + NS_IMETHOD AutoUnregister(nsIFile *aSpec) = 0; + + /** + * registerFactory + * + * Register a factory with a given ContractID, CID and Class Name. + * + * @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 + * + * @return NS_OK Registration was successful. + * NS_ERROR* method failure. + */ + /* void registerFactory (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFactory aFactory); */ + NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory) = 0; + + /** + * unregisterFactory + * + * Unregister a factory associated with CID aClass. + * + * @param aClass : CID being unregistered + * @param aFactory : Factory previously registered to create instances of + * CID aClass. + * + * @return NS_OK Unregistration was successful. + * NS_ERROR* Method failure. + */ + /* void unregisterFactory (in nsCIDRef aClass, in nsIFactory aFactory); */ + NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) = 0; + + /** + * registerFactoryLocation + * + * Register a factory with a given ContractID, CID and Class Name + * + * @param aClass : CID of object + * @param aClassName : Class Name of CID + * @param aContractID : ContractID associated with CID aClass + * @param aFile : Component File. This file must have an associated + * loader and export the required symbols which this + * loader specifies. + * @param aLoaderStr : Opaque loader specific string. This value is + * passed into the nsIModule's registerSelf + * callback and must be fowarded unmodified when + * registering factories via their location. + * @param aType : Component Type of CID aClass. This value is + * passed into the nsIModule's registerSelf + * callback and must be fowarded unmodified when + * registering factories via their location. + * + * @return NS_OK Registration was successful. + * NS_ERROR* Method failure. + */ + /* void registerFactoryLocation (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aFile, in string aLoaderStr, in string aType); */ + NS_IMETHOD RegisterFactoryLocation(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aFile, const char *aLoaderStr, const char *aType) = 0; + + /** + * unregisterFactoryLocation + * + * Unregister a factory associated with CID aClass. + * + * @param aClass : CID being unregistered + * @param aFile : Component File previously registered + * + * @return NS_OK Unregistration was successful. + * NS_ERROR* Method failure. + */ + /* void unregisterFactoryLocation (in nsCIDRef aClass, in nsIFile aFile); */ + NS_IMETHOD UnregisterFactoryLocation(const nsCID & aClass, nsIFile *aFile) = 0; + + /** + * isCIDRegistered + * + * Returns true if a factory is registered for the CID. + * + * @param aClass : CID queried for registeration + * @return : true if a factory is registered for CID + * false otherwise. + */ + /* boolean isCIDRegistered (in nsCIDRef aClass); */ + NS_IMETHOD IsCIDRegistered(const nsCID & aClass, PRBool *_retval) = 0; + + /** + * isContractIDRegistered + * + * Returns true if a factory is registered for the contract id. + * + * @param aClass : contract id queried for registeration + * @return : true if a factory is registered for contract id + * false otherwise. + */ + /* boolean isContractIDRegistered (in string aContractID); */ + NS_IMETHOD IsContractIDRegistered(const char *aContractID, PRBool *_retval) = 0; + + /** + * enumerateCIDs + * + * Enumerate the list of all registered CIDs. + * + * @return : enumerator for CIDs. Elements of the enumeration can be QI'ed + * for the nsISupportsID interface. From the nsISupportsID, you + * can obtain the actual CID. + */ + /* nsISimpleEnumerator enumerateCIDs (); */ + NS_IMETHOD EnumerateCIDs(nsISimpleEnumerator **_retval) = 0; + + /** + * enumerateContractIDs + * + * Enumerate the list of all registered ContractIDs. + * + * @return : enumerator for ContractIDs. Elements of the enumeration can be + * QI'ed for the nsISupportsCString interface. From the + * nsISupportsCString interface, you can obtain the actual + * Contract ID string. + */ + /* nsISimpleEnumerator enumerateContractIDs (); */ + NS_IMETHOD EnumerateContractIDs(nsISimpleEnumerator **_retval) = 0; + + /** + * CIDToContractID + * + * Returns the Contract ID for a given CID, if one exists and is registered. + * + * @return : Contract ID. + */ + /* string CIDToContractID (in nsCIDRef aClass); */ + NS_IMETHOD CIDToContractID(const nsCID & aClass, char **_retval) = 0; + + /** + * contractIDToCID + * + * Returns the CID for a given Contract ID, if one exists and is registered. + * + * @return : Contract ID. + */ + /* nsCIDPtr contractIDToCID (in string aContractID); */ + NS_IMETHOD ContractIDToCID(const char *aContractID, nsCID * *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICOMPONENTREGISTRAR \ + NS_IMETHOD AutoRegister(nsIFile *aSpec); \ + NS_IMETHOD AutoUnregister(nsIFile *aSpec); \ + NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory); \ + NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory); \ + NS_IMETHOD RegisterFactoryLocation(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aFile, const char *aLoaderStr, const char *aType); \ + NS_IMETHOD UnregisterFactoryLocation(const nsCID & aClass, nsIFile *aFile); \ + NS_IMETHOD IsCIDRegistered(const nsCID & aClass, PRBool *_retval); \ + NS_IMETHOD IsContractIDRegistered(const char *aContractID, PRBool *_retval); \ + NS_IMETHOD EnumerateCIDs(nsISimpleEnumerator **_retval); \ + NS_IMETHOD EnumerateContractIDs(nsISimpleEnumerator **_retval); \ + NS_IMETHOD CIDToContractID(const nsCID & aClass, char **_retval); \ + NS_IMETHOD ContractIDToCID(const char *aContractID, nsCID * *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICOMPONENTREGISTRAR(_to) \ + NS_IMETHOD AutoRegister(nsIFile *aSpec) { return _to AutoRegister(aSpec); } \ + NS_IMETHOD AutoUnregister(nsIFile *aSpec) { return _to AutoUnregister(aSpec); } \ + NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory) { return _to RegisterFactory(aClass, aClassName, aContractID, aFactory); } \ + NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) { return _to UnregisterFactory(aClass, aFactory); } \ + NS_IMETHOD RegisterFactoryLocation(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aFile, const char *aLoaderStr, const char *aType) { return _to RegisterFactoryLocation(aClass, aClassName, aContractID, aFile, aLoaderStr, aType); } \ + NS_IMETHOD UnregisterFactoryLocation(const nsCID & aClass, nsIFile *aFile) { return _to UnregisterFactoryLocation(aClass, aFile); } \ + NS_IMETHOD IsCIDRegistered(const nsCID & aClass, PRBool *_retval) { return _to IsCIDRegistered(aClass, _retval); } \ + NS_IMETHOD IsContractIDRegistered(const char *aContractID, PRBool *_retval) { return _to IsContractIDRegistered(aContractID, _retval); } \ + NS_IMETHOD EnumerateCIDs(nsISimpleEnumerator **_retval) { return _to EnumerateCIDs(_retval); } \ + NS_IMETHOD EnumerateContractIDs(nsISimpleEnumerator **_retval) { return _to EnumerateContractIDs(_retval); } \ + NS_IMETHOD CIDToContractID(const nsCID & aClass, char **_retval) { return _to CIDToContractID(aClass, _retval); } \ + NS_IMETHOD ContractIDToCID(const char *aContractID, nsCID * *_retval) { return _to ContractIDToCID(aContractID, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICOMPONENTREGISTRAR(_to) \ + NS_IMETHOD AutoRegister(nsIFile *aSpec) { return !_to ? NS_ERROR_NULL_POINTER : _to->AutoRegister(aSpec); } \ + NS_IMETHOD AutoUnregister(nsIFile *aSpec) { return !_to ? NS_ERROR_NULL_POINTER : _to->AutoUnregister(aSpec); } \ + NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterFactory(aClass, aClassName, aContractID, aFactory); } \ + NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterFactory(aClass, aFactory); } \ + NS_IMETHOD RegisterFactoryLocation(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aFile, const char *aLoaderStr, const char *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterFactoryLocation(aClass, aClassName, aContractID, aFile, aLoaderStr, aType); } \ + NS_IMETHOD UnregisterFactoryLocation(const nsCID & aClass, nsIFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterFactoryLocation(aClass, aFile); } \ + NS_IMETHOD IsCIDRegistered(const nsCID & aClass, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCIDRegistered(aClass, _retval); } \ + NS_IMETHOD IsContractIDRegistered(const char *aContractID, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsContractIDRegistered(aContractID, _retval); } \ + NS_IMETHOD EnumerateCIDs(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCIDs(_retval); } \ + NS_IMETHOD EnumerateContractIDs(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateContractIDs(_retval); } \ + NS_IMETHOD CIDToContractID(const nsCID & aClass, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CIDToContractID(aClass, _retval); } \ + NS_IMETHOD ContractIDToCID(const char *aContractID, nsCID * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ContractIDToCID(aContractID, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsComponentRegistrar : public nsIComponentRegistrar +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICOMPONENTREGISTRAR + + nsComponentRegistrar(); + +private: + ~nsComponentRegistrar(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsComponentRegistrar, nsIComponentRegistrar) + +nsComponentRegistrar::nsComponentRegistrar() +{ + /* member initializers and constructor code */ +} + +nsComponentRegistrar::~nsComponentRegistrar() +{ + /* destructor code */ +} + +/* void autoRegister (in nsIFile aSpec); */ +NS_IMETHODIMP nsComponentRegistrar::AutoRegister(nsIFile *aSpec) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void autoUnregister (in nsIFile aSpec); */ +NS_IMETHODIMP nsComponentRegistrar::AutoUnregister(nsIFile *aSpec) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerFactory (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFactory aFactory); */ +NS_IMETHODIMP nsComponentRegistrar::RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterFactory (in nsCIDRef aClass, in nsIFactory aFactory); */ +NS_IMETHODIMP nsComponentRegistrar::UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerFactoryLocation (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aFile, in string aLoaderStr, in string aType); */ +NS_IMETHODIMP nsComponentRegistrar::RegisterFactoryLocation(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aFile, const char *aLoaderStr, const char *aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterFactoryLocation (in nsCIDRef aClass, in nsIFile aFile); */ +NS_IMETHODIMP nsComponentRegistrar::UnregisterFactoryLocation(const nsCID & aClass, nsIFile *aFile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isCIDRegistered (in nsCIDRef aClass); */ +NS_IMETHODIMP nsComponentRegistrar::IsCIDRegistered(const nsCID & aClass, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isContractIDRegistered (in string aContractID); */ +NS_IMETHODIMP nsComponentRegistrar::IsContractIDRegistered(const char *aContractID, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISimpleEnumerator enumerateCIDs (); */ +NS_IMETHODIMP nsComponentRegistrar::EnumerateCIDs(nsISimpleEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISimpleEnumerator enumerateContractIDs (); */ +NS_IMETHODIMP nsComponentRegistrar::EnumerateContractIDs(nsISimpleEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string CIDToContractID (in nsCIDRef aClass); */ +NS_IMETHODIMP nsComponentRegistrar::CIDToContractID(const nsCID & aClass, char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsCIDPtr contractIDToCID (in string aContractID); */ +NS_IMETHODIMP nsComponentRegistrar::ContractIDToCID(const char *aContractID, nsCID * *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIComponentRegistrar_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIContextMenuListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIContextMenuListener.h new file mode 100644 index 00000000..d9cc1121 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIContextMenuListener.h @@ -0,0 +1,149 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIContextMenuListener.idl + */ + +#ifndef __gen_nsIContextMenuListener_h__ +#define __gen_nsIContextMenuListener_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMEvent; /* forward declaration */ + +class nsIDOMNode; /* forward declaration */ + + +/* starting interface: nsIContextMenuListener */ +#define NS_ICONTEXTMENULISTENER_IID_STR "3478b6b0-3875-11d4-94ef-0020183bf181" + +#define NS_ICONTEXTMENULISTENER_IID \ + {0x3478b6b0, 0x3875, 0x11d4, \ + { 0x94, 0xef, 0x00, 0x20, 0x18, 0x3b, 0xf1, 0x81 }} + +/** + * An optional interface for embedding clients wishing to receive + * notifications for context menu events (e.g. generated by + * a user right-mouse clicking on a link). The embedder implements + * this interface on the web browser chrome object associated + * with the window that notifications are required for. When a context + * menu event, the browser will call this interface if present. + * + * @see nsIDOMNode + * @see nsIDOMEvent + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIContextMenuListener : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTEXTMENULISTENER_IID) + + /** Flag. No context. */ + enum { CONTEXT_NONE = 0U }; + + /** Flag. Context is a link element. */ + enum { CONTEXT_LINK = 1U }; + + /** Flag. Context is an image element. */ + enum { CONTEXT_IMAGE = 2U }; + + /** Flag. Context is the whole document. */ + enum { CONTEXT_DOCUMENT = 4U }; + + /** Flag. Context is a text area element. */ + enum { CONTEXT_TEXT = 8U }; + + /** Flag. Context is an input element. */ + enum { CONTEXT_INPUT = 16U }; + + /** + * Called when the browser receives a context menu event (e.g. user is right-mouse + * clicking somewhere on the document). The combination of flags, event and node + * provided in the call indicate where and what was clicked on. + * + * The following table describes what context flags and node combinations are + * possible. + * + * <TABLE> + * <TR><TD><B>aContextFlag</B></TD><TD>aNode</TD></TR> + * <TR><TD>CONTEXT_LINK</TD><TD><A></TD></TR> + * <TR><TD>CONTEXT_IMAGE</TD><TD><IMG></TD></TR> + * <TR><TD>CONTEXT_IMAGE | CONTEXT_LINK</TD><TD><IMG> + * with an <A> as an ancestor</TD></TR> + * <TR><TD>CONTEXT_INPUT</TD><TD><INPUT></TD></TR> + * <TR><TD>CONTEXT_TEXT</TD><TD><TEXTAREA></TD></TR> + * <TR><TD>CONTEXT_DOCUMENT</TD><TD><HTML></TD></TR> + * </TABLE> + * + * @param aContextFlags Flags indicating the kind of context. + * @param aEvent The DOM context menu event. + * @param aNode The DOM node most relevant to the context. + * + * @return <CODE>NS_OK</CODE> always. + */ + /* void onShowContextMenu (in unsigned long aContextFlags, in nsIDOMEvent aEvent, in nsIDOMNode aNode); */ + NS_IMETHOD OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICONTEXTMENULISTENER \ + NS_IMETHOD OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICONTEXTMENULISTENER(_to) \ + NS_IMETHOD OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode) { return _to OnShowContextMenu(aContextFlags, aEvent, aNode); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICONTEXTMENULISTENER(_to) \ + NS_IMETHOD OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnShowContextMenu(aContextFlags, aEvent, aNode); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsContextMenuListener : public nsIContextMenuListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICONTEXTMENULISTENER + + nsContextMenuListener(); + +private: + ~nsContextMenuListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsContextMenuListener, nsIContextMenuListener) + +nsContextMenuListener::nsContextMenuListener() +{ + /* member initializers and constructor code */ +} + +nsContextMenuListener::~nsContextMenuListener() +{ + /* destructor code */ +} + +/* void onShowContextMenu (in unsigned long aContextFlags, in nsIDOMEvent aEvent, in nsIDOMNode aNode); */ +NS_IMETHODIMP nsContextMenuListener::OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIContextMenuListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsICookie.h b/Src/nprt_plugin/gecko/1.8/win/include/nsICookie.h new file mode 100644 index 00000000..366a1a27 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsICookie.h @@ -0,0 +1,257 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/cookie/public/nsICookie.idl + */ + +#ifndef __gen_nsICookie_h__ +#define __gen_nsICookie_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +/** + * An optional interface for accessing the HTTP or + * javascript cookie object + * + * @status FROZEN + */ +typedef PRInt32 nsCookieStatus; + +typedef PRInt32 nsCookiePolicy; + + +/* starting interface: nsICookie */ +#define NS_ICOOKIE_IID_STR "e9fcb9a4-d376-458f-b720-e65e7df593bc" + +#define NS_ICOOKIE_IID \ + {0xe9fcb9a4, 0xd376, 0x458f, \ + { 0xb7, 0x20, 0xe6, 0x5e, 0x7d, 0xf5, 0x93, 0xbc }} + +class NS_NO_VTABLE nsICookie : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIE_IID) + + /** + * the name of the cookie + */ + /* readonly attribute ACString name; */ + NS_IMETHOD GetName(nsACString & aName) = 0; + + /** + * the cookie value + */ + /* readonly attribute ACString value; */ + NS_IMETHOD GetValue(nsACString & aValue) = 0; + + /** + * true if the cookie is a domain cookie, false otherwise + */ + /* readonly attribute boolean isDomain; */ + NS_IMETHOD GetIsDomain(PRBool *aIsDomain) = 0; + + /** + * the host (possibly fully qualified) of the cookie + */ + /* readonly attribute AUTF8String host; */ + NS_IMETHOD GetHost(nsACString & aHost) = 0; + + /** + * the path pertaining to the cookie + */ + /* readonly attribute AUTF8String path; */ + NS_IMETHOD GetPath(nsACString & aPath) = 0; + + /** + * true if the cookie was transmitted over ssl, false otherwise + */ + /* readonly attribute boolean isSecure; */ + NS_IMETHOD GetIsSecure(PRBool *aIsSecure) = 0; + + /** + * expiration time (local timezone) expressed as number of seconds since Jan 1, 1970 + */ + /* readonly attribute PRUint64 expires; */ + NS_IMETHOD GetExpires(PRUint64 *aExpires) = 0; + + /** + * P3P status of cookie. Values are + * + * STATUS_UNKNOWN -- cookie collected in a previous session and this info no longer available + * STATUS_ACCEPTED -- cookie was accepted as it + * STATUS_DOWNGRADED -- cookie was accepted but downgraded to a session cookie + * STATUS_FLAGGED -- cookie was accepted with a warning being issued to the user + * STATUS_REJECTED -- cookie was not accepted + */ + enum { STATUS_UNKNOWN = 0 }; + + enum { STATUS_ACCEPTED = 1 }; + + enum { STATUS_DOWNGRADED = 2 }; + + enum { STATUS_FLAGGED = 3 }; + + enum { STATUS_REJECTED = 4 }; + + /* readonly attribute nsCookieStatus status; */ + NS_IMETHOD GetStatus(nsCookieStatus *aStatus) = 0; + + /** + * Site's compact policy. Values are + * + * POLICY_UNKNOWN -- cookie collected in a previous session and this info no longer available + * POLICY_NONE -- site did not send a compact policy along with the cookie + * POLICY_NO_CONSENT -- site collects identfiable information without user involvement + * POLICY_IMPLICIT_CONSENT -- site collects identifiable information unless user opts out + * POLICY_EXPLICIT_CONSENT -- site does not collect identifiable information unless user opts in + * POLICY_NO_II -- site does not collect identifiable information + */ + enum { POLICY_UNKNOWN = 0 }; + + enum { POLICY_NONE = 1 }; + + enum { POLICY_NO_CONSENT = 2 }; + + enum { POLICY_IMPLICIT_CONSENT = 3 }; + + enum { POLICY_EXPLICIT_CONSENT = 4 }; + + enum { POLICY_NO_II = 5 }; + + /* readonly attribute nsCookiePolicy policy; */ + NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICOOKIE \ + NS_IMETHOD GetName(nsACString & aName); \ + NS_IMETHOD GetValue(nsACString & aValue); \ + NS_IMETHOD GetIsDomain(PRBool *aIsDomain); \ + NS_IMETHOD GetHost(nsACString & aHost); \ + NS_IMETHOD GetPath(nsACString & aPath); \ + NS_IMETHOD GetIsSecure(PRBool *aIsSecure); \ + NS_IMETHOD GetExpires(PRUint64 *aExpires); \ + NS_IMETHOD GetStatus(nsCookieStatus *aStatus); \ + NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICOOKIE(_to) \ + NS_IMETHOD GetName(nsACString & aName) { return _to GetName(aName); } \ + NS_IMETHOD GetValue(nsACString & aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD GetIsDomain(PRBool *aIsDomain) { return _to GetIsDomain(aIsDomain); } \ + NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \ + NS_IMETHOD GetPath(nsACString & aPath) { return _to GetPath(aPath); } \ + NS_IMETHOD GetIsSecure(PRBool *aIsSecure) { return _to GetIsSecure(aIsSecure); } \ + NS_IMETHOD GetExpires(PRUint64 *aExpires) { return _to GetExpires(aExpires); } \ + NS_IMETHOD GetStatus(nsCookieStatus *aStatus) { return _to GetStatus(aStatus); } \ + NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) { return _to GetPolicy(aPolicy); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICOOKIE(_to) \ + NS_IMETHOD GetName(nsACString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD GetValue(nsACString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD GetIsDomain(PRBool *aIsDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDomain(aIsDomain); } \ + NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \ + NS_IMETHOD GetPath(nsACString & aPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPath(aPath); } \ + NS_IMETHOD GetIsSecure(PRBool *aIsSecure) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsSecure(aIsSecure); } \ + NS_IMETHOD GetExpires(PRUint64 *aExpires) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExpires(aExpires); } \ + NS_IMETHOD GetStatus(nsCookieStatus *aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \ + NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPolicy(aPolicy); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsCookie : public nsICookie +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICOOKIE + + nsCookie(); + +private: + ~nsCookie(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsCookie, nsICookie) + +nsCookie::nsCookie() +{ + /* member initializers and constructor code */ +} + +nsCookie::~nsCookie() +{ + /* destructor code */ +} + +/* readonly attribute ACString name; */ +NS_IMETHODIMP nsCookie::GetName(nsACString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute ACString value; */ +NS_IMETHODIMP nsCookie::GetValue(nsACString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isDomain; */ +NS_IMETHODIMP nsCookie::GetIsDomain(PRBool *aIsDomain) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AUTF8String host; */ +NS_IMETHODIMP nsCookie::GetHost(nsACString & aHost) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AUTF8String path; */ +NS_IMETHODIMP nsCookie::GetPath(nsACString & aPath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isSecure; */ +NS_IMETHODIMP nsCookie::GetIsSecure(PRBool *aIsSecure) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRUint64 expires; */ +NS_IMETHODIMP nsCookie::GetExpires(PRUint64 *aExpires) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsCookieStatus status; */ +NS_IMETHODIMP nsCookie::GetStatus(nsCookieStatus *aStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsCookiePolicy policy; */ +NS_IMETHODIMP nsCookie::GetPolicy(nsCookiePolicy *aPolicy) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsICookie_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsICookieManager.h b/Src/nprt_plugin/gecko/1.8/win/include/nsICookieManager.h new file mode 100644 index 00000000..352c8f9d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsICookieManager.h @@ -0,0 +1,138 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/cookie/public/nsICookieManager.idl + */ + +#ifndef __gen_nsICookieManager_h__ +#define __gen_nsICookieManager_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsISimpleEnumerator_h__ +#include "nsISimpleEnumerator.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsICookieManager */ +#define NS_ICOOKIEMANAGER_IID_STR "aaab6710-0f2c-11d5-a53b-0010a401eb10" + +#define NS_ICOOKIEMANAGER_IID \ + {0xaaab6710, 0x0f2c, 0x11d5, \ + { 0xa5, 0x3b, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 }} + +/** + * An optional interface for accessing or removing the cookies + * that are in the cookie list + * + * @status FROZEN + */ +class NS_NO_VTABLE nsICookieManager : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIEMANAGER_IID) + + /** + * Called to remove all cookies from the cookie list + */ + /* void removeAll (); */ + NS_IMETHOD RemoveAll(void) = 0; + + /** + * Called to enumerate through each cookie in the cookie list. + * The objects enumerated over are of type nsICookie + */ + /* readonly attribute nsISimpleEnumerator enumerator; */ + NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) = 0; + + /** + * Called to remove an individual cookie from the cookie list + * + * @param aDomain The host or domain for which the cookie was set + * @param aName The name specified in the cookie + * @param aBlocked Indicates if cookies from this host should be permanently blocked + * + */ + /* void remove (in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked); */ + NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICOOKIEMANAGER \ + NS_IMETHOD RemoveAll(void); \ + NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator); \ + NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICOOKIEMANAGER(_to) \ + NS_IMETHOD RemoveAll(void) { return _to RemoveAll(); } \ + NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return _to GetEnumerator(aEnumerator); } \ + NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) { return _to Remove(aDomain, aName, aPath, aBlocked); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICOOKIEMANAGER(_to) \ + NS_IMETHOD RemoveAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAll(); } \ + NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); } \ + NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(aDomain, aName, aPath, aBlocked); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsCookieManager : public nsICookieManager +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICOOKIEMANAGER + + nsCookieManager(); + +private: + ~nsCookieManager(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsCookieManager, nsICookieManager) + +nsCookieManager::nsCookieManager() +{ + /* member initializers and constructor code */ +} + +nsCookieManager::~nsCookieManager() +{ + /* destructor code */ +} + +/* void removeAll (); */ +NS_IMETHODIMP nsCookieManager::RemoveAll() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsISimpleEnumerator enumerator; */ +NS_IMETHODIMP nsCookieManager::GetEnumerator(nsISimpleEnumerator * *aEnumerator) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void remove (in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked); */ +NS_IMETHODIMP nsCookieManager::Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsICookieManager_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsID.h b/Src/nprt_plugin/gecko/1.8/win/include/nsID.h new file mode 100644 index 00000000..80ca9d34 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsID.h @@ -0,0 +1,151 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsID_h__ +#define nsID_h__ + +#include <string.h> + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +/** + * A "unique identifier". This is modeled after OSF DCE UUIDs. + * @status FROZEN + */ + +struct nsID { + /** + * @name Indentifier values + */ + + //@{ + PRUint32 m0; + PRUint16 m1; + PRUint16 m2; + PRUint8 m3[8]; + //@} + + /** + * @name Methods + */ + + //@{ + /** + * Equivalency method. Compares this nsID with another. + * @return <b>PR_TRUE</b> if they are the same, <b>PR_FALSE</b> if not. + */ + + inline PRBool Equals(const nsID& other) const { + // One would think that this could be done faster with a really + // efficient implementation of memcmp(), but evidently no + // memcmp()'s out there are better than this code. + // + // See bug http://bugzilla.mozilla.org/show_bug.cgi?id=164580 for + // details. + + return (PRBool) + ((((PRUint32*) &m0)[0] == ((PRUint32*) &other.m0)[0]) && + (((PRUint32*) &m0)[1] == ((PRUint32*) &other.m0)[1]) && + (((PRUint32*) &m0)[2] == ((PRUint32*) &other.m0)[2]) && + (((PRUint32*) &m0)[3] == ((PRUint32*) &other.m0)[3])); + } + + /** + * nsID Parsing method. Turns a {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} + * string into an nsID + */ + NS_COM_GLUE PRBool Parse(const char *aIDStr); + + /** + * nsID string encoder. Returns an allocated string in + * {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} format. Caller should free string. + */ + NS_COM_GLUE char* ToString() const; + //@} +}; + +/* + * Class IDs + */ + +typedef nsID nsCID; + +// Define an CID +#define NS_DEFINE_CID(_name, _cidspec) \ + const nsCID _name = _cidspec + +#define REFNSCID const nsCID& + +/** + * An "interface id" which can be used to uniquely identify a given + * interface. + */ + +typedef nsID nsIID; + +/** + * A macro shorthand for <tt>const nsIID&<tt> + */ + +#define REFNSIID const nsIID& + +/** + * Define an IID + * obsolete - do not use this macro + */ + +#define NS_DEFINE_IID(_name, _iidspec) \ + const nsIID _name = _iidspec + +/** + * A macro to build the static const IID accessor method + */ + +#define NS_DEFINE_STATIC_IID_ACCESSOR(the_iid) \ + static const nsIID& GetIID() {static const nsIID iid = the_iid; return iid;} + +/** + * A macro to build the static const CID accessor method + */ + +#define NS_DEFINE_STATIC_CID_ACCESSOR(the_cid) \ + static const nsID& GetCID() {static const nsID cid = the_cid; return cid;} + +#endif + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOM3DocumentEvent.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOM3DocumentEvent.h new file mode 100644 index 00000000..85cbbf3f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOM3DocumentEvent.h @@ -0,0 +1,96 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOM3DocumentEvent.idl + */ + +#ifndef __gen_nsIDOM3DocumentEvent_h__ +#define __gen_nsIDOM3DocumentEvent_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOM3DocumentEvent */ +#define NS_IDOM3DOCUMENTEVENT_IID_STR "090ecc19-b7cb-4f47-ae47-ed68d4926249" + +#define NS_IDOM3DOCUMENTEVENT_IID \ + {0x090ecc19, 0xb7cb, 0x4f47, \ + { 0xae, 0x47, 0xed, 0x68, 0xd4, 0x92, 0x62, 0x49 }} + +/** + * The nsIDOMDocumentEvent interface is the interface to the event + * factory method on a DOM document object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Events/ + */ +class NS_NO_VTABLE nsIDOM3DocumentEvent : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOM3DOCUMENTEVENT_IID) + + /* nsIDOMEventGroup createEventGroup (); */ + NS_IMETHOD CreateEventGroup(nsIDOMEventGroup **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOM3DOCUMENTEVENT \ + NS_IMETHOD CreateEventGroup(nsIDOMEventGroup **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOM3DOCUMENTEVENT(_to) \ + NS_IMETHOD CreateEventGroup(nsIDOMEventGroup **_retval) { return _to CreateEventGroup(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOM3DOCUMENTEVENT(_to) \ + NS_IMETHOD CreateEventGroup(nsIDOMEventGroup **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateEventGroup(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOM3DocumentEvent : public nsIDOM3DocumentEvent +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOM3DOCUMENTEVENT + + nsDOM3DocumentEvent(); + +private: + ~nsDOM3DocumentEvent(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOM3DocumentEvent, nsIDOM3DocumentEvent) + +nsDOM3DocumentEvent::nsDOM3DocumentEvent() +{ + /* member initializers and constructor code */ +} + +nsDOM3DocumentEvent::~nsDOM3DocumentEvent() +{ + /* destructor code */ +} + +/* nsIDOMEventGroup createEventGroup (); */ +NS_IMETHODIMP nsDOM3DocumentEvent::CreateEventGroup(nsIDOMEventGroup **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOM3DocumentEvent_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOM3EventTarget.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOM3EventTarget.h new file mode 100644 index 00000000..1da73479 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOM3EventTarget.h @@ -0,0 +1,132 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOM3EventTarget.idl + */ + +#ifndef __gen_nsIDOM3EventTarget_h__ +#define __gen_nsIDOM3EventTarget_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOM3EventTarget */ +#define NS_IDOM3EVENTTARGET_IID_STR "3e9c01a7-de97-4c3b-8294-b4bd9d7056d1" + +#define NS_IDOM3EVENTTARGET_IID \ + {0x3e9c01a7, 0xde97, 0x4c3b, \ + { 0x82, 0x94, 0xb4, 0xbd, 0x9d, 0x70, 0x56, 0xd1 }} + +/** + * The nsIDOMEventTarget interface is the interface implemented by all + * event targets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Events/ + */ +class NS_NO_VTABLE nsIDOM3EventTarget : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOM3EVENTTARGET_IID) + + /* void addGroupedEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture, in nsIDOMEventGroup evtGroup); */ + NS_IMETHOD AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) = 0; + + /* void removeGroupedEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture, in nsIDOMEventGroup evtGroup); */ + NS_IMETHOD RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) = 0; + + /* boolean canTrigger (in DOMString type); */ + NS_IMETHOD CanTrigger(const nsAString & type, PRBool *_retval) = 0; + + /* boolean isRegisteredHere (in DOMString type); */ + NS_IMETHOD IsRegisteredHere(const nsAString & type, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOM3EVENTTARGET \ + NS_IMETHOD AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup); \ + NS_IMETHOD RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup); \ + NS_IMETHOD CanTrigger(const nsAString & type, PRBool *_retval); \ + NS_IMETHOD IsRegisteredHere(const nsAString & type, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOM3EVENTTARGET(_to) \ + NS_IMETHOD AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) { return _to AddGroupedEventListener(type, listener, useCapture, evtGroup); } \ + NS_IMETHOD RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) { return _to RemoveGroupedEventListener(type, listener, useCapture, evtGroup); } \ + NS_IMETHOD CanTrigger(const nsAString & type, PRBool *_retval) { return _to CanTrigger(type, _retval); } \ + NS_IMETHOD IsRegisteredHere(const nsAString & type, PRBool *_retval) { return _to IsRegisteredHere(type, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOM3EVENTTARGET(_to) \ + NS_IMETHOD AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddGroupedEventListener(type, listener, useCapture, evtGroup); } \ + NS_IMETHOD RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveGroupedEventListener(type, listener, useCapture, evtGroup); } \ + NS_IMETHOD CanTrigger(const nsAString & type, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanTrigger(type, _retval); } \ + NS_IMETHOD IsRegisteredHere(const nsAString & type, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsRegisteredHere(type, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOM3EventTarget : public nsIDOM3EventTarget +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOM3EVENTTARGET + + nsDOM3EventTarget(); + +private: + ~nsDOM3EventTarget(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOM3EventTarget, nsIDOM3EventTarget) + +nsDOM3EventTarget::nsDOM3EventTarget() +{ + /* member initializers and constructor code */ +} + +nsDOM3EventTarget::~nsDOM3EventTarget() +{ + /* destructor code */ +} + +/* void addGroupedEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture, in nsIDOMEventGroup evtGroup); */ +NS_IMETHODIMP nsDOM3EventTarget::AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeGroupedEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture, in nsIDOMEventGroup evtGroup); */ +NS_IMETHODIMP nsDOM3EventTarget::RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean canTrigger (in DOMString type); */ +NS_IMETHODIMP nsDOM3EventTarget::CanTrigger(const nsAString & type, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isRegisteredHere (in DOMString type); */ +NS_IMETHODIMP nsDOM3EventTarget::IsRegisteredHere(const nsAString & type, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOM3EventTarget_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMAbstractView.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMAbstractView.h new file mode 100644 index 00000000..50728099 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMAbstractView.h @@ -0,0 +1,98 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/views/nsIDOMAbstractView.idl + */ + +#ifndef __gen_nsIDOMAbstractView_h__ +#define __gen_nsIDOMAbstractView_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMAbstractView */ +#define NS_IDOMABSTRACTVIEW_IID_STR "f51ebade-8b1a-11d3-aae7-0010830123b4" + +#define NS_IDOMABSTRACTVIEW_IID \ + {0xf51ebade, 0x8b1a, 0x11d3, \ + { 0xaa, 0xe7, 0x00, 0x10, 0x83, 0x01, 0x23, 0xb4 }} + +class NS_NO_VTABLE nsIDOMAbstractView : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMABSTRACTVIEW_IID) + + /** + * The nsIDOMAbstractView interface is a datatype for a view in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Views + * + * @status FROZEN + */ + /* readonly attribute nsIDOMDocumentView document; */ + NS_IMETHOD GetDocument(nsIDOMDocumentView * *aDocument) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMABSTRACTVIEW \ + NS_IMETHOD GetDocument(nsIDOMDocumentView * *aDocument); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMABSTRACTVIEW(_to) \ + NS_IMETHOD GetDocument(nsIDOMDocumentView * *aDocument) { return _to GetDocument(aDocument); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMABSTRACTVIEW(_to) \ + NS_IMETHOD GetDocument(nsIDOMDocumentView * *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMAbstractView : public nsIDOMAbstractView +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMABSTRACTVIEW + + nsDOMAbstractView(); + +private: + ~nsDOMAbstractView(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMAbstractView, nsIDOMAbstractView) + +nsDOMAbstractView::nsDOMAbstractView() +{ + /* member initializers and constructor code */ +} + +nsDOMAbstractView::~nsDOMAbstractView() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMDocumentView document; */ +NS_IMETHODIMP nsDOMAbstractView::GetDocument(nsIDOMDocumentView * *aDocument) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMAbstractView_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMAttr.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMAttr.h new file mode 100644 index 00000000..392769f6 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMAttr.h @@ -0,0 +1,143 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMAttr.idl + */ + +#ifndef __gen_nsIDOMAttr_h__ +#define __gen_nsIDOMAttr_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMAttr */ +#define NS_IDOMATTR_IID_STR "a6cf9070-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMATTR_IID \ + {0xa6cf9070, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMAttr : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMATTR_IID) + + /** + * The nsIDOMAttr interface represents an attribute in an "Element" object. + * Typically the allowable values for the attribute are defined in a document + * type definition. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* readonly attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + + /* readonly attribute boolean specified; */ + NS_IMETHOD GetSpecified(PRBool *aSpecified) = 0; + + /* attribute DOMString value; */ + NS_IMETHOD GetValue(nsAString & aValue) = 0; + NS_IMETHOD SetValue(const nsAString & aValue) = 0; + + /* readonly attribute nsIDOMElement ownerElement; */ + NS_IMETHOD GetOwnerElement(nsIDOMElement * *aOwnerElement) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMATTR \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD GetSpecified(PRBool *aSpecified); \ + NS_IMETHOD GetValue(nsAString & aValue); \ + NS_IMETHOD SetValue(const nsAString & aValue); \ + NS_IMETHOD GetOwnerElement(nsIDOMElement * *aOwnerElement); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMATTR(_to) \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD GetSpecified(PRBool *aSpecified) { return _to GetSpecified(aSpecified); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } \ + NS_IMETHOD GetOwnerElement(nsIDOMElement * *aOwnerElement) { return _to GetOwnerElement(aOwnerElement); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMATTR(_to) \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD GetSpecified(PRBool *aSpecified) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSpecified(aSpecified); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } \ + NS_IMETHOD GetOwnerElement(nsIDOMElement * *aOwnerElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOwnerElement(aOwnerElement); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMAttr : public nsIDOMAttr +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMATTR + + nsDOMAttr(); + +private: + ~nsDOMAttr(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMAttr, nsIDOMAttr) + +nsDOMAttr::nsDOMAttr() +{ + /* member initializers and constructor code */ +} + +nsDOMAttr::~nsDOMAttr() +{ + /* destructor code */ +} + +/* readonly attribute DOMString name; */ +NS_IMETHODIMP nsDOMAttr::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean specified; */ +NS_IMETHODIMP nsDOMAttr::GetSpecified(PRBool *aSpecified) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString value; */ +NS_IMETHODIMP nsDOMAttr::GetValue(nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMAttr::SetValue(const nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMElement ownerElement; */ +NS_IMETHODIMP nsDOMAttr::GetOwnerElement(nsIDOMElement * *aOwnerElement) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMAttr_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMBarProp.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMBarProp.h new file mode 100644 index 00000000..fc76ac8a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMBarProp.h @@ -0,0 +1,104 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/base/nsIDOMBarProp.idl + */ + +#ifndef __gen_nsIDOMBarProp_h__ +#define __gen_nsIDOMBarProp_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMBarProp */ +#define NS_IDOMBARPROP_IID_STR "9eb2c150-1d56-11d3-8221-0060083a0bcf" + +#define NS_IDOMBARPROP_IID \ + {0x9eb2c150, 0x1d56, 0x11d3, \ + { 0x82, 0x21, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf }} + +class NS_NO_VTABLE nsIDOMBarProp : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMBARPROP_IID) + + /** + * The nsIDOMBarProp interface is the interface for controlling and + * accessing the visibility of certain UI items (scrollbars, menubars, + * toolbars, ...) through the DOM. + * + * @status FROZEN + */ + /* attribute boolean visible; */ + NS_IMETHOD GetVisible(PRBool *aVisible) = 0; + NS_IMETHOD SetVisible(PRBool aVisible) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMBARPROP \ + NS_IMETHOD GetVisible(PRBool *aVisible); \ + NS_IMETHOD SetVisible(PRBool aVisible); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMBARPROP(_to) \ + NS_IMETHOD GetVisible(PRBool *aVisible) { return _to GetVisible(aVisible); } \ + NS_IMETHOD SetVisible(PRBool aVisible) { return _to SetVisible(aVisible); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMBARPROP(_to) \ + NS_IMETHOD GetVisible(PRBool *aVisible) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVisible(aVisible); } \ + NS_IMETHOD SetVisible(PRBool aVisible) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVisible(aVisible); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMBarProp : public nsIDOMBarProp +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMBARPROP + + nsDOMBarProp(); + +private: + ~nsDOMBarProp(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMBarProp, nsIDOMBarProp) + +nsDOMBarProp::nsDOMBarProp() +{ + /* member initializers and constructor code */ +} + +nsDOMBarProp::~nsDOMBarProp() +{ + /* destructor code */ +} + +/* attribute boolean visible; */ +NS_IMETHODIMP nsDOMBarProp::GetVisible(PRBool *aVisible) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMBarProp::SetVisible(PRBool aVisible) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMBarProp_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCDATASection.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCDATASection.h new file mode 100644 index 00000000..60a51166 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCDATASection.h @@ -0,0 +1,80 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMCDATASection.idl + */ + +#ifndef __gen_nsIDOMCDATASection_h__ +#define __gen_nsIDOMCDATASection_h__ + + +#ifndef __gen_nsIDOMText_h__ +#include "nsIDOMText.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCDATASection */ +#define NS_IDOMCDATASECTION_IID_STR "a6cf9071-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMCDATASECTION_IID \ + {0xa6cf9071, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMCDATASection : public nsIDOMText { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCDATASECTION_IID) + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCDATASECTION \ + /* no methods! */ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCDATASECTION(_to) \ + /* no methods! */ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCDATASECTION(_to) \ + /* no methods! */ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCDATASection : public nsIDOMCDATASection +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCDATASECTION + + nsDOMCDATASection(); + +private: + ~nsDOMCDATASection(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCDATASection, nsIDOMCDATASection) + +nsDOMCDATASection::nsDOMCDATASection() +{ + /* member initializers and constructor code */ +} + +nsDOMCDATASection::~nsDOMCDATASection() +{ + /* destructor code */ +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCDATASection_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSPrimitiveValue.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSPrimitiveValue.h new file mode 100644 index 00000000..33a17864 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSPrimitiveValue.h @@ -0,0 +1,234 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSPrimitiveValue.idl + */ + +#ifndef __gen_nsIDOMCSSPrimitiveValue_h__ +#define __gen_nsIDOMCSSPrimitiveValue_h__ + + +#ifndef __gen_nsIDOMCSSValue_h__ +#include "nsIDOMCSSValue.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCSSPrimitiveValue */ +#define NS_IDOMCSSPRIMITIVEVALUE_IID_STR "e249031f-8df9-4e7a-b644-18946dce0019" + +#define NS_IDOMCSSPRIMITIVEVALUE_IID \ + {0xe249031f, 0x8df9, 0x4e7a, \ + { 0xb6, 0x44, 0x18, 0x94, 0x6d, 0xce, 0x00, 0x19 }} + +class NS_NO_VTABLE nsIDOMCSSPrimitiveValue : public nsIDOMCSSValue { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSPRIMITIVEVALUE_IID) + + /** + * The nsIDOMCSSPrimitiveValue interface is a datatype for a primitive + * CSS value in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + enum { CSS_UNKNOWN = 0U }; + + enum { CSS_NUMBER = 1U }; + + enum { CSS_PERCENTAGE = 2U }; + + enum { CSS_EMS = 3U }; + + enum { CSS_EXS = 4U }; + + enum { CSS_PX = 5U }; + + enum { CSS_CM = 6U }; + + enum { CSS_MM = 7U }; + + enum { CSS_IN = 8U }; + + enum { CSS_PT = 9U }; + + enum { CSS_PC = 10U }; + + enum { CSS_DEG = 11U }; + + enum { CSS_RAD = 12U }; + + enum { CSS_GRAD = 13U }; + + enum { CSS_MS = 14U }; + + enum { CSS_S = 15U }; + + enum { CSS_HZ = 16U }; + + enum { CSS_KHZ = 17U }; + + enum { CSS_DIMENSION = 18U }; + + enum { CSS_STRING = 19U }; + + enum { CSS_URI = 20U }; + + enum { CSS_IDENT = 21U }; + + enum { CSS_ATTR = 22U }; + + enum { CSS_COUNTER = 23U }; + + enum { CSS_RECT = 24U }; + + enum { CSS_RGBCOLOR = 25U }; + + /* readonly attribute unsigned short primitiveType; */ + NS_IMETHOD GetPrimitiveType(PRUint16 *aPrimitiveType) = 0; + + /* void setFloatValue (in unsigned short unitType, in float floatValue) raises (DOMException); */ + NS_IMETHOD SetFloatValue(PRUint16 unitType, float floatValue) = 0; + + /* float getFloatValue (in unsigned short unitType) raises (DOMException); */ + NS_IMETHOD GetFloatValue(PRUint16 unitType, float *_retval) = 0; + + /* void setStringValue (in unsigned short stringType, in DOMString stringValue) raises (DOMException); */ + NS_IMETHOD SetStringValue(PRUint16 stringType, const nsAString & stringValue) = 0; + + /* DOMString getStringValue () raises (DOMException); */ + NS_IMETHOD GetStringValue(nsAString & _retval) = 0; + + /* nsIDOMCounter getCounterValue () raises (DOMException); */ + NS_IMETHOD GetCounterValue(nsIDOMCounter **_retval) = 0; + + /* nsIDOMRect getRectValue () raises (DOMException); */ + NS_IMETHOD GetRectValue(nsIDOMRect **_retval) = 0; + + /* nsIDOMRGBColor getRGBColorValue () raises (DOMException); */ + NS_IMETHOD GetRGBColorValue(nsIDOMRGBColor **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCSSPRIMITIVEVALUE \ + NS_IMETHOD GetPrimitiveType(PRUint16 *aPrimitiveType); \ + NS_IMETHOD SetFloatValue(PRUint16 unitType, float floatValue); \ + NS_IMETHOD GetFloatValue(PRUint16 unitType, float *_retval); \ + NS_IMETHOD SetStringValue(PRUint16 stringType, const nsAString & stringValue); \ + NS_IMETHOD GetStringValue(nsAString & _retval); \ + NS_IMETHOD GetCounterValue(nsIDOMCounter **_retval); \ + NS_IMETHOD GetRectValue(nsIDOMRect **_retval); \ + NS_IMETHOD GetRGBColorValue(nsIDOMRGBColor **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCSSPRIMITIVEVALUE(_to) \ + NS_IMETHOD GetPrimitiveType(PRUint16 *aPrimitiveType) { return _to GetPrimitiveType(aPrimitiveType); } \ + NS_IMETHOD SetFloatValue(PRUint16 unitType, float floatValue) { return _to SetFloatValue(unitType, floatValue); } \ + NS_IMETHOD GetFloatValue(PRUint16 unitType, float *_retval) { return _to GetFloatValue(unitType, _retval); } \ + NS_IMETHOD SetStringValue(PRUint16 stringType, const nsAString & stringValue) { return _to SetStringValue(stringType, stringValue); } \ + NS_IMETHOD GetStringValue(nsAString & _retval) { return _to GetStringValue(_retval); } \ + NS_IMETHOD GetCounterValue(nsIDOMCounter **_retval) { return _to GetCounterValue(_retval); } \ + NS_IMETHOD GetRectValue(nsIDOMRect **_retval) { return _to GetRectValue(_retval); } \ + NS_IMETHOD GetRGBColorValue(nsIDOMRGBColor **_retval) { return _to GetRGBColorValue(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCSSPRIMITIVEVALUE(_to) \ + NS_IMETHOD GetPrimitiveType(PRUint16 *aPrimitiveType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimitiveType(aPrimitiveType); } \ + NS_IMETHOD SetFloatValue(PRUint16 unitType, float floatValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFloatValue(unitType, floatValue); } \ + NS_IMETHOD GetFloatValue(PRUint16 unitType, float *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFloatValue(unitType, _retval); } \ + NS_IMETHOD SetStringValue(PRUint16 stringType, const nsAString & stringValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStringValue(stringType, stringValue); } \ + NS_IMETHOD GetStringValue(nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStringValue(_retval); } \ + NS_IMETHOD GetCounterValue(nsIDOMCounter **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCounterValue(_retval); } \ + NS_IMETHOD GetRectValue(nsIDOMRect **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRectValue(_retval); } \ + NS_IMETHOD GetRGBColorValue(nsIDOMRGBColor **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRGBColorValue(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCSSPrimitiveValue : public nsIDOMCSSPrimitiveValue +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCSSPRIMITIVEVALUE + + nsDOMCSSPrimitiveValue(); + +private: + ~nsDOMCSSPrimitiveValue(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCSSPrimitiveValue, nsIDOMCSSPrimitiveValue) + +nsDOMCSSPrimitiveValue::nsDOMCSSPrimitiveValue() +{ + /* member initializers and constructor code */ +} + +nsDOMCSSPrimitiveValue::~nsDOMCSSPrimitiveValue() +{ + /* destructor code */ +} + +/* readonly attribute unsigned short primitiveType; */ +NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetPrimitiveType(PRUint16 *aPrimitiveType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setFloatValue (in unsigned short unitType, in float floatValue) raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSPrimitiveValue::SetFloatValue(PRUint16 unitType, float floatValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* float getFloatValue (in unsigned short unitType) raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetFloatValue(PRUint16 unitType, float *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setStringValue (in unsigned short stringType, in DOMString stringValue) raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSPrimitiveValue::SetStringValue(PRUint16 stringType, const nsAString & stringValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString getStringValue () raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetStringValue(nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMCounter getCounterValue () raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetCounterValue(nsIDOMCounter **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMRect getRectValue () raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetRectValue(nsIDOMRect **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMRGBColor getRGBColorValue () raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetRGBColorValue(nsIDOMRGBColor **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCSSPrimitiveValue_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSRule.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSRule.h new file mode 100644 index 00000000..d3b063bd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSRule.h @@ -0,0 +1,156 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSRule.idl + */ + +#ifndef __gen_nsIDOMCSSRule_h__ +#define __gen_nsIDOMCSSRule_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCSSRule */ +#define NS_IDOMCSSRULE_IID_STR "a6cf90c1-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMCSSRULE_IID \ + {0xa6cf90c1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMCSSRule : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSRULE_IID) + + /** + * The nsIDOMCSSRule interface is a datatype for a CSS style rule in + * the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + enum { UNKNOWN_RULE = 0U }; + + enum { STYLE_RULE = 1U }; + + enum { CHARSET_RULE = 2U }; + + enum { IMPORT_RULE = 3U }; + + enum { MEDIA_RULE = 4U }; + + enum { FONT_FACE_RULE = 5U }; + + enum { PAGE_RULE = 6U }; + + /* readonly attribute unsigned short type; */ + NS_IMETHOD GetType(PRUint16 *aType) = 0; + + /* attribute DOMString cssText; */ + NS_IMETHOD GetCssText(nsAString & aCssText) = 0; + NS_IMETHOD SetCssText(const nsAString & aCssText) = 0; + + /* readonly attribute nsIDOMCSSStyleSheet parentStyleSheet; */ + NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet) = 0; + + /* readonly attribute nsIDOMCSSRule parentRule; */ + NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCSSRULE \ + NS_IMETHOD GetType(PRUint16 *aType); \ + NS_IMETHOD GetCssText(nsAString & aCssText); \ + NS_IMETHOD SetCssText(const nsAString & aCssText); \ + NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet); \ + NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCSSRULE(_to) \ + NS_IMETHOD GetType(PRUint16 *aType) { return _to GetType(aType); } \ + NS_IMETHOD GetCssText(nsAString & aCssText) { return _to GetCssText(aCssText); } \ + NS_IMETHOD SetCssText(const nsAString & aCssText) { return _to SetCssText(aCssText); } \ + NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet) { return _to GetParentStyleSheet(aParentStyleSheet); } \ + NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) { return _to GetParentRule(aParentRule); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCSSRULE(_to) \ + NS_IMETHOD GetType(PRUint16 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD GetCssText(nsAString & aCssText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCssText(aCssText); } \ + NS_IMETHOD SetCssText(const nsAString & aCssText) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCssText(aCssText); } \ + NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentStyleSheet(aParentStyleSheet); } \ + NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentRule(aParentRule); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCSSRule : public nsIDOMCSSRule +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCSSRULE + + nsDOMCSSRule(); + +private: + ~nsDOMCSSRule(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCSSRule, nsIDOMCSSRule) + +nsDOMCSSRule::nsDOMCSSRule() +{ + /* member initializers and constructor code */ +} + +nsDOMCSSRule::~nsDOMCSSRule() +{ + /* destructor code */ +} + +/* readonly attribute unsigned short type; */ +NS_IMETHODIMP nsDOMCSSRule::GetType(PRUint16 *aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString cssText; */ +NS_IMETHODIMP nsDOMCSSRule::GetCssText(nsAString & aCssText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMCSSRule::SetCssText(const nsAString & aCssText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMCSSStyleSheet parentStyleSheet; */ +NS_IMETHODIMP nsDOMCSSRule::GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMCSSRule parentRule; */ +NS_IMETHODIMP nsDOMCSSRule::GetParentRule(nsIDOMCSSRule * *aParentRule) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCSSRule_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSRuleList.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSRuleList.h new file mode 100644 index 00000000..442db273 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSRuleList.h @@ -0,0 +1,110 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSRuleList.idl + */ + +#ifndef __gen_nsIDOMCSSRuleList_h__ +#define __gen_nsIDOMCSSRuleList_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCSSRuleList */ +#define NS_IDOMCSSRULELIST_IID_STR "a6cf90c0-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMCSSRULELIST_IID \ + {0xa6cf90c0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMCSSRuleList : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSRULELIST_IID) + + /** + * The nsIDOMCSSRuleList interface is a datatype for a list of CSS + * style rules in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* nsIDOMCSSRule item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsIDOMCSSRule **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCSSRULELIST \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD Item(PRUint32 index, nsIDOMCSSRule **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCSSRULELIST(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMCSSRule **_retval) { return _to Item(index, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCSSRULELIST(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMCSSRule **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCSSRuleList : public nsIDOMCSSRuleList +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCSSRULELIST + + nsDOMCSSRuleList(); + +private: + ~nsDOMCSSRuleList(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCSSRuleList, nsIDOMCSSRuleList) + +nsDOMCSSRuleList::nsDOMCSSRuleList() +{ + /* member initializers and constructor code */ +} + +nsDOMCSSRuleList::~nsDOMCSSRuleList() +{ + /* destructor code */ +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMCSSRuleList::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMCSSRule item (in unsigned long index); */ +NS_IMETHODIMP nsDOMCSSRuleList::Item(PRUint32 index, nsIDOMCSSRule **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCSSRuleList_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSStyleDeclaration.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSStyleDeclaration.h new file mode 100644 index 00000000..796f2782 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSStyleDeclaration.h @@ -0,0 +1,202 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSStyleDeclaration.idl + */ + +#ifndef __gen_nsIDOMCSSStyleDeclaration_h__ +#define __gen_nsIDOMCSSStyleDeclaration_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCSSStyleDeclaration */ +#define NS_IDOMCSSSTYLEDECLARATION_IID_STR "a6cf90be-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMCSSSTYLEDECLARATION_IID \ + {0xa6cf90be, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMCSSStyleDeclaration : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSSTYLEDECLARATION_IID) + + /** + * The nsIDOMCSSStyleDeclaration interface is a datatype for a CSS + * style declaration in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + /* attribute DOMString cssText; */ + NS_IMETHOD GetCssText(nsAString & aCssText) = 0; + NS_IMETHOD SetCssText(const nsAString & aCssText) = 0; + + /* DOMString getPropertyValue (in DOMString propertyName); */ + NS_IMETHOD GetPropertyValue(const nsAString & propertyName, nsAString & _retval) = 0; + + /* nsIDOMCSSValue getPropertyCSSValue (in DOMString propertyName); */ + NS_IMETHOD GetPropertyCSSValue(const nsAString & propertyName, nsIDOMCSSValue **_retval) = 0; + + /* DOMString removeProperty (in DOMString propertyName) raises (DOMException); */ + NS_IMETHOD RemoveProperty(const nsAString & propertyName, nsAString & _retval) = 0; + + /* DOMString getPropertyPriority (in DOMString propertyName); */ + NS_IMETHOD GetPropertyPriority(const nsAString & propertyName, nsAString & _retval) = 0; + + /* void setProperty (in DOMString propertyName, in DOMString value, in DOMString priority) raises (DOMException); */ + NS_IMETHOD SetProperty(const nsAString & propertyName, const nsAString & value, const nsAString & priority) = 0; + + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* DOMString item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsAString & _retval) = 0; + + /* readonly attribute nsIDOMCSSRule parentRule; */ + NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCSSSTYLEDECLARATION \ + NS_IMETHOD GetCssText(nsAString & aCssText); \ + NS_IMETHOD SetCssText(const nsAString & aCssText); \ + NS_IMETHOD GetPropertyValue(const nsAString & propertyName, nsAString & _retval); \ + NS_IMETHOD GetPropertyCSSValue(const nsAString & propertyName, nsIDOMCSSValue **_retval); \ + NS_IMETHOD RemoveProperty(const nsAString & propertyName, nsAString & _retval); \ + NS_IMETHOD GetPropertyPriority(const nsAString & propertyName, nsAString & _retval); \ + NS_IMETHOD SetProperty(const nsAString & propertyName, const nsAString & value, const nsAString & priority); \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD Item(PRUint32 index, nsAString & _retval); \ + NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCSSSTYLEDECLARATION(_to) \ + NS_IMETHOD GetCssText(nsAString & aCssText) { return _to GetCssText(aCssText); } \ + NS_IMETHOD SetCssText(const nsAString & aCssText) { return _to SetCssText(aCssText); } \ + NS_IMETHOD GetPropertyValue(const nsAString & propertyName, nsAString & _retval) { return _to GetPropertyValue(propertyName, _retval); } \ + NS_IMETHOD GetPropertyCSSValue(const nsAString & propertyName, nsIDOMCSSValue **_retval) { return _to GetPropertyCSSValue(propertyName, _retval); } \ + NS_IMETHOD RemoveProperty(const nsAString & propertyName, nsAString & _retval) { return _to RemoveProperty(propertyName, _retval); } \ + NS_IMETHOD GetPropertyPriority(const nsAString & propertyName, nsAString & _retval) { return _to GetPropertyPriority(propertyName, _retval); } \ + NS_IMETHOD SetProperty(const nsAString & propertyName, const nsAString & value, const nsAString & priority) { return _to SetProperty(propertyName, value, priority); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsAString & _retval) { return _to Item(index, _retval); } \ + NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) { return _to GetParentRule(aParentRule); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCSSSTYLEDECLARATION(_to) \ + NS_IMETHOD GetCssText(nsAString & aCssText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCssText(aCssText); } \ + NS_IMETHOD SetCssText(const nsAString & aCssText) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCssText(aCssText); } \ + NS_IMETHOD GetPropertyValue(const nsAString & propertyName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPropertyValue(propertyName, _retval); } \ + NS_IMETHOD GetPropertyCSSValue(const nsAString & propertyName, nsIDOMCSSValue **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPropertyCSSValue(propertyName, _retval); } \ + NS_IMETHOD RemoveProperty(const nsAString & propertyName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveProperty(propertyName, _retval); } \ + NS_IMETHOD GetPropertyPriority(const nsAString & propertyName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPropertyPriority(propertyName, _retval); } \ + NS_IMETHOD SetProperty(const nsAString & propertyName, const nsAString & value, const nsAString & priority) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProperty(propertyName, value, priority); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \ + NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentRule(aParentRule); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCSSStyleDeclaration : public nsIDOMCSSStyleDeclaration +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCSSSTYLEDECLARATION + + nsDOMCSSStyleDeclaration(); + +private: + ~nsDOMCSSStyleDeclaration(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCSSStyleDeclaration, nsIDOMCSSStyleDeclaration) + +nsDOMCSSStyleDeclaration::nsDOMCSSStyleDeclaration() +{ + /* member initializers and constructor code */ +} + +nsDOMCSSStyleDeclaration::~nsDOMCSSStyleDeclaration() +{ + /* destructor code */ +} + +/* attribute DOMString cssText; */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::GetCssText(nsAString & aCssText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMCSSStyleDeclaration::SetCssText(const nsAString & aCssText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString getPropertyValue (in DOMString propertyName); */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::GetPropertyValue(const nsAString & propertyName, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMCSSValue getPropertyCSSValue (in DOMString propertyName); */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::GetPropertyCSSValue(const nsAString & propertyName, nsIDOMCSSValue **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString removeProperty (in DOMString propertyName) raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::RemoveProperty(const nsAString & propertyName, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString getPropertyPriority (in DOMString propertyName); */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::GetPropertyPriority(const nsAString & propertyName, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setProperty (in DOMString propertyName, in DOMString value, in DOMString priority) raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::SetProperty(const nsAString & propertyName, const nsAString & value, const nsAString & priority) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString item (in unsigned long index); */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::Item(PRUint32 index, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMCSSRule parentRule; */ +NS_IMETHODIMP nsDOMCSSStyleDeclaration::GetParentRule(nsIDOMCSSRule * *aParentRule) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCSSStyleDeclaration_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSStyleSheet.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSStyleSheet.h new file mode 100644 index 00000000..807bd307 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSStyleSheet.h @@ -0,0 +1,134 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSStyleSheet.idl + */ + +#ifndef __gen_nsIDOMCSSStyleSheet_h__ +#define __gen_nsIDOMCSSStyleSheet_h__ + + +#ifndef __gen_nsIDOMStyleSheet_h__ +#include "nsIDOMStyleSheet.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCSSStyleSheet */ +#define NS_IDOMCSSSTYLESHEET_IID_STR "a6cf90c2-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMCSSSTYLESHEET_IID \ + {0xa6cf90c2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMCSSStyleSheet : public nsIDOMStyleSheet { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSSTYLESHEET_IID) + + /** + * The nsIDOMCSSStyleSheet interface is a datatype for a CSS style + * sheet in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + /* readonly attribute nsIDOMCSSRule ownerRule; */ + NS_IMETHOD GetOwnerRule(nsIDOMCSSRule * *aOwnerRule) = 0; + + /* readonly attribute nsIDOMCSSRuleList cssRules; */ + NS_IMETHOD GetCssRules(nsIDOMCSSRuleList * *aCssRules) = 0; + + /* unsigned long insertRule (in DOMString rule, in unsigned long index) raises (DOMException); */ + NS_IMETHOD InsertRule(const nsAString & rule, PRUint32 index, PRUint32 *_retval) = 0; + + /* void deleteRule (in unsigned long index) raises (DOMException); */ + NS_IMETHOD DeleteRule(PRUint32 index) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCSSSTYLESHEET \ + NS_IMETHOD GetOwnerRule(nsIDOMCSSRule * *aOwnerRule); \ + NS_IMETHOD GetCssRules(nsIDOMCSSRuleList * *aCssRules); \ + NS_IMETHOD InsertRule(const nsAString & rule, PRUint32 index, PRUint32 *_retval); \ + NS_IMETHOD DeleteRule(PRUint32 index); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCSSSTYLESHEET(_to) \ + NS_IMETHOD GetOwnerRule(nsIDOMCSSRule * *aOwnerRule) { return _to GetOwnerRule(aOwnerRule); } \ + NS_IMETHOD GetCssRules(nsIDOMCSSRuleList * *aCssRules) { return _to GetCssRules(aCssRules); } \ + NS_IMETHOD InsertRule(const nsAString & rule, PRUint32 index, PRUint32 *_retval) { return _to InsertRule(rule, index, _retval); } \ + NS_IMETHOD DeleteRule(PRUint32 index) { return _to DeleteRule(index); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCSSSTYLESHEET(_to) \ + NS_IMETHOD GetOwnerRule(nsIDOMCSSRule * *aOwnerRule) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOwnerRule(aOwnerRule); } \ + NS_IMETHOD GetCssRules(nsIDOMCSSRuleList * *aCssRules) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCssRules(aCssRules); } \ + NS_IMETHOD InsertRule(const nsAString & rule, PRUint32 index, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertRule(rule, index, _retval); } \ + NS_IMETHOD DeleteRule(PRUint32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteRule(index); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCSSStyleSheet : public nsIDOMCSSStyleSheet +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCSSSTYLESHEET + + nsDOMCSSStyleSheet(); + +private: + ~nsDOMCSSStyleSheet(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCSSStyleSheet, nsIDOMCSSStyleSheet) + +nsDOMCSSStyleSheet::nsDOMCSSStyleSheet() +{ + /* member initializers and constructor code */ +} + +nsDOMCSSStyleSheet::~nsDOMCSSStyleSheet() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMCSSRule ownerRule; */ +NS_IMETHODIMP nsDOMCSSStyleSheet::GetOwnerRule(nsIDOMCSSRule * *aOwnerRule) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMCSSRuleList cssRules; */ +NS_IMETHODIMP nsDOMCSSStyleSheet::GetCssRules(nsIDOMCSSRuleList * *aCssRules) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* unsigned long insertRule (in DOMString rule, in unsigned long index) raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSStyleSheet::InsertRule(const nsAString & rule, PRUint32 index, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteRule (in unsigned long index) raises (DOMException); */ +NS_IMETHODIMP nsDOMCSSStyleSheet::DeleteRule(PRUint32 index) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCSSStyleSheet_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSValue.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSValue.h new file mode 100644 index 00000000..0c4a6e13 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSValue.h @@ -0,0 +1,126 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSValue.idl + */ + +#ifndef __gen_nsIDOMCSSValue_h__ +#define __gen_nsIDOMCSSValue_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCSSValue */ +#define NS_IDOMCSSVALUE_IID_STR "009f7ea5-9e80-41be-b008-db62f10823f2" + +#define NS_IDOMCSSVALUE_IID \ + {0x009f7ea5, 0x9e80, 0x41be, \ + { 0xb0, 0x08, 0xdb, 0x62, 0xf1, 0x08, 0x23, 0xf2 }} + +class NS_NO_VTABLE nsIDOMCSSValue : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSVALUE_IID) + + /** + * The nsIDOMCSSValue interface is a datatype for a CSS value in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + enum { CSS_INHERIT = 0U }; + + enum { CSS_PRIMITIVE_VALUE = 1U }; + + enum { CSS_VALUE_LIST = 2U }; + + enum { CSS_CUSTOM = 3U }; + + /* attribute DOMString cssText; */ + NS_IMETHOD GetCssText(nsAString & aCssText) = 0; + NS_IMETHOD SetCssText(const nsAString & aCssText) = 0; + + /* readonly attribute unsigned short cssValueType; */ + NS_IMETHOD GetCssValueType(PRUint16 *aCssValueType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCSSVALUE \ + NS_IMETHOD GetCssText(nsAString & aCssText); \ + NS_IMETHOD SetCssText(const nsAString & aCssText); \ + NS_IMETHOD GetCssValueType(PRUint16 *aCssValueType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCSSVALUE(_to) \ + NS_IMETHOD GetCssText(nsAString & aCssText) { return _to GetCssText(aCssText); } \ + NS_IMETHOD SetCssText(const nsAString & aCssText) { return _to SetCssText(aCssText); } \ + NS_IMETHOD GetCssValueType(PRUint16 *aCssValueType) { return _to GetCssValueType(aCssValueType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCSSVALUE(_to) \ + NS_IMETHOD GetCssText(nsAString & aCssText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCssText(aCssText); } \ + NS_IMETHOD SetCssText(const nsAString & aCssText) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCssText(aCssText); } \ + NS_IMETHOD GetCssValueType(PRUint16 *aCssValueType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCssValueType(aCssValueType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCSSValue : public nsIDOMCSSValue +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCSSVALUE + + nsDOMCSSValue(); + +private: + ~nsDOMCSSValue(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCSSValue, nsIDOMCSSValue) + +nsDOMCSSValue::nsDOMCSSValue() +{ + /* member initializers and constructor code */ +} + +nsDOMCSSValue::~nsDOMCSSValue() +{ + /* destructor code */ +} + +/* attribute DOMString cssText; */ +NS_IMETHODIMP nsDOMCSSValue::GetCssText(nsAString & aCssText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMCSSValue::SetCssText(const nsAString & aCssText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned short cssValueType; */ +NS_IMETHODIMP nsDOMCSSValue::GetCssValueType(PRUint16 *aCssValueType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCSSValue_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSValueList.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSValueList.h new file mode 100644 index 00000000..89549d9a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCSSValueList.h @@ -0,0 +1,110 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSValueList.idl + */ + +#ifndef __gen_nsIDOMCSSValueList_h__ +#define __gen_nsIDOMCSSValueList_h__ + + +#ifndef __gen_nsIDOMCSSValue_h__ +#include "nsIDOMCSSValue.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCSSValueList */ +#define NS_IDOMCSSVALUELIST_IID_STR "8f09fa84-39b9-4dca-9b2f-db0eeb186286" + +#define NS_IDOMCSSVALUELIST_IID \ + {0x8f09fa84, 0x39b9, 0x4dca, \ + { 0x9b, 0x2f, 0xdb, 0x0e, 0xeb, 0x18, 0x62, 0x86 }} + +class NS_NO_VTABLE nsIDOMCSSValueList : public nsIDOMCSSValue { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSVALUELIST_IID) + + /** + * The nsIDOMCSSValueList interface is a datatype for a list of CSS + * values in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* nsIDOMCSSValue item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsIDOMCSSValue **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCSSVALUELIST \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD Item(PRUint32 index, nsIDOMCSSValue **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCSSVALUELIST(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMCSSValue **_retval) { return _to Item(index, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCSSVALUELIST(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMCSSValue **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCSSValueList : public nsIDOMCSSValueList +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCSSVALUELIST + + nsDOMCSSValueList(); + +private: + ~nsDOMCSSValueList(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCSSValueList, nsIDOMCSSValueList) + +nsDOMCSSValueList::nsDOMCSSValueList() +{ + /* member initializers and constructor code */ +} + +nsDOMCSSValueList::~nsDOMCSSValueList() +{ + /* destructor code */ +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMCSSValueList::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMCSSValue item (in unsigned long index); */ +NS_IMETHODIMP nsDOMCSSValueList::Item(PRUint32 index, nsIDOMCSSValue **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCSSValueList_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCharacterData.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCharacterData.h new file mode 100644 index 00000000..38ed891d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCharacterData.h @@ -0,0 +1,178 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMCharacterData.idl + */ + +#ifndef __gen_nsIDOMCharacterData_h__ +#define __gen_nsIDOMCharacterData_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCharacterData */ +#define NS_IDOMCHARACTERDATA_IID_STR "a6cf9072-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMCHARACTERDATA_IID \ + {0xa6cf9072, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMCharacterData : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCHARACTERDATA_IID) + + /** + * The nsIDOMCharacterData interface extends nsIDOMNode with a set of + * attributes and methods for accessing character data in the DOM. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* attribute DOMString data; */ + NS_IMETHOD GetData(nsAString & aData) = 0; + NS_IMETHOD SetData(const nsAString & aData) = 0; + + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* DOMString substringData (in unsigned long offset, in unsigned long count) raises (DOMException); */ + NS_IMETHOD SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval) = 0; + + /* void appendData (in DOMString arg) raises (DOMException); */ + NS_IMETHOD AppendData(const nsAString & arg) = 0; + + /* void insertData (in unsigned long offset, in DOMString arg) raises (DOMException); */ + NS_IMETHOD InsertData(PRUint32 offset, const nsAString & arg) = 0; + + /* void deleteData (in unsigned long offset, in unsigned long count) raises (DOMException); */ + NS_IMETHOD DeleteData(PRUint32 offset, PRUint32 count) = 0; + + /* void replaceData (in unsigned long offset, in unsigned long count, in DOMString arg) raises (DOMException); */ + NS_IMETHOD ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCHARACTERDATA \ + NS_IMETHOD GetData(nsAString & aData); \ + NS_IMETHOD SetData(const nsAString & aData); \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval); \ + NS_IMETHOD AppendData(const nsAString & arg); \ + NS_IMETHOD InsertData(PRUint32 offset, const nsAString & arg); \ + NS_IMETHOD DeleteData(PRUint32 offset, PRUint32 count); \ + NS_IMETHOD ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCHARACTERDATA(_to) \ + NS_IMETHOD GetData(nsAString & aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(const nsAString & aData) { return _to SetData(aData); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval) { return _to SubstringData(offset, count, _retval); } \ + NS_IMETHOD AppendData(const nsAString & arg) { return _to AppendData(arg); } \ + NS_IMETHOD InsertData(PRUint32 offset, const nsAString & arg) { return _to InsertData(offset, arg); } \ + NS_IMETHOD DeleteData(PRUint32 offset, PRUint32 count) { return _to DeleteData(offset, count); } \ + NS_IMETHOD ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg) { return _to ReplaceData(offset, count, arg); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCHARACTERDATA(_to) \ + NS_IMETHOD GetData(nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SubstringData(offset, count, _retval); } \ + NS_IMETHOD AppendData(const nsAString & arg) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendData(arg); } \ + NS_IMETHOD InsertData(PRUint32 offset, const nsAString & arg) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertData(offset, arg); } \ + NS_IMETHOD DeleteData(PRUint32 offset, PRUint32 count) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteData(offset, count); } \ + NS_IMETHOD ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReplaceData(offset, count, arg); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCharacterData : public nsIDOMCharacterData +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCHARACTERDATA + + nsDOMCharacterData(); + +private: + ~nsDOMCharacterData(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCharacterData, nsIDOMCharacterData) + +nsDOMCharacterData::nsDOMCharacterData() +{ + /* member initializers and constructor code */ +} + +nsDOMCharacterData::~nsDOMCharacterData() +{ + /* destructor code */ +} + +/* attribute DOMString data; */ +NS_IMETHODIMP nsDOMCharacterData::GetData(nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMCharacterData::SetData(const nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMCharacterData::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString substringData (in unsigned long offset, in unsigned long count) raises (DOMException); */ +NS_IMETHODIMP nsDOMCharacterData::SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void appendData (in DOMString arg) raises (DOMException); */ +NS_IMETHODIMP nsDOMCharacterData::AppendData(const nsAString & arg) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void insertData (in unsigned long offset, in DOMString arg) raises (DOMException); */ +NS_IMETHODIMP nsDOMCharacterData::InsertData(PRUint32 offset, const nsAString & arg) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteData (in unsigned long offset, in unsigned long count) raises (DOMException); */ +NS_IMETHODIMP nsDOMCharacterData::DeleteData(PRUint32 offset, PRUint32 count) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void replaceData (in unsigned long offset, in unsigned long count, in DOMString arg) raises (DOMException); */ +NS_IMETHODIMP nsDOMCharacterData::ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCharacterData_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMComment.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMComment.h new file mode 100644 index 00000000..19c59739 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMComment.h @@ -0,0 +1,80 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMComment.idl + */ + +#ifndef __gen_nsIDOMComment_h__ +#define __gen_nsIDOMComment_h__ + + +#ifndef __gen_nsIDOMCharacterData_h__ +#include "nsIDOMCharacterData.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMComment */ +#define NS_IDOMCOMMENT_IID_STR "a6cf9073-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMCOMMENT_IID \ + {0xa6cf9073, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMComment : public nsIDOMCharacterData { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCOMMENT_IID) + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCOMMENT \ + /* no methods! */ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCOMMENT(_to) \ + /* no methods! */ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCOMMENT(_to) \ + /* no methods! */ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMComment : public nsIDOMComment +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCOMMENT + + nsDOMComment(); + +private: + ~nsDOMComment(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMComment, nsIDOMComment) + +nsDOMComment::nsDOMComment() +{ + /* member initializers and constructor code */ +} + +nsDOMComment::~nsDOMComment() +{ + /* destructor code */ +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMComment_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCustomEvent.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCustomEvent.h new file mode 100644 index 00000000..8c218223 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMCustomEvent.h @@ -0,0 +1,108 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOMCustomEvent.idl + */ + +#ifndef __gen_nsIDOMCustomEvent_h__ +#define __gen_nsIDOMCustomEvent_h__ + + +#ifndef __gen_nsIDOMEvent_h__ +#include "nsIDOMEvent.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMCustomEvent */ +#define NS_IDOMCUSTOMEVENT_IID_STR "55c7af7b-1a64-40bf-87eb-2c2cbee0491b" + +#define NS_IDOMCUSTOMEVENT_IID \ + {0x55c7af7b, 0x1a64, 0x40bf, \ + { 0x87, 0xeb, 0x2c, 0x2c, 0xbe, 0xe0, 0x49, 0x1b }} + +/** + * The nsIDOMEventTarget interface is the interface implemented by all + * event targets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Events/ + */ +class NS_NO_VTABLE nsIDOMCustomEvent : public nsIDOMEvent { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCUSTOMEVENT_IID) + + /* void setCurrentTarget (in nsIDOMNode target); */ + NS_IMETHOD SetCurrentTarget(nsIDOMNode *target) = 0; + + /* void setEventPhase (in unsigned short phase); */ + NS_IMETHOD SetEventPhase(PRUint16 phase) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMCUSTOMEVENT \ + NS_IMETHOD SetCurrentTarget(nsIDOMNode *target); \ + NS_IMETHOD SetEventPhase(PRUint16 phase); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMCUSTOMEVENT(_to) \ + NS_IMETHOD SetCurrentTarget(nsIDOMNode *target) { return _to SetCurrentTarget(target); } \ + NS_IMETHOD SetEventPhase(PRUint16 phase) { return _to SetEventPhase(phase); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMCUSTOMEVENT(_to) \ + NS_IMETHOD SetCurrentTarget(nsIDOMNode *target) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentTarget(target); } \ + NS_IMETHOD SetEventPhase(PRUint16 phase) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEventPhase(phase); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMCustomEvent : public nsIDOMCustomEvent +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMCUSTOMEVENT + + nsDOMCustomEvent(); + +private: + ~nsDOMCustomEvent(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMCustomEvent, nsIDOMCustomEvent) + +nsDOMCustomEvent::nsDOMCustomEvent() +{ + /* member initializers and constructor code */ +} + +nsDOMCustomEvent::~nsDOMCustomEvent() +{ + /* destructor code */ +} + +/* void setCurrentTarget (in nsIDOMNode target); */ +NS_IMETHODIMP nsDOMCustomEvent::SetCurrentTarget(nsIDOMNode *target) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setEventPhase (in unsigned short phase); */ +NS_IMETHODIMP nsDOMCustomEvent::SetEventPhase(PRUint16 phase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMCustomEvent_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDOMException.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDOMException.h new file mode 100644 index 00000000..261d29ca --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDOMException.h @@ -0,0 +1,136 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMDOMException.idl + */ + +#ifndef __gen_nsIDOMDOMException_h__ +#define __gen_nsIDOMDOMException_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDOMException */ +#define NS_IDOMDOMEXCEPTION_IID_STR "a6cf910a-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMDOMEXCEPTION_IID \ + {0xa6cf910a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * In general, DOM methods return specific error values in ordinary + * processing situations, such as out-of-bound errors. + * However, DOM operations can raise exceptions in "exceptional" + * circumstances, i.e., when an operation is impossible to perform + * (either for logical reasons, because data is lost, or because the + * implementation has become unstable) + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Core/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMDOMException : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOMEXCEPTION_IID) + + enum { INDEX_SIZE_ERR = 1U }; + + enum { DOMSTRING_SIZE_ERR = 2U }; + + enum { HIERARCHY_REQUEST_ERR = 3U }; + + enum { WRONG_DOCUMENT_ERR = 4U }; + + enum { INVALID_CHARACTER_ERR = 5U }; + + enum { NO_DATA_ALLOWED_ERR = 6U }; + + enum { NO_MODIFICATION_ALLOWED_ERR = 7U }; + + enum { NOT_FOUND_ERR = 8U }; + + enum { NOT_SUPPORTED_ERR = 9U }; + + enum { INUSE_ATTRIBUTE_ERR = 10U }; + + enum { INVALID_STATE_ERR = 11U }; + + enum { SYNTAX_ERR = 12U }; + + enum { INVALID_MODIFICATION_ERR = 13U }; + + enum { NAMESPACE_ERR = 14U }; + + enum { INVALID_ACCESS_ERR = 15U }; + + enum { VALIDATION_ERR = 16U }; + + enum { TYPE_MISMATCH_ERR = 17U }; + + /* readonly attribute unsigned long code; */ + NS_IMETHOD GetCode(PRUint32 *aCode) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOMEXCEPTION \ + NS_IMETHOD GetCode(PRUint32 *aCode); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOMEXCEPTION(_to) \ + NS_IMETHOD GetCode(PRUint32 *aCode) { return _to GetCode(aCode); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOMEXCEPTION(_to) \ + NS_IMETHOD GetCode(PRUint32 *aCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCode(aCode); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDOMException : public nsIDOMDOMException +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOMEXCEPTION + + nsDOMDOMException(); + +private: + ~nsDOMDOMException(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDOMException, nsIDOMDOMException) + +nsDOMDOMException::nsDOMDOMException() +{ + /* member initializers and constructor code */ +} + +nsDOMDOMException::~nsDOMDOMException() +{ + /* destructor code */ +} + +/* readonly attribute unsigned long code; */ +NS_IMETHODIMP nsDOMDOMException::GetCode(PRUint32 *aCode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDOMException_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDOMImplementation.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDOMImplementation.h new file mode 100644 index 00000000..a20eb1cb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDOMImplementation.h @@ -0,0 +1,123 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMDOMImplementation.idl + */ + +#ifndef __gen_nsIDOMDOMImplementation_h__ +#define __gen_nsIDOMDOMImplementation_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDOMImplementation */ +#define NS_IDOMDOMIMPLEMENTATION_IID_STR "a6cf9074-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMDOMIMPLEMENTATION_IID \ + {0xa6cf9074, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMDOMImplementation : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOMIMPLEMENTATION_IID) + + /** + * The nsIDOMDOMImplementation interface provides a number of methods for + * performing operations that are independent of any particular instance + * of the document object model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* boolean hasFeature (in DOMString feature, in DOMString version); */ + NS_IMETHOD HasFeature(const nsAString & feature, const nsAString & version, PRBool *_retval) = 0; + + /* nsIDOMDocumentType createDocumentType (in DOMString qualifiedName, in DOMString publicId, in DOMString systemId) raises (DOMException); */ + NS_IMETHOD CreateDocumentType(const nsAString & qualifiedName, const nsAString & publicId, const nsAString & systemId, nsIDOMDocumentType **_retval) = 0; + + /* nsIDOMDocument createDocument (in DOMString namespaceURI, in DOMString qualifiedName, in nsIDOMDocumentType doctype) raises (DOMException); */ + NS_IMETHOD CreateDocument(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMDocumentType *doctype, nsIDOMDocument **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOMIMPLEMENTATION \ + NS_IMETHOD HasFeature(const nsAString & feature, const nsAString & version, PRBool *_retval); \ + NS_IMETHOD CreateDocumentType(const nsAString & qualifiedName, const nsAString & publicId, const nsAString & systemId, nsIDOMDocumentType **_retval); \ + NS_IMETHOD CreateDocument(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMDocumentType *doctype, nsIDOMDocument **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOMIMPLEMENTATION(_to) \ + NS_IMETHOD HasFeature(const nsAString & feature, const nsAString & version, PRBool *_retval) { return _to HasFeature(feature, version, _retval); } \ + NS_IMETHOD CreateDocumentType(const nsAString & qualifiedName, const nsAString & publicId, const nsAString & systemId, nsIDOMDocumentType **_retval) { return _to CreateDocumentType(qualifiedName, publicId, systemId, _retval); } \ + NS_IMETHOD CreateDocument(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMDocumentType *doctype, nsIDOMDocument **_retval) { return _to CreateDocument(namespaceURI, qualifiedName, doctype, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOMIMPLEMENTATION(_to) \ + NS_IMETHOD HasFeature(const nsAString & feature, const nsAString & version, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasFeature(feature, version, _retval); } \ + NS_IMETHOD CreateDocumentType(const nsAString & qualifiedName, const nsAString & publicId, const nsAString & systemId, nsIDOMDocumentType **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateDocumentType(qualifiedName, publicId, systemId, _retval); } \ + NS_IMETHOD CreateDocument(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMDocumentType *doctype, nsIDOMDocument **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateDocument(namespaceURI, qualifiedName, doctype, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDOMImplementation : public nsIDOMDOMImplementation +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOMIMPLEMENTATION + + nsDOMDOMImplementation(); + +private: + ~nsDOMDOMImplementation(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDOMImplementation, nsIDOMDOMImplementation) + +nsDOMDOMImplementation::nsDOMDOMImplementation() +{ + /* member initializers and constructor code */ +} + +nsDOMDOMImplementation::~nsDOMDOMImplementation() +{ + /* destructor code */ +} + +/* boolean hasFeature (in DOMString feature, in DOMString version); */ +NS_IMETHODIMP nsDOMDOMImplementation::HasFeature(const nsAString & feature, const nsAString & version, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMDocumentType createDocumentType (in DOMString qualifiedName, in DOMString publicId, in DOMString systemId) raises (DOMException); */ +NS_IMETHODIMP nsDOMDOMImplementation::CreateDocumentType(const nsAString & qualifiedName, const nsAString & publicId, const nsAString & systemId, nsIDOMDocumentType **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMDocument createDocument (in DOMString namespaceURI, in DOMString qualifiedName, in nsIDOMDocumentType doctype) raises (DOMException); */ +NS_IMETHODIMP nsDOMDOMImplementation::CreateDocument(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMDocumentType *doctype, nsIDOMDocument **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDOMImplementation_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocument.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocument.h new file mode 100644 index 00000000..9b3e0535 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocument.h @@ -0,0 +1,295 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMDocument.idl + */ + +#ifndef __gen_nsIDOMDocument_h__ +#define __gen_nsIDOMDocument_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDocument */ +#define NS_IDOMDOCUMENT_IID_STR "a6cf9075-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMDOCUMENT_IID \ + {0xa6cf9075, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMDocument : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOCUMENT_IID) + + /** + * The nsIDOMDocument interface represents the entire HTML or XML document. + * Conceptually, it is the root of the document tree, and provides the + * primary access to the document's data. + * Since elements, text nodes, comments, processing instructions, etc. + * cannot exist outside the context of a Document, the nsIDOMDocument + * interface also contains the factory methods needed to create these + * objects. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* readonly attribute nsIDOMDocumentType doctype; */ + NS_IMETHOD GetDoctype(nsIDOMDocumentType * *aDoctype) = 0; + + /* readonly attribute nsIDOMDOMImplementation implementation; */ + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation * *aImplementation) = 0; + + /* readonly attribute nsIDOMElement documentElement; */ + NS_IMETHOD GetDocumentElement(nsIDOMElement * *aDocumentElement) = 0; + + /* nsIDOMElement createElement (in DOMString tagName) raises (DOMException); */ + NS_IMETHOD CreateElement(const nsAString & tagName, nsIDOMElement **_retval) = 0; + + /* nsIDOMDocumentFragment createDocumentFragment (); */ + NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment **_retval) = 0; + + /* nsIDOMText createTextNode (in DOMString data); */ + NS_IMETHOD CreateTextNode(const nsAString & data, nsIDOMText **_retval) = 0; + + /* nsIDOMComment createComment (in DOMString data); */ + NS_IMETHOD CreateComment(const nsAString & data, nsIDOMComment **_retval) = 0; + + /* nsIDOMCDATASection createCDATASection (in DOMString data) raises (DOMException); */ + NS_IMETHOD CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval) = 0; + + /* nsIDOMProcessingInstruction createProcessingInstruction (in DOMString target, in DOMString data) raises (DOMException); */ + NS_IMETHOD CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval) = 0; + + /* nsIDOMAttr createAttribute (in DOMString name) raises (DOMException); */ + NS_IMETHOD CreateAttribute(const nsAString & name, nsIDOMAttr **_retval) = 0; + + /* nsIDOMEntityReference createEntityReference (in DOMString name) raises (DOMException); */ + NS_IMETHOD CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval) = 0; + + /* nsIDOMNodeList getElementsByTagName (in DOMString tagname); */ + NS_IMETHOD GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval) = 0; + + /* nsIDOMNode importNode (in nsIDOMNode importedNode, in boolean deep) raises (DOMException); */ + NS_IMETHOD ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval) = 0; + + /* nsIDOMElement createElementNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */ + NS_IMETHOD CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval) = 0; + + /* nsIDOMAttr createAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */ + NS_IMETHOD CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval) = 0; + + /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */ + NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) = 0; + + /* nsIDOMElement getElementById (in DOMString elementId); */ + NS_IMETHOD GetElementById(const nsAString & elementId, nsIDOMElement **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOCUMENT \ + NS_IMETHOD GetDoctype(nsIDOMDocumentType * *aDoctype); \ + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation * *aImplementation); \ + NS_IMETHOD GetDocumentElement(nsIDOMElement * *aDocumentElement); \ + NS_IMETHOD CreateElement(const nsAString & tagName, nsIDOMElement **_retval); \ + NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment **_retval); \ + NS_IMETHOD CreateTextNode(const nsAString & data, nsIDOMText **_retval); \ + NS_IMETHOD CreateComment(const nsAString & data, nsIDOMComment **_retval); \ + NS_IMETHOD CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval); \ + NS_IMETHOD CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval); \ + NS_IMETHOD CreateAttribute(const nsAString & name, nsIDOMAttr **_retval); \ + NS_IMETHOD CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval); \ + NS_IMETHOD GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval); \ + NS_IMETHOD ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval); \ + NS_IMETHOD CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval); \ + NS_IMETHOD CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval); \ + NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval); \ + NS_IMETHOD GetElementById(const nsAString & elementId, nsIDOMElement **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOCUMENT(_to) \ + NS_IMETHOD GetDoctype(nsIDOMDocumentType * *aDoctype) { return _to GetDoctype(aDoctype); } \ + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation * *aImplementation) { return _to GetImplementation(aImplementation); } \ + NS_IMETHOD GetDocumentElement(nsIDOMElement * *aDocumentElement) { return _to GetDocumentElement(aDocumentElement); } \ + NS_IMETHOD CreateElement(const nsAString & tagName, nsIDOMElement **_retval) { return _to CreateElement(tagName, _retval); } \ + NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment **_retval) { return _to CreateDocumentFragment(_retval); } \ + NS_IMETHOD CreateTextNode(const nsAString & data, nsIDOMText **_retval) { return _to CreateTextNode(data, _retval); } \ + NS_IMETHOD CreateComment(const nsAString & data, nsIDOMComment **_retval) { return _to CreateComment(data, _retval); } \ + NS_IMETHOD CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval) { return _to CreateCDATASection(data, _retval); } \ + NS_IMETHOD CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval) { return _to CreateProcessingInstruction(target, data, _retval); } \ + NS_IMETHOD CreateAttribute(const nsAString & name, nsIDOMAttr **_retval) { return _to CreateAttribute(name, _retval); } \ + NS_IMETHOD CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval) { return _to CreateEntityReference(name, _retval); } \ + NS_IMETHOD GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval) { return _to GetElementsByTagName(tagname, _retval); } \ + NS_IMETHOD ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval) { return _to ImportNode(importedNode, deep, _retval); } \ + NS_IMETHOD CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval) { return _to CreateElementNS(namespaceURI, qualifiedName, _retval); } \ + NS_IMETHOD CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval) { return _to CreateAttributeNS(namespaceURI, qualifiedName, _retval); } \ + NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return _to GetElementsByTagNameNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD GetElementById(const nsAString & elementId, nsIDOMElement **_retval) { return _to GetElementById(elementId, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOCUMENT(_to) \ + NS_IMETHOD GetDoctype(nsIDOMDocumentType * *aDoctype) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDoctype(aDoctype); } \ + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation * *aImplementation) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImplementation(aImplementation); } \ + NS_IMETHOD GetDocumentElement(nsIDOMElement * *aDocumentElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentElement(aDocumentElement); } \ + NS_IMETHOD CreateElement(const nsAString & tagName, nsIDOMElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateElement(tagName, _retval); } \ + NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateDocumentFragment(_retval); } \ + NS_IMETHOD CreateTextNode(const nsAString & data, nsIDOMText **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateTextNode(data, _retval); } \ + NS_IMETHOD CreateComment(const nsAString & data, nsIDOMComment **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateComment(data, _retval); } \ + NS_IMETHOD CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCDATASection(data, _retval); } \ + NS_IMETHOD CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateProcessingInstruction(target, data, _retval); } \ + NS_IMETHOD CreateAttribute(const nsAString & name, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAttribute(name, _retval); } \ + NS_IMETHOD CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateEntityReference(name, _retval); } \ + NS_IMETHOD GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagName(tagname, _retval); } \ + NS_IMETHOD ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportNode(importedNode, deep, _retval); } \ + NS_IMETHOD CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateElementNS(namespaceURI, qualifiedName, _retval); } \ + NS_IMETHOD CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAttributeNS(namespaceURI, qualifiedName, _retval); } \ + NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagNameNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD GetElementById(const nsAString & elementId, nsIDOMElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementById(elementId, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDocument : public nsIDOMDocument +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOCUMENT + + nsDOMDocument(); + +private: + ~nsDOMDocument(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDocument, nsIDOMDocument) + +nsDOMDocument::nsDOMDocument() +{ + /* member initializers and constructor code */ +} + +nsDOMDocument::~nsDOMDocument() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMDocumentType doctype; */ +NS_IMETHODIMP nsDOMDocument::GetDoctype(nsIDOMDocumentType * *aDoctype) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMDOMImplementation implementation; */ +NS_IMETHODIMP nsDOMDocument::GetImplementation(nsIDOMDOMImplementation * *aImplementation) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMElement documentElement; */ +NS_IMETHODIMP nsDOMDocument::GetDocumentElement(nsIDOMElement * *aDocumentElement) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMElement createElement (in DOMString tagName) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocument::CreateElement(const nsAString & tagName, nsIDOMElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMDocumentFragment createDocumentFragment (); */ +NS_IMETHODIMP nsDOMDocument::CreateDocumentFragment(nsIDOMDocumentFragment **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMText createTextNode (in DOMString data); */ +NS_IMETHODIMP nsDOMDocument::CreateTextNode(const nsAString & data, nsIDOMText **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMComment createComment (in DOMString data); */ +NS_IMETHODIMP nsDOMDocument::CreateComment(const nsAString & data, nsIDOMComment **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMCDATASection createCDATASection (in DOMString data) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocument::CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMProcessingInstruction createProcessingInstruction (in DOMString target, in DOMString data) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocument::CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMAttr createAttribute (in DOMString name) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocument::CreateAttribute(const nsAString & name, nsIDOMAttr **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMEntityReference createEntityReference (in DOMString name) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocument::CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNodeList getElementsByTagName (in DOMString tagname); */ +NS_IMETHODIMP nsDOMDocument::GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode importNode (in nsIDOMNode importedNode, in boolean deep) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocument::ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMElement createElementNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocument::CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMAttr createAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocument::CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */ +NS_IMETHODIMP nsDOMDocument::GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMElement getElementById (in DOMString elementId); */ +NS_IMETHODIMP nsDOMDocument::GetElementById(const nsAString & elementId, nsIDOMElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDocument_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentEvent.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentEvent.h new file mode 100644 index 00000000..4bdbe1d1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentEvent.h @@ -0,0 +1,98 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOMDocumentEvent.idl + */ + +#ifndef __gen_nsIDOMDocumentEvent_h__ +#define __gen_nsIDOMDocumentEvent_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDocumentEvent */ +#define NS_IDOMDOCUMENTEVENT_IID_STR "46b91d66-28e2-11d4-ab1e-0010830123b4" + +#define NS_IDOMDOCUMENTEVENT_IID \ + {0x46b91d66, 0x28e2, 0x11d4, \ + { 0xab, 0x1e, 0x00, 0x10, 0x83, 0x01, 0x23, 0xb4 }} + +/** + * The nsIDOMDocumentEvent interface is the interface to the event + * factory method on a DOM document object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMDocumentEvent : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOCUMENTEVENT_IID) + + /* nsIDOMEvent createEvent (in DOMString eventType) raises (DOMException); */ + NS_IMETHOD CreateEvent(const nsAString & eventType, nsIDOMEvent **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOCUMENTEVENT \ + NS_IMETHOD CreateEvent(const nsAString & eventType, nsIDOMEvent **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOCUMENTEVENT(_to) \ + NS_IMETHOD CreateEvent(const nsAString & eventType, nsIDOMEvent **_retval) { return _to CreateEvent(eventType, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOCUMENTEVENT(_to) \ + NS_IMETHOD CreateEvent(const nsAString & eventType, nsIDOMEvent **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateEvent(eventType, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDocumentEvent : public nsIDOMDocumentEvent +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOCUMENTEVENT + + nsDOMDocumentEvent(); + +private: + ~nsDOMDocumentEvent(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDocumentEvent, nsIDOMDocumentEvent) + +nsDOMDocumentEvent::nsDOMDocumentEvent() +{ + /* member initializers and constructor code */ +} + +nsDOMDocumentEvent::~nsDOMDocumentEvent() +{ + /* destructor code */ +} + +/* nsIDOMEvent createEvent (in DOMString eventType) raises (DOMException); */ +NS_IMETHODIMP nsDOMDocumentEvent::CreateEvent(const nsAString & eventType, nsIDOMEvent **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDocumentEvent_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentFragment.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentFragment.h new file mode 100644 index 00000000..88b58082 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentFragment.h @@ -0,0 +1,80 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMDocumentFragment.idl + */ + +#ifndef __gen_nsIDOMDocumentFragment_h__ +#define __gen_nsIDOMDocumentFragment_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDocumentFragment */ +#define NS_IDOMDOCUMENTFRAGMENT_IID_STR "a6cf9076-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMDOCUMENTFRAGMENT_IID \ + {0xa6cf9076, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMDocumentFragment : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOCUMENTFRAGMENT_IID) + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOCUMENTFRAGMENT \ + /* no methods! */ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOCUMENTFRAGMENT(_to) \ + /* no methods! */ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOCUMENTFRAGMENT(_to) \ + /* no methods! */ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDocumentFragment : public nsIDOMDocumentFragment +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOCUMENTFRAGMENT + + nsDOMDocumentFragment(); + +private: + ~nsDOMDocumentFragment(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDocumentFragment, nsIDOMDocumentFragment) + +nsDOMDocumentFragment::nsDOMDocumentFragment() +{ + /* member initializers and constructor code */ +} + +nsDOMDocumentFragment::~nsDOMDocumentFragment() +{ + /* destructor code */ +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDocumentFragment_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentRange.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentRange.h new file mode 100644 index 00000000..58541d90 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentRange.h @@ -0,0 +1,98 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/range/nsIDOMDocumentRange.idl + */ + +#ifndef __gen_nsIDOMDocumentRange_h__ +#define __gen_nsIDOMDocumentRange_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDocumentRange */ +#define NS_IDOMDOCUMENTRANGE_IID_STR "7b9badc6-c9bc-447a-8670-dbd195aed24b" + +#define NS_IDOMDOCUMENTRANGE_IID \ + {0x7b9badc6, 0xc9bc, 0x447a, \ + { 0x86, 0x70, 0xdb, 0xd1, 0x95, 0xae, 0xd2, 0x4b }} + +/** + * The nsIDOMDocumentRange interface is an interface to a document + * object that supports ranges in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMDocumentRange : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOCUMENTRANGE_IID) + + /* nsIDOMRange createRange (); */ + NS_IMETHOD CreateRange(nsIDOMRange **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOCUMENTRANGE \ + NS_IMETHOD CreateRange(nsIDOMRange **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOCUMENTRANGE(_to) \ + NS_IMETHOD CreateRange(nsIDOMRange **_retval) { return _to CreateRange(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOCUMENTRANGE(_to) \ + NS_IMETHOD CreateRange(nsIDOMRange **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateRange(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDocumentRange : public nsIDOMDocumentRange +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOCUMENTRANGE + + nsDOMDocumentRange(); + +private: + ~nsDOMDocumentRange(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDocumentRange, nsIDOMDocumentRange) + +nsDOMDocumentRange::nsDOMDocumentRange() +{ + /* member initializers and constructor code */ +} + +nsDOMDocumentRange::~nsDOMDocumentRange() +{ + /* destructor code */ +} + +/* nsIDOMRange createRange (); */ +NS_IMETHODIMP nsDOMDocumentRange::CreateRange(nsIDOMRange **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDocumentRange_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentStyle.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentStyle.h new file mode 100644 index 00000000..ca4ba6c6 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentStyle.h @@ -0,0 +1,98 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/stylesheets/nsIDOMDocumentStyle.idl + */ + +#ifndef __gen_nsIDOMDocumentStyle_h__ +#define __gen_nsIDOMDocumentStyle_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDocumentStyle */ +#define NS_IDOMDOCUMENTSTYLE_IID_STR "3d9f4973-dd2e-48f5-b5f7-2634e09eadd9" + +#define NS_IDOMDOCUMENTSTYLE_IID \ + {0x3d9f4973, 0xdd2e, 0x48f5, \ + { 0xb5, 0xf7, 0x26, 0x34, 0xe0, 0x9e, 0xad, 0xd9 }} + +/** + * The nsIDOMDocumentStyle interface is an interface to a document + * object that supports style sheets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMDocumentStyle : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOCUMENTSTYLE_IID) + + /* readonly attribute nsIDOMStyleSheetList styleSheets; */ + NS_IMETHOD GetStyleSheets(nsIDOMStyleSheetList * *aStyleSheets) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOCUMENTSTYLE \ + NS_IMETHOD GetStyleSheets(nsIDOMStyleSheetList * *aStyleSheets); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOCUMENTSTYLE(_to) \ + NS_IMETHOD GetStyleSheets(nsIDOMStyleSheetList * *aStyleSheets) { return _to GetStyleSheets(aStyleSheets); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOCUMENTSTYLE(_to) \ + NS_IMETHOD GetStyleSheets(nsIDOMStyleSheetList * *aStyleSheets) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStyleSheets(aStyleSheets); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDocumentStyle : public nsIDOMDocumentStyle +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOCUMENTSTYLE + + nsDOMDocumentStyle(); + +private: + ~nsDOMDocumentStyle(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDocumentStyle, nsIDOMDocumentStyle) + +nsDOMDocumentStyle::nsDOMDocumentStyle() +{ + /* member initializers and constructor code */ +} + +nsDOMDocumentStyle::~nsDOMDocumentStyle() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMStyleSheetList styleSheets; */ +NS_IMETHODIMP nsDOMDocumentStyle::GetStyleSheets(nsIDOMStyleSheetList * *aStyleSheets) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDocumentStyle_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentType.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentType.h new file mode 100644 index 00000000..d4082039 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentType.h @@ -0,0 +1,160 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMDocumentType.idl + */ + +#ifndef __gen_nsIDOMDocumentType_h__ +#define __gen_nsIDOMDocumentType_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDocumentType */ +#define NS_IDOMDOCUMENTTYPE_IID_STR "a6cf9077-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMDOCUMENTTYPE_IID \ + {0xa6cf9077, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMDocumentType : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOCUMENTTYPE_IID) + + /** + * Each Document has a doctype attribute whose value is either null + * or a DocumentType object. + * The nsIDOMDocumentType interface in the DOM Core provides an + * interface to the list of entities that are defined for the document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* readonly attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + + /* readonly attribute nsIDOMNamedNodeMap entities; */ + NS_IMETHOD GetEntities(nsIDOMNamedNodeMap * *aEntities) = 0; + + /* readonly attribute nsIDOMNamedNodeMap notations; */ + NS_IMETHOD GetNotations(nsIDOMNamedNodeMap * *aNotations) = 0; + + /* readonly attribute DOMString publicId; */ + NS_IMETHOD GetPublicId(nsAString & aPublicId) = 0; + + /* readonly attribute DOMString systemId; */ + NS_IMETHOD GetSystemId(nsAString & aSystemId) = 0; + + /* readonly attribute DOMString internalSubset; */ + NS_IMETHOD GetInternalSubset(nsAString & aInternalSubset) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOCUMENTTYPE \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD GetEntities(nsIDOMNamedNodeMap * *aEntities); \ + NS_IMETHOD GetNotations(nsIDOMNamedNodeMap * *aNotations); \ + NS_IMETHOD GetPublicId(nsAString & aPublicId); \ + NS_IMETHOD GetSystemId(nsAString & aSystemId); \ + NS_IMETHOD GetInternalSubset(nsAString & aInternalSubset); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOCUMENTTYPE(_to) \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD GetEntities(nsIDOMNamedNodeMap * *aEntities) { return _to GetEntities(aEntities); } \ + NS_IMETHOD GetNotations(nsIDOMNamedNodeMap * *aNotations) { return _to GetNotations(aNotations); } \ + NS_IMETHOD GetPublicId(nsAString & aPublicId) { return _to GetPublicId(aPublicId); } \ + NS_IMETHOD GetSystemId(nsAString & aSystemId) { return _to GetSystemId(aSystemId); } \ + NS_IMETHOD GetInternalSubset(nsAString & aInternalSubset) { return _to GetInternalSubset(aInternalSubset); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOCUMENTTYPE(_to) \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD GetEntities(nsIDOMNamedNodeMap * *aEntities) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntities(aEntities); } \ + NS_IMETHOD GetNotations(nsIDOMNamedNodeMap * *aNotations) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotations(aNotations); } \ + NS_IMETHOD GetPublicId(nsAString & aPublicId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPublicId(aPublicId); } \ + NS_IMETHOD GetSystemId(nsAString & aSystemId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSystemId(aSystemId); } \ + NS_IMETHOD GetInternalSubset(nsAString & aInternalSubset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInternalSubset(aInternalSubset); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDocumentType : public nsIDOMDocumentType +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOCUMENTTYPE + + nsDOMDocumentType(); + +private: + ~nsDOMDocumentType(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDocumentType, nsIDOMDocumentType) + +nsDOMDocumentType::nsDOMDocumentType() +{ + /* member initializers and constructor code */ +} + +nsDOMDocumentType::~nsDOMDocumentType() +{ + /* destructor code */ +} + +/* readonly attribute DOMString name; */ +NS_IMETHODIMP nsDOMDocumentType::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNamedNodeMap entities; */ +NS_IMETHODIMP nsDOMDocumentType::GetEntities(nsIDOMNamedNodeMap * *aEntities) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNamedNodeMap notations; */ +NS_IMETHODIMP nsDOMDocumentType::GetNotations(nsIDOMNamedNodeMap * *aNotations) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString publicId; */ +NS_IMETHODIMP nsDOMDocumentType::GetPublicId(nsAString & aPublicId) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString systemId; */ +NS_IMETHODIMP nsDOMDocumentType::GetSystemId(nsAString & aSystemId) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString internalSubset; */ +NS_IMETHODIMP nsDOMDocumentType::GetInternalSubset(nsAString & aInternalSubset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDocumentType_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentView.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentView.h new file mode 100644 index 00000000..4a64d3ff --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMDocumentView.h @@ -0,0 +1,98 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/views/nsIDOMDocumentView.idl + */ + +#ifndef __gen_nsIDOMDocumentView_h__ +#define __gen_nsIDOMDocumentView_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMDocumentView */ +#define NS_IDOMDOCUMENTVIEW_IID_STR "1acdb2ba-1dd2-11b2-95bc-9542495d2569" + +#define NS_IDOMDOCUMENTVIEW_IID \ + {0x1acdb2ba, 0x1dd2, 0x11b2, \ + { 0x95, 0xbc, 0x95, 0x42, 0x49, 0x5d, 0x25, 0x69 }} + +class NS_NO_VTABLE nsIDOMDocumentView : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMDOCUMENTVIEW_IID) + + /** + * The nsIDOMDocumentView interface is a datatype for a document that + * supports views in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Views + * + * @status FROZEN + */ + /* readonly attribute nsIDOMAbstractView defaultView; */ + NS_IMETHOD GetDefaultView(nsIDOMAbstractView * *aDefaultView) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMDOCUMENTVIEW \ + NS_IMETHOD GetDefaultView(nsIDOMAbstractView * *aDefaultView); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMDOCUMENTVIEW(_to) \ + NS_IMETHOD GetDefaultView(nsIDOMAbstractView * *aDefaultView) { return _to GetDefaultView(aDefaultView); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMDOCUMENTVIEW(_to) \ + NS_IMETHOD GetDefaultView(nsIDOMAbstractView * *aDefaultView) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultView(aDefaultView); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMDocumentView : public nsIDOMDocumentView +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMDOCUMENTVIEW + + nsDOMDocumentView(); + +private: + ~nsDOMDocumentView(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMDocumentView, nsIDOMDocumentView) + +nsDOMDocumentView::nsDOMDocumentView() +{ + /* member initializers and constructor code */ +} + +nsDOMDocumentView::~nsDOMDocumentView() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMAbstractView defaultView; */ +NS_IMETHODIMP nsDOMDocumentView::GetDefaultView(nsIDOMAbstractView * *aDefaultView) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMDocumentView_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMElement.h new file mode 100644 index 00000000..78a51118 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMElement.h @@ -0,0 +1,278 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMElement.idl + */ + +#ifndef __gen_nsIDOMElement_h__ +#define __gen_nsIDOMElement_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMElement */ +#define NS_IDOMELEMENT_IID_STR "a6cf9078-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMELEMENT_IID \ + {0xa6cf9078, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMElement : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMELEMENT_IID) + + /** + * The nsIDOMElement interface represents an element in an HTML or + * XML document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* readonly attribute DOMString tagName; */ + NS_IMETHOD GetTagName(nsAString & aTagName) = 0; + + /* DOMString getAttribute (in DOMString name); */ + NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) = 0; + + /* void setAttribute (in DOMString name, in DOMString value) raises (DOMException); */ + NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) = 0; + + /* void removeAttribute (in DOMString name) raises (DOMException); */ + NS_IMETHOD RemoveAttribute(const nsAString & name) = 0; + + /* nsIDOMAttr getAttributeNode (in DOMString name); */ + NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) = 0; + + /* nsIDOMAttr setAttributeNode (in nsIDOMAttr newAttr) raises (DOMException); */ + NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0; + + /* nsIDOMAttr removeAttributeNode (in nsIDOMAttr oldAttr) raises (DOMException); */ + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) = 0; + + /* nsIDOMNodeList getElementsByTagName (in DOMString name); */ + NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) = 0; + + /* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */ + NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) = 0; + + /* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) raises (DOMException); */ + NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) = 0; + + /* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */ + NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) = 0; + + /* nsIDOMAttr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */ + NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) = 0; + + /* nsIDOMAttr setAttributeNodeNS (in nsIDOMAttr newAttr) raises (DOMException); */ + NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0; + + /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */ + NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) = 0; + + /* boolean hasAttribute (in DOMString name); */ + NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) = 0; + + /* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */ + NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMELEMENT \ + NS_IMETHOD GetTagName(nsAString & aTagName); \ + NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval); \ + NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value); \ + NS_IMETHOD RemoveAttribute(const nsAString & name); \ + NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval); \ + NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); \ + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval); \ + NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval); \ + NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval); \ + NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value); \ + NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName); \ + NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval); \ + NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); \ + NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval); \ + NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval); \ + NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMELEMENT(_to) \ + NS_IMETHOD GetTagName(nsAString & aTagName) { return _to GetTagName(aTagName); } \ + NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) { return _to GetAttribute(name, _retval); } \ + NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) { return _to SetAttribute(name, value); } \ + NS_IMETHOD RemoveAttribute(const nsAString & name) { return _to RemoveAttribute(name); } \ + NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) { return _to GetAttributeNode(name, _retval); } \ + NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return _to SetAttributeNode(newAttr, _retval); } \ + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) { return _to RemoveAttributeNode(oldAttr, _retval); } \ + NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) { return _to GetElementsByTagName(name, _retval); } \ + NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) { return _to GetAttributeNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) { return _to SetAttributeNS(namespaceURI, qualifiedName, value); } \ + NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) { return _to RemoveAttributeNS(namespaceURI, localName); } \ + NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) { return _to GetAttributeNodeNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return _to SetAttributeNodeNS(newAttr, _retval); } \ + NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return _to GetElementsByTagNameNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) { return _to HasAttribute(name, _retval); } \ + NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) { return _to HasAttributeNS(namespaceURI, localName, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMELEMENT(_to) \ + NS_IMETHOD GetTagName(nsAString & aTagName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTagName(aTagName); } \ + NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttribute(name, _retval); } \ + NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttribute(name, value); } \ + NS_IMETHOD RemoveAttribute(const nsAString & name) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttribute(name); } \ + NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNode(name, _retval); } \ + NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNode(newAttr, _retval); } \ + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeNode(oldAttr, _retval); } \ + NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagName(name, _retval); } \ + NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNS(namespaceURI, qualifiedName, value); } \ + NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeNS(namespaceURI, localName); } \ + NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNodeNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNodeNS(newAttr, _retval); } \ + NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagNameNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttribute(name, _retval); } \ + NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttributeNS(namespaceURI, localName, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMElement : public nsIDOMElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMELEMENT + + nsDOMElement(); + +private: + ~nsDOMElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMElement, nsIDOMElement) + +nsDOMElement::nsDOMElement() +{ + /* member initializers and constructor code */ +} + +nsDOMElement::~nsDOMElement() +{ + /* destructor code */ +} + +/* readonly attribute DOMString tagName; */ +NS_IMETHODIMP nsDOMElement::GetTagName(nsAString & aTagName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString getAttribute (in DOMString name); */ +NS_IMETHODIMP nsDOMElement::GetAttribute(const nsAString & name, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setAttribute (in DOMString name, in DOMString value) raises (DOMException); */ +NS_IMETHODIMP nsDOMElement::SetAttribute(const nsAString & name, const nsAString & value) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeAttribute (in DOMString name) raises (DOMException); */ +NS_IMETHODIMP nsDOMElement::RemoveAttribute(const nsAString & name) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMAttr getAttributeNode (in DOMString name); */ +NS_IMETHODIMP nsDOMElement::GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMAttr setAttributeNode (in nsIDOMAttr newAttr) raises (DOMException); */ +NS_IMETHODIMP nsDOMElement::SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMAttr removeAttributeNode (in nsIDOMAttr oldAttr) raises (DOMException); */ +NS_IMETHODIMP nsDOMElement::RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNodeList getElementsByTagName (in DOMString name); */ +NS_IMETHODIMP nsDOMElement::GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */ +NS_IMETHODIMP nsDOMElement::GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) raises (DOMException); */ +NS_IMETHODIMP nsDOMElement::SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */ +NS_IMETHODIMP nsDOMElement::RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMAttr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */ +NS_IMETHODIMP nsDOMElement::GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMAttr setAttributeNodeNS (in nsIDOMAttr newAttr) raises (DOMException); */ +NS_IMETHODIMP nsDOMElement::SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */ +NS_IMETHODIMP nsDOMElement::GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean hasAttribute (in DOMString name); */ +NS_IMETHODIMP nsDOMElement::HasAttribute(const nsAString & name, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */ +NS_IMETHODIMP nsDOMElement::HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMElementCSSInlineStyle.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMElementCSSInlineStyle.h new file mode 100644 index 00000000..326f1f81 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMElementCSSInlineStyle.h @@ -0,0 +1,98 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMElementCSSInlineStyle.idl + */ + +#ifndef __gen_nsIDOMElementCSSInlineStyle_h__ +#define __gen_nsIDOMElementCSSInlineStyle_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMElementCSSInlineStyle */ +#define NS_IDOMELEMENTCSSINLINESTYLE_IID_STR "99715845-95fc-4a56-aa53-214b65c26e22" + +#define NS_IDOMELEMENTCSSINLINESTYLE_IID \ + {0x99715845, 0x95fc, 0x4a56, \ + { 0xaa, 0x53, 0x21, 0x4b, 0x65, 0xc2, 0x6e, 0x22 }} + +/** + * The nsIDOMElementCSSInlineStyle interface allows access to the inline + * style information for elements. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMElementCSSInlineStyle : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMELEMENTCSSINLINESTYLE_IID) + + /* readonly attribute nsIDOMCSSStyleDeclaration style; */ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration * *aStyle) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMELEMENTCSSINLINESTYLE \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration * *aStyle); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMELEMENTCSSINLINESTYLE(_to) \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration * *aStyle) { return _to GetStyle(aStyle); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMELEMENTCSSINLINESTYLE(_to) \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration * *aStyle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStyle(aStyle); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMElementCSSInlineStyle : public nsIDOMElementCSSInlineStyle +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMELEMENTCSSINLINESTYLE + + nsDOMElementCSSInlineStyle(); + +private: + ~nsDOMElementCSSInlineStyle(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMElementCSSInlineStyle, nsIDOMElementCSSInlineStyle) + +nsDOMElementCSSInlineStyle::nsDOMElementCSSInlineStyle() +{ + /* member initializers and constructor code */ +} + +nsDOMElementCSSInlineStyle::~nsDOMElementCSSInlineStyle() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMCSSStyleDeclaration style; */ +NS_IMETHODIMP nsDOMElementCSSInlineStyle::GetStyle(nsIDOMCSSStyleDeclaration * *aStyle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMElementCSSInlineStyle_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEntity.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEntity.h new file mode 100644 index 00000000..08d07400 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEntity.h @@ -0,0 +1,122 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMEntity.idl + */ + +#ifndef __gen_nsIDOMEntity_h__ +#define __gen_nsIDOMEntity_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMEntity */ +#define NS_IDOMENTITY_IID_STR "a6cf9079-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMENTITY_IID \ + {0xa6cf9079, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMEntity : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMENTITY_IID) + + /** + * The nsIDOMEntity interface represents an entity, either parsed + * or unparsed, in an XML document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* readonly attribute DOMString publicId; */ + NS_IMETHOD GetPublicId(nsAString & aPublicId) = 0; + + /* readonly attribute DOMString systemId; */ + NS_IMETHOD GetSystemId(nsAString & aSystemId) = 0; + + /* readonly attribute DOMString notationName; */ + NS_IMETHOD GetNotationName(nsAString & aNotationName) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMENTITY \ + NS_IMETHOD GetPublicId(nsAString & aPublicId); \ + NS_IMETHOD GetSystemId(nsAString & aSystemId); \ + NS_IMETHOD GetNotationName(nsAString & aNotationName); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMENTITY(_to) \ + NS_IMETHOD GetPublicId(nsAString & aPublicId) { return _to GetPublicId(aPublicId); } \ + NS_IMETHOD GetSystemId(nsAString & aSystemId) { return _to GetSystemId(aSystemId); } \ + NS_IMETHOD GetNotationName(nsAString & aNotationName) { return _to GetNotationName(aNotationName); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMENTITY(_to) \ + NS_IMETHOD GetPublicId(nsAString & aPublicId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPublicId(aPublicId); } \ + NS_IMETHOD GetSystemId(nsAString & aSystemId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSystemId(aSystemId); } \ + NS_IMETHOD GetNotationName(nsAString & aNotationName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotationName(aNotationName); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMEntity : public nsIDOMEntity +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMENTITY + + nsDOMEntity(); + +private: + ~nsDOMEntity(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMEntity, nsIDOMEntity) + +nsDOMEntity::nsDOMEntity() +{ + /* member initializers and constructor code */ +} + +nsDOMEntity::~nsDOMEntity() +{ + /* destructor code */ +} + +/* readonly attribute DOMString publicId; */ +NS_IMETHODIMP nsDOMEntity::GetPublicId(nsAString & aPublicId) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString systemId; */ +NS_IMETHODIMP nsDOMEntity::GetSystemId(nsAString & aSystemId) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString notationName; */ +NS_IMETHODIMP nsDOMEntity::GetNotationName(nsAString & aNotationName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMEntity_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEntityReference.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEntityReference.h new file mode 100644 index 00000000..c2364d3d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEntityReference.h @@ -0,0 +1,80 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMEntityReference.idl + */ + +#ifndef __gen_nsIDOMEntityReference_h__ +#define __gen_nsIDOMEntityReference_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMEntityReference */ +#define NS_IDOMENTITYREFERENCE_IID_STR "a6cf907a-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMENTITYREFERENCE_IID \ + {0xa6cf907a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMEntityReference : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMENTITYREFERENCE_IID) + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMENTITYREFERENCE \ + /* no methods! */ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMENTITYREFERENCE(_to) \ + /* no methods! */ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMENTITYREFERENCE(_to) \ + /* no methods! */ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMEntityReference : public nsIDOMEntityReference +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMENTITYREFERENCE + + nsDOMEntityReference(); + +private: + ~nsDOMEntityReference(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMEntityReference, nsIDOMEntityReference) + +nsDOMEntityReference::nsDOMEntityReference() +{ + /* member initializers and constructor code */ +} + +nsDOMEntityReference::~nsDOMEntityReference() +{ + /* destructor code */ +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMEntityReference_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEvent.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEvent.h new file mode 100644 index 00000000..37e737c0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEvent.h @@ -0,0 +1,303 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOMEvent.idl + */ + +#ifndef __gen_nsIDOMEvent_h__ +#define __gen_nsIDOMEvent_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMEventTarget; /* forward declaration */ + + +/* starting interface: nsIDOMEvent */ +#define NS_IDOMEVENT_IID_STR "a66b7b80-ff46-bd97-0080-5f8ae38add32" + +#define NS_IDOMEVENT_IID \ + {0xa66b7b80, 0xff46, 0xbd97, \ + { 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMEvent : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMEVENT_IID) + + /** + * The nsIDOMEvent interface is the primary datatype for all events in + * the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ +/** + * The current event phase is the capturing phase. + */ + enum { CAPTURING_PHASE = 1U }; + + /** + * The event is currently being evaluated at the target EventTarget. + */ + enum { AT_TARGET = 2U }; + + /** + * The current event phase is the bubbling phase. + */ + enum { BUBBLING_PHASE = 3U }; + + /** + * The name of the event (case-insensitive). The name must be an XML + * name. + */ + /* readonly attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + + /** + * Used to indicate the EventTarget to which the event was originally + * dispatched. + */ + /* readonly attribute nsIDOMEventTarget target; */ + NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) = 0; + + /** + * Used to indicate the EventTarget whose EventListeners are currently + * being processed. This is particularly useful during capturing and + * bubbling. + */ + /* readonly attribute nsIDOMEventTarget currentTarget; */ + NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) = 0; + + /** + * Used to indicate which phase of event flow is currently being + * evaluated. + */ + /* readonly attribute unsigned short eventPhase; */ + NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) = 0; + + /** + * Used to indicate whether or not an event is a bubbling event. If the + * event can bubble the value is true, else the value is false. + */ + /* readonly attribute boolean bubbles; */ + NS_IMETHOD GetBubbles(PRBool *aBubbles) = 0; + + /** + * Used to indicate whether or not an event can have its default action + * prevented. If the default action can be prevented the value is true, + * else the value is false. + */ + /* readonly attribute boolean cancelable; */ + NS_IMETHOD GetCancelable(PRBool *aCancelable) = 0; + + /** + * Used to specify the time (in milliseconds relative to the epoch) at + * which the event was created. Due to the fact that some systems may + * not provide this information the value of timeStamp may be not + * available for all events. When not available, a value of 0 will be + * returned. Examples of epoch time are the time of the system start or + * 0:0:0 UTC 1st January 1970. + */ + /* readonly attribute DOMTimeStamp timeStamp; */ + NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) = 0; + + /** + * The stopPropagation method is used prevent further propagation of an + * event during event flow. If this method is called by any + * EventListener the event will cease propagating through the tree. The + * event will complete dispatch to all listeners on the current + * EventTarget before event flow stops. This method may be used during + * any stage of event flow. + */ + /* void stopPropagation (); */ + NS_IMETHOD StopPropagation(void) = 0; + + /** + * If an event is cancelable, the preventDefault method is used to + * signify that the event is to be canceled, meaning any default action + * normally taken by the implementation as a result of the event will + * not occur. If, during any stage of event flow, the preventDefault + * method is called the event is canceled. Any default action associated + * with the event will not occur. Calling this method for a + * non-cancelable event has no effect. Once preventDefault has been + * called it will remain in effect throughout the remainder of the + * event's propagation. This method may be used during any stage of + * event flow. + */ + /* void preventDefault (); */ + NS_IMETHOD PreventDefault(void) = 0; + + /** + * The initEvent method is used to initialize the value of an Event + * created through the DocumentEvent interface. This method may only be + * called before the Event has been dispatched via the dispatchEvent + * method, though it may be called multiple times during that phase if + * necessary. If called multiple times the final invocation takes + * precedence. If called from a subclass of Event interface only the + * values specified in the initEvent method are modified, all other + * attributes are left unchanged. + * + * @param eventTypeArg Specifies the event type. This type may be + * any event type currently defined in this + * specification or a new event type.. The string + * must be an XML name. + * Any new event type must not begin with any + * upper, lower, or mixed case version of the + * string "DOM". This prefix is reserved for + * future DOM event sets. It is also strongly + * recommended that third parties adding their + * own events use their own prefix to avoid + * confusion and lessen the probability of + * conflicts with other new events. + * @param canBubbleArg Specifies whether or not the event can bubble. + * @param cancelableArg Specifies whether or not the event's default + * action can be prevented. + */ + /* void initEvent (in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg); */ + NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMEVENT \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget); \ + NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget); \ + NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase); \ + NS_IMETHOD GetBubbles(PRBool *aBubbles); \ + NS_IMETHOD GetCancelable(PRBool *aCancelable); \ + NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp); \ + NS_IMETHOD StopPropagation(void); \ + NS_IMETHOD PreventDefault(void); \ + NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMEVENT(_to) \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) { return _to GetTarget(aTarget); } \ + NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) { return _to GetCurrentTarget(aCurrentTarget); } \ + NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) { return _to GetEventPhase(aEventPhase); } \ + NS_IMETHOD GetBubbles(PRBool *aBubbles) { return _to GetBubbles(aBubbles); } \ + NS_IMETHOD GetCancelable(PRBool *aCancelable) { return _to GetCancelable(aCancelable); } \ + NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) { return _to GetTimeStamp(aTimeStamp); } \ + NS_IMETHOD StopPropagation(void) { return _to StopPropagation(); } \ + NS_IMETHOD PreventDefault(void) { return _to PreventDefault(); } \ + NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg) { return _to InitEvent(eventTypeArg, canBubbleArg, cancelableArg); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMEVENT(_to) \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \ + NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentTarget(aCurrentTarget); } \ + NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEventPhase(aEventPhase); } \ + NS_IMETHOD GetBubbles(PRBool *aBubbles) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBubbles(aBubbles); } \ + NS_IMETHOD GetCancelable(PRBool *aCancelable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCancelable(aCancelable); } \ + NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTimeStamp(aTimeStamp); } \ + NS_IMETHOD StopPropagation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->StopPropagation(); } \ + NS_IMETHOD PreventDefault(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->PreventDefault(); } \ + NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitEvent(eventTypeArg, canBubbleArg, cancelableArg); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMEvent : public nsIDOMEvent +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMEVENT + + nsDOMEvent(); + +private: + ~nsDOMEvent(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMEvent, nsIDOMEvent) + +nsDOMEvent::nsDOMEvent() +{ + /* member initializers and constructor code */ +} + +nsDOMEvent::~nsDOMEvent() +{ + /* destructor code */ +} + +/* readonly attribute DOMString type; */ +NS_IMETHODIMP nsDOMEvent::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMEventTarget target; */ +NS_IMETHODIMP nsDOMEvent::GetTarget(nsIDOMEventTarget * *aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMEventTarget currentTarget; */ +NS_IMETHODIMP nsDOMEvent::GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned short eventPhase; */ +NS_IMETHODIMP nsDOMEvent::GetEventPhase(PRUint16 *aEventPhase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean bubbles; */ +NS_IMETHODIMP nsDOMEvent::GetBubbles(PRBool *aBubbles) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean cancelable; */ +NS_IMETHODIMP nsDOMEvent::GetCancelable(PRBool *aCancelable) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMTimeStamp timeStamp; */ +NS_IMETHODIMP nsDOMEvent::GetTimeStamp(DOMTimeStamp *aTimeStamp) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void stopPropagation (); */ +NS_IMETHODIMP nsDOMEvent::StopPropagation() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void preventDefault (); */ +NS_IMETHODIMP nsDOMEvent::PreventDefault() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void initEvent (in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg); */ +NS_IMETHODIMP nsDOMEvent::InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMEvent_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventGroup.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventGroup.h new file mode 100644 index 00000000..6a97deed --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventGroup.h @@ -0,0 +1,96 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOMEventGroup.idl + */ + +#ifndef __gen_nsIDOMEventGroup_h__ +#define __gen_nsIDOMEventGroup_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMEventGroup */ +#define NS_IDOMEVENTGROUP_IID_STR "33347bee-6620-4841-8152-36091ae80c7e" + +#define NS_IDOMEVENTGROUP_IID \ + {0x33347bee, 0x6620, 0x4841, \ + { 0x81, 0x52, 0x36, 0x09, 0x1a, 0xe8, 0x0c, 0x7e }} + +class NS_NO_VTABLE nsIDOMEventGroup : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMEVENTGROUP_IID) + + /** + * The nsIDOMEventTarget interface is the interface implemented by all + * event targets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-3-Events/ + */ + /* boolean isSameEventGroup (in nsIDOMEventGroup other); */ + NS_IMETHOD IsSameEventGroup(nsIDOMEventGroup *other, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMEVENTGROUP \ + NS_IMETHOD IsSameEventGroup(nsIDOMEventGroup *other, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMEVENTGROUP(_to) \ + NS_IMETHOD IsSameEventGroup(nsIDOMEventGroup *other, PRBool *_retval) { return _to IsSameEventGroup(other, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMEVENTGROUP(_to) \ + NS_IMETHOD IsSameEventGroup(nsIDOMEventGroup *other, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSameEventGroup(other, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMEventGroup : public nsIDOMEventGroup +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMEVENTGROUP + + nsDOMEventGroup(); + +private: + ~nsDOMEventGroup(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMEventGroup, nsIDOMEventGroup) + +nsDOMEventGroup::nsDOMEventGroup() +{ + /* member initializers and constructor code */ +} + +nsDOMEventGroup::~nsDOMEventGroup() +{ + /* destructor code */ +} + +/* boolean isSameEventGroup (in nsIDOMEventGroup other); */ +NS_IMETHODIMP nsDOMEventGroup::IsSameEventGroup(nsIDOMEventGroup *other, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMEventGroup_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventListener.h new file mode 100644 index 00000000..1c6cb490 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventListener.h @@ -0,0 +1,107 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOMEventListener.idl + */ + +#ifndef __gen_nsIDOMEventListener_h__ +#define __gen_nsIDOMEventListener_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMEventListener */ +#define NS_IDOMEVENTLISTENER_IID_STR "df31c120-ded6-11d1-bd85-00805f8ae3f4" + +#define NS_IDOMEVENTLISTENER_IID \ + {0xdf31c120, 0xded6, 0x11d1, \ + { 0xbd, 0x85, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 }} + +class NS_NO_VTABLE nsIDOMEventListener : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMEVENTLISTENER_IID) + + /** + * The nsIDOMEventListener interface is a callback interface for + * listening to events in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ +/** + * This method is called whenever an event occurs of the type for which + * the EventListener interface was registered. + * + * @param evt The Event contains contextual information about the + * event. It also contains the stopPropagation and + * preventDefault methods which are used in determining the + * event's flow and default action. + */ + /* void handleEvent (in nsIDOMEvent event); */ + NS_IMETHOD HandleEvent(nsIDOMEvent *event) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMEVENTLISTENER \ + NS_IMETHOD HandleEvent(nsIDOMEvent *event); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMEVENTLISTENER(_to) \ + NS_IMETHOD HandleEvent(nsIDOMEvent *event) { return _to HandleEvent(event); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMEVENTLISTENER(_to) \ + NS_IMETHOD HandleEvent(nsIDOMEvent *event) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleEvent(event); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMEventListener : public nsIDOMEventListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMEVENTLISTENER + + nsDOMEventListener(); + +private: + ~nsDOMEventListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMEventListener, nsIDOMEventListener) + +nsDOMEventListener::nsDOMEventListener() +{ + /* member initializers and constructor code */ +} + +nsDOMEventListener::~nsDOMEventListener() +{ + /* destructor code */ +} + +/* void handleEvent (in nsIDOMEvent event); */ +NS_IMETHODIMP nsDOMEventListener::HandleEvent(nsIDOMEvent *event) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMEventListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventTarget.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventTarget.h new file mode 100644 index 00000000..b10c8dfd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMEventTarget.h @@ -0,0 +1,185 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOMEventTarget.idl + */ + +#ifndef __gen_nsIDOMEventTarget_h__ +#define __gen_nsIDOMEventTarget_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMEventTarget */ +#define NS_IDOMEVENTTARGET_IID_STR "1c773b30-d1cf-11d2-bd95-00805f8ae3f4" + +#define NS_IDOMEVENTTARGET_IID \ + {0x1c773b30, 0xd1cf, 0x11d2, \ + { 0xbd, 0x95, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 }} + +class NS_NO_VTABLE nsIDOMEventTarget : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMEVENTTARGET_IID) + + /** + * The nsIDOMEventTarget interface is the interface implemented by all + * event targets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ +/** + * This method allows the registration of event listeners on the event target. + * If an EventListener is added to an EventTarget while it is processing an + * event, it will not be triggered by the current actions but may be + * triggered during a later stage of event flow, such as the bubbling phase. + * + * If multiple identical EventListeners are registered on the same + * EventTarget with the same parameters the duplicate instances are + * discarded. They do not cause the EventListener to be called twice + * and since they are discarded they do not need to be removed with the + * removeEventListener method. + * + * @param type The event type for which the user is registering + * @param listener The listener parameter takes an interface + * implemented by the user which contains the methods + * to be called when the event occurs. + * @param useCapture If true, useCapture indicates that the user + * wishes to initiate capture. After initiating + * capture, all events of the specified type will be + * dispatched to the registered EventListener before + * being dispatched to any EventTargets beneath them + * in the tree. Events which are bubbling upward + * through the tree will not trigger an + * EventListener designated to use capture. + */ + /* void addEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); */ + NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture) = 0; + + /** + * This method allows the removal of event listeners from the event + * target. If an EventListener is removed from an EventTarget while it + * is processing an event, it will not be triggered by the current actions. + * EventListeners can never be invoked after being removed. + * Calling removeEventListener with arguments which do not identify any + * currently registered EventListener on the EventTarget has no effect. + * + * @param type Specifies the event type of the EventListener being + * removed. + * @param listener The EventListener parameter indicates the + * EventListener to be removed. + * @param useCapture Specifies whether the EventListener being + * removed was registered as a capturing listener or + * not. If a listener was registered twice, one with + * capture and one without, each must be removed + * separately. Removal of a capturing listener does + * not affect a non-capturing version of the same + * listener, and vice versa. + */ + /* void removeEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); */ + NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture) = 0; + + /** + * This method allows the dispatch of events into the implementations + * event model. Events dispatched in this manner will have the same + * capturing and bubbling behavior as events dispatched directly by the + * implementation. The target of the event is the EventTarget on which + * dispatchEvent is called. + * + * @param evt Specifies the event type, behavior, and contextual + * information to be used in processing the event. + * @return Indicates whether any of the listeners which handled the + * event called preventDefault. If preventDefault was called + * the value is false, else the value is true. + * @throws UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was + * not specified by initializing the event before + * dispatchEvent was called. Specification of the Event's + * type as null or an empty string will also trigger this + * exception. + */ + /* boolean dispatchEvent (in nsIDOMEvent evt) raises (DOMException); */ + NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMEVENTTARGET \ + NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture); \ + NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture); \ + NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMEVENTTARGET(_to) \ + NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture) { return _to AddEventListener(type, listener, useCapture); } \ + NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture) { return _to RemoveEventListener(type, listener, useCapture); } \ + NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, PRBool *_retval) { return _to DispatchEvent(evt, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMEVENTTARGET(_to) \ + NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEventListener(type, listener, useCapture); } \ + NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveEventListener(type, listener, useCapture); } \ + NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->DispatchEvent(evt, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMEventTarget : public nsIDOMEventTarget +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMEVENTTARGET + + nsDOMEventTarget(); + +private: + ~nsDOMEventTarget(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMEventTarget, nsIDOMEventTarget) + +nsDOMEventTarget::nsDOMEventTarget() +{ + /* member initializers and constructor code */ +} + +nsDOMEventTarget::~nsDOMEventTarget() +{ + /* destructor code */ +} + +/* void addEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); */ +NS_IMETHODIMP nsDOMEventTarget::AddEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); */ +NS_IMETHODIMP nsDOMEventTarget::RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean dispatchEvent (in nsIDOMEvent evt) raises (DOMException); */ +NS_IMETHODIMP nsDOMEventTarget::DispatchEvent(nsIDOMEvent *evt, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMEventTarget_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAnchorElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAnchorElement.h new file mode 100644 index 00000000..0b3cd4bf --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAnchorElement.h @@ -0,0 +1,350 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLAnchorElement.idl + */ + +#ifndef __gen_nsIDOMHTMLAnchorElement_h__ +#define __gen_nsIDOMHTMLAnchorElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLAnchorElement */ +#define NS_IDOMHTMLANCHORELEMENT_IID_STR "a6cf90aa-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLANCHORELEMENT_IID \ + {0xa6cf90aa, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLAnchorElement interface is the interface to a [X]HTML + * a element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLAnchorElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLANCHORELEMENT_IID) + + /* attribute DOMString accessKey; */ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) = 0; + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) = 0; + + /* attribute DOMString charset; */ + NS_IMETHOD GetCharset(nsAString & aCharset) = 0; + NS_IMETHOD SetCharset(const nsAString & aCharset) = 0; + + /* attribute DOMString coords; */ + NS_IMETHOD GetCoords(nsAString & aCoords) = 0; + NS_IMETHOD SetCoords(const nsAString & aCoords) = 0; + + /* attribute DOMString href; */ + NS_IMETHOD GetHref(nsAString & aHref) = 0; + NS_IMETHOD SetHref(const nsAString & aHref) = 0; + + /* attribute DOMString hreflang; */ + NS_IMETHOD GetHreflang(nsAString & aHreflang) = 0; + NS_IMETHOD SetHreflang(const nsAString & aHreflang) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString rel; */ + NS_IMETHOD GetRel(nsAString & aRel) = 0; + NS_IMETHOD SetRel(const nsAString & aRel) = 0; + + /* attribute DOMString rev; */ + NS_IMETHOD GetRev(nsAString & aRev) = 0; + NS_IMETHOD SetRev(const nsAString & aRev) = 0; + + /* attribute DOMString shape; */ + NS_IMETHOD GetShape(nsAString & aShape) = 0; + NS_IMETHOD SetShape(const nsAString & aShape) = 0; + + /* attribute long tabIndex; */ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) = 0; + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) = 0; + + /* attribute DOMString target; */ + NS_IMETHOD GetTarget(nsAString & aTarget) = 0; + NS_IMETHOD SetTarget(const nsAString & aTarget) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + + /* void blur (); */ + NS_IMETHOD Blur(void) = 0; + + /* void focus (); */ + NS_IMETHOD Focus(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLANCHORELEMENT \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey); \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey); \ + NS_IMETHOD GetCharset(nsAString & aCharset); \ + NS_IMETHOD SetCharset(const nsAString & aCharset); \ + NS_IMETHOD GetCoords(nsAString & aCoords); \ + NS_IMETHOD SetCoords(const nsAString & aCoords); \ + NS_IMETHOD GetHref(nsAString & aHref); \ + NS_IMETHOD SetHref(const nsAString & aHref); \ + NS_IMETHOD GetHreflang(nsAString & aHreflang); \ + NS_IMETHOD SetHreflang(const nsAString & aHreflang); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetRel(nsAString & aRel); \ + NS_IMETHOD SetRel(const nsAString & aRel); \ + NS_IMETHOD GetRev(nsAString & aRev); \ + NS_IMETHOD SetRev(const nsAString & aRev); \ + NS_IMETHOD GetShape(nsAString & aShape); \ + NS_IMETHOD SetShape(const nsAString & aShape); \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex); \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ + NS_IMETHOD GetTarget(nsAString & aTarget); \ + NS_IMETHOD SetTarget(const nsAString & aTarget); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); \ + NS_IMETHOD Blur(void); \ + NS_IMETHOD Focus(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLANCHORELEMENT(_to) \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return _to GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return _to SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetCharset(nsAString & aCharset) { return _to GetCharset(aCharset); } \ + NS_IMETHOD SetCharset(const nsAString & aCharset) { return _to SetCharset(aCharset); } \ + NS_IMETHOD GetCoords(nsAString & aCoords) { return _to GetCoords(aCoords); } \ + NS_IMETHOD SetCoords(const nsAString & aCoords) { return _to SetCoords(aCoords); } \ + NS_IMETHOD GetHref(nsAString & aHref) { return _to GetHref(aHref); } \ + NS_IMETHOD SetHref(const nsAString & aHref) { return _to SetHref(aHref); } \ + NS_IMETHOD GetHreflang(nsAString & aHreflang) { return _to GetHreflang(aHreflang); } \ + NS_IMETHOD SetHreflang(const nsAString & aHreflang) { return _to SetHreflang(aHreflang); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetRel(nsAString & aRel) { return _to GetRel(aRel); } \ + NS_IMETHOD SetRel(const nsAString & aRel) { return _to SetRel(aRel); } \ + NS_IMETHOD GetRev(nsAString & aRev) { return _to GetRev(aRev); } \ + NS_IMETHOD SetRev(const nsAString & aRev) { return _to SetRev(aRev); } \ + NS_IMETHOD GetShape(nsAString & aShape) { return _to GetShape(aShape); } \ + NS_IMETHOD SetShape(const nsAString & aShape) { return _to SetShape(aShape); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return _to GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return _to GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return _to SetTarget(aTarget); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } \ + NS_IMETHOD Blur(void) { return _to Blur(); } \ + NS_IMETHOD Focus(void) { return _to Focus(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLANCHORELEMENT(_to) \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetCharset(nsAString & aCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharset(aCharset); } \ + NS_IMETHOD SetCharset(const nsAString & aCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCharset(aCharset); } \ + NS_IMETHOD GetCoords(nsAString & aCoords) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCoords(aCoords); } \ + NS_IMETHOD SetCoords(const nsAString & aCoords) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCoords(aCoords); } \ + NS_IMETHOD GetHref(nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHref(aHref); } \ + NS_IMETHOD SetHref(const nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHref(aHref); } \ + NS_IMETHOD GetHreflang(nsAString & aHreflang) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHreflang(aHreflang); } \ + NS_IMETHOD SetHreflang(const nsAString & aHreflang) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHreflang(aHreflang); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetRel(nsAString & aRel) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRel(aRel); } \ + NS_IMETHOD SetRel(const nsAString & aRel) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRel(aRel); } \ + NS_IMETHOD GetRev(nsAString & aRev) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRev(aRev); } \ + NS_IMETHOD SetRev(const nsAString & aRev) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRev(aRev); } \ + NS_IMETHOD GetShape(nsAString & aShape) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShape(aShape); } \ + NS_IMETHOD SetShape(const nsAString & aShape) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShape(aShape); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTarget(aTarget); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } \ + NS_IMETHOD Blur(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Blur(); } \ + NS_IMETHOD Focus(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Focus(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLAnchorElement : public nsIDOMHTMLAnchorElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLANCHORELEMENT + + nsDOMHTMLAnchorElement(); + +private: + ~nsDOMHTMLAnchorElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLAnchorElement, nsIDOMHTMLAnchorElement) + +nsDOMHTMLAnchorElement::nsDOMHTMLAnchorElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLAnchorElement::~nsDOMHTMLAnchorElement() +{ + /* destructor code */ +} + +/* attribute DOMString accessKey; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetAccessKey(nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetAccessKey(const nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString charset; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetCharset(nsAString & aCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetCharset(const nsAString & aCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString coords; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetCoords(nsAString & aCoords) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetCoords(const nsAString & aCoords) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString href; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetHref(nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetHref(const nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString hreflang; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetHreflang(nsAString & aHreflang) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetHreflang(const nsAString & aHreflang) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString rel; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetRel(nsAString & aRel) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetRel(const nsAString & aRel) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString rev; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetRev(nsAString & aRev) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetRev(const nsAString & aRev) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString shape; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetShape(nsAString & aShape) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetShape(const nsAString & aShape) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long tabIndex; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetTabIndex(PRInt32 *aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetTabIndex(PRInt32 aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString target; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetTarget(nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetTarget(const nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAnchorElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void blur (); */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::Blur() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void focus (); */ +NS_IMETHODIMP nsDOMHTMLAnchorElement::Focus() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLAnchorElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAppletElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAppletElement.h new file mode 100644 index 00000000..b4fc305c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAppletElement.h @@ -0,0 +1,306 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLAppletElement.idl + */ + +#ifndef __gen_nsIDOMHTMLAppletElement_h__ +#define __gen_nsIDOMHTMLAppletElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLAppletElement */ +#define NS_IDOMHTMLAPPLETELEMENT_IID_STR "a6cf90ae-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLAPPLETELEMENT_IID \ + {0xa6cf90ae, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLAppletElement interface is the interface to a [X]HTML + * applet element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLAppletElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLAPPLETELEMENT_IID) + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString alt; */ + NS_IMETHOD GetAlt(nsAString & aAlt) = 0; + NS_IMETHOD SetAlt(const nsAString & aAlt) = 0; + + /* attribute DOMString archive; */ + NS_IMETHOD GetArchive(nsAString & aArchive) = 0; + NS_IMETHOD SetArchive(const nsAString & aArchive) = 0; + + /* attribute DOMString code; */ + NS_IMETHOD GetCode(nsAString & aCode) = 0; + NS_IMETHOD SetCode(const nsAString & aCode) = 0; + + /* attribute DOMString codeBase; */ + NS_IMETHOD GetCodeBase(nsAString & aCodeBase) = 0; + NS_IMETHOD SetCodeBase(const nsAString & aCodeBase) = 0; + + /* attribute DOMString height; */ + NS_IMETHOD GetHeight(nsAString & aHeight) = 0; + NS_IMETHOD SetHeight(const nsAString & aHeight) = 0; + + /* attribute long hspace; */ + NS_IMETHOD GetHspace(PRInt32 *aHspace) = 0; + NS_IMETHOD SetHspace(PRInt32 aHspace) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString object; */ + NS_IMETHOD GetObject(nsAString & aObject) = 0; + NS_IMETHOD SetObject(const nsAString & aObject) = 0; + + /* attribute long vspace; */ + NS_IMETHOD GetVspace(PRInt32 *aVspace) = 0; + NS_IMETHOD SetVspace(PRInt32 aVspace) = 0; + + /* attribute DOMString width; */ + NS_IMETHOD GetWidth(nsAString & aWidth) = 0; + NS_IMETHOD SetWidth(const nsAString & aWidth) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLAPPLETELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetAlt(nsAString & aAlt); \ + NS_IMETHOD SetAlt(const nsAString & aAlt); \ + NS_IMETHOD GetArchive(nsAString & aArchive); \ + NS_IMETHOD SetArchive(const nsAString & aArchive); \ + NS_IMETHOD GetCode(nsAString & aCode); \ + NS_IMETHOD SetCode(const nsAString & aCode); \ + NS_IMETHOD GetCodeBase(nsAString & aCodeBase); \ + NS_IMETHOD SetCodeBase(const nsAString & aCodeBase); \ + NS_IMETHOD GetHeight(nsAString & aHeight); \ + NS_IMETHOD SetHeight(const nsAString & aHeight); \ + NS_IMETHOD GetHspace(PRInt32 *aHspace); \ + NS_IMETHOD SetHspace(PRInt32 aHspace); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetObject(nsAString & aObject); \ + NS_IMETHOD SetObject(const nsAString & aObject); \ + NS_IMETHOD GetVspace(PRInt32 *aVspace); \ + NS_IMETHOD SetVspace(PRInt32 aVspace); \ + NS_IMETHOD GetWidth(nsAString & aWidth); \ + NS_IMETHOD SetWidth(const nsAString & aWidth); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLAPPLETELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetAlt(nsAString & aAlt) { return _to GetAlt(aAlt); } \ + NS_IMETHOD SetAlt(const nsAString & aAlt) { return _to SetAlt(aAlt); } \ + NS_IMETHOD GetArchive(nsAString & aArchive) { return _to GetArchive(aArchive); } \ + NS_IMETHOD SetArchive(const nsAString & aArchive) { return _to SetArchive(aArchive); } \ + NS_IMETHOD GetCode(nsAString & aCode) { return _to GetCode(aCode); } \ + NS_IMETHOD SetCode(const nsAString & aCode) { return _to SetCode(aCode); } \ + NS_IMETHOD GetCodeBase(nsAString & aCodeBase) { return _to GetCodeBase(aCodeBase); } \ + NS_IMETHOD SetCodeBase(const nsAString & aCodeBase) { return _to SetCodeBase(aCodeBase); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return _to GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return _to SetHeight(aHeight); } \ + NS_IMETHOD GetHspace(PRInt32 *aHspace) { return _to GetHspace(aHspace); } \ + NS_IMETHOD SetHspace(PRInt32 aHspace) { return _to SetHspace(aHspace); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetObject(nsAString & aObject) { return _to GetObject(aObject); } \ + NS_IMETHOD SetObject(const nsAString & aObject) { return _to SetObject(aObject); } \ + NS_IMETHOD GetVspace(PRInt32 *aVspace) { return _to GetVspace(aVspace); } \ + NS_IMETHOD SetVspace(PRInt32 aVspace) { return _to SetVspace(aVspace); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return _to SetWidth(aWidth); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLAPPLETELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetAlt(nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlt(aAlt); } \ + NS_IMETHOD SetAlt(const nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlt(aAlt); } \ + NS_IMETHOD GetArchive(nsAString & aArchive) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetArchive(aArchive); } \ + NS_IMETHOD SetArchive(const nsAString & aArchive) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetArchive(aArchive); } \ + NS_IMETHOD GetCode(nsAString & aCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCode(aCode); } \ + NS_IMETHOD SetCode(const nsAString & aCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCode(aCode); } \ + NS_IMETHOD GetCodeBase(nsAString & aCodeBase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCodeBase(aCodeBase); } \ + NS_IMETHOD SetCodeBase(const nsAString & aCodeBase) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCodeBase(aCodeBase); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHeight(aHeight); } \ + NS_IMETHOD GetHspace(PRInt32 *aHspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHspace(aHspace); } \ + NS_IMETHOD SetHspace(PRInt32 aHspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHspace(aHspace); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetObject(nsAString & aObject) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetObject(aObject); } \ + NS_IMETHOD SetObject(const nsAString & aObject) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetObject(aObject); } \ + NS_IMETHOD GetVspace(PRInt32 *aVspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVspace(aVspace); } \ + NS_IMETHOD SetVspace(PRInt32 aVspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVspace(aVspace); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLAppletElement : public nsIDOMHTMLAppletElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLAPPLETELEMENT + + nsDOMHTMLAppletElement(); + +private: + ~nsDOMHTMLAppletElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLAppletElement, nsIDOMHTMLAppletElement) + +nsDOMHTMLAppletElement::nsDOMHTMLAppletElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLAppletElement::~nsDOMHTMLAppletElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString alt; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetAlt(nsAString & aAlt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetAlt(const nsAString & aAlt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString archive; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetArchive(nsAString & aArchive) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetArchive(const nsAString & aArchive) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString code; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetCode(nsAString & aCode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetCode(const nsAString & aCode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString codeBase; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetCodeBase(nsAString & aCodeBase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetCodeBase(const nsAString & aCodeBase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString height; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetHeight(nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetHeight(const nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long hspace; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetHspace(PRInt32 *aHspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetHspace(PRInt32 aHspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString object; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetObject(nsAString & aObject) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetObject(const nsAString & aObject) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long vspace; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetVspace(PRInt32 *aVspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetVspace(PRInt32 aVspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString width; */ +NS_IMETHODIMP nsDOMHTMLAppletElement::GetWidth(nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAppletElement::SetWidth(const nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLAppletElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAreaElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAreaElement.h new file mode 100644 index 00000000..45bd4832 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLAreaElement.h @@ -0,0 +1,246 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLAreaElement.idl + */ + +#ifndef __gen_nsIDOMHTMLAreaElement_h__ +#define __gen_nsIDOMHTMLAreaElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLAreaElement */ +#define NS_IDOMHTMLAREAELEMENT_IID_STR "a6cf90b0-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLAREAELEMENT_IID \ + {0xa6cf90b0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLAreaElement interface is the interface to a [X]HTML + * area element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLAreaElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLAREAELEMENT_IID) + + /* attribute DOMString accessKey; */ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) = 0; + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) = 0; + + /* attribute DOMString alt; */ + NS_IMETHOD GetAlt(nsAString & aAlt) = 0; + NS_IMETHOD SetAlt(const nsAString & aAlt) = 0; + + /* attribute DOMString coords; */ + NS_IMETHOD GetCoords(nsAString & aCoords) = 0; + NS_IMETHOD SetCoords(const nsAString & aCoords) = 0; + + /* attribute DOMString href; */ + NS_IMETHOD GetHref(nsAString & aHref) = 0; + NS_IMETHOD SetHref(const nsAString & aHref) = 0; + + /* attribute boolean noHref; */ + NS_IMETHOD GetNoHref(PRBool *aNoHref) = 0; + NS_IMETHOD SetNoHref(PRBool aNoHref) = 0; + + /* attribute DOMString shape; */ + NS_IMETHOD GetShape(nsAString & aShape) = 0; + NS_IMETHOD SetShape(const nsAString & aShape) = 0; + + /* attribute long tabIndex; */ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) = 0; + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) = 0; + + /* attribute DOMString target; */ + NS_IMETHOD GetTarget(nsAString & aTarget) = 0; + NS_IMETHOD SetTarget(const nsAString & aTarget) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLAREAELEMENT \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey); \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey); \ + NS_IMETHOD GetAlt(nsAString & aAlt); \ + NS_IMETHOD SetAlt(const nsAString & aAlt); \ + NS_IMETHOD GetCoords(nsAString & aCoords); \ + NS_IMETHOD SetCoords(const nsAString & aCoords); \ + NS_IMETHOD GetHref(nsAString & aHref); \ + NS_IMETHOD SetHref(const nsAString & aHref); \ + NS_IMETHOD GetNoHref(PRBool *aNoHref); \ + NS_IMETHOD SetNoHref(PRBool aNoHref); \ + NS_IMETHOD GetShape(nsAString & aShape); \ + NS_IMETHOD SetShape(const nsAString & aShape); \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex); \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ + NS_IMETHOD GetTarget(nsAString & aTarget); \ + NS_IMETHOD SetTarget(const nsAString & aTarget); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLAREAELEMENT(_to) \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return _to GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return _to SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetAlt(nsAString & aAlt) { return _to GetAlt(aAlt); } \ + NS_IMETHOD SetAlt(const nsAString & aAlt) { return _to SetAlt(aAlt); } \ + NS_IMETHOD GetCoords(nsAString & aCoords) { return _to GetCoords(aCoords); } \ + NS_IMETHOD SetCoords(const nsAString & aCoords) { return _to SetCoords(aCoords); } \ + NS_IMETHOD GetHref(nsAString & aHref) { return _to GetHref(aHref); } \ + NS_IMETHOD SetHref(const nsAString & aHref) { return _to SetHref(aHref); } \ + NS_IMETHOD GetNoHref(PRBool *aNoHref) { return _to GetNoHref(aNoHref); } \ + NS_IMETHOD SetNoHref(PRBool aNoHref) { return _to SetNoHref(aNoHref); } \ + NS_IMETHOD GetShape(nsAString & aShape) { return _to GetShape(aShape); } \ + NS_IMETHOD SetShape(const nsAString & aShape) { return _to SetShape(aShape); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return _to GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return _to GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return _to SetTarget(aTarget); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLAREAELEMENT(_to) \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetAlt(nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlt(aAlt); } \ + NS_IMETHOD SetAlt(const nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlt(aAlt); } \ + NS_IMETHOD GetCoords(nsAString & aCoords) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCoords(aCoords); } \ + NS_IMETHOD SetCoords(const nsAString & aCoords) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCoords(aCoords); } \ + NS_IMETHOD GetHref(nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHref(aHref); } \ + NS_IMETHOD SetHref(const nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHref(aHref); } \ + NS_IMETHOD GetNoHref(PRBool *aNoHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNoHref(aNoHref); } \ + NS_IMETHOD SetNoHref(PRBool aNoHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNoHref(aNoHref); } \ + NS_IMETHOD GetShape(nsAString & aShape) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShape(aShape); } \ + NS_IMETHOD SetShape(const nsAString & aShape) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShape(aShape); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTarget(aTarget); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLAreaElement : public nsIDOMHTMLAreaElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLAREAELEMENT + + nsDOMHTMLAreaElement(); + +private: + ~nsDOMHTMLAreaElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLAreaElement, nsIDOMHTMLAreaElement) + +nsDOMHTMLAreaElement::nsDOMHTMLAreaElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLAreaElement::~nsDOMHTMLAreaElement() +{ + /* destructor code */ +} + +/* attribute DOMString accessKey; */ +NS_IMETHODIMP nsDOMHTMLAreaElement::GetAccessKey(nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAreaElement::SetAccessKey(const nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString alt; */ +NS_IMETHODIMP nsDOMHTMLAreaElement::GetAlt(nsAString & aAlt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAreaElement::SetAlt(const nsAString & aAlt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString coords; */ +NS_IMETHODIMP nsDOMHTMLAreaElement::GetCoords(nsAString & aCoords) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAreaElement::SetCoords(const nsAString & aCoords) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString href; */ +NS_IMETHODIMP nsDOMHTMLAreaElement::GetHref(nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAreaElement::SetHref(const nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean noHref; */ +NS_IMETHODIMP nsDOMHTMLAreaElement::GetNoHref(PRBool *aNoHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAreaElement::SetNoHref(PRBool aNoHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString shape; */ +NS_IMETHODIMP nsDOMHTMLAreaElement::GetShape(nsAString & aShape) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAreaElement::SetShape(const nsAString & aShape) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long tabIndex; */ +NS_IMETHODIMP nsDOMHTMLAreaElement::GetTabIndex(PRInt32 *aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAreaElement::SetTabIndex(PRInt32 aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString target; */ +NS_IMETHODIMP nsDOMHTMLAreaElement::GetTarget(nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLAreaElement::SetTarget(const nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLAreaElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBRElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBRElement.h new file mode 100644 index 00000000..9d6c211f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBRElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLBRElement.idl + */ + +#ifndef __gen_nsIDOMHTMLBRElement_h__ +#define __gen_nsIDOMHTMLBRElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLBRElement */ +#define NS_IDOMHTMLBRELEMENT_IID_STR "a6cf90a5-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLBRELEMENT_IID \ + {0xa6cf90a5, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLBRElement interface is the interface to a [X]HTML br + * element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLBRElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLBRELEMENT_IID) + + /* attribute DOMString clear; */ + NS_IMETHOD GetClear(nsAString & aClear) = 0; + NS_IMETHOD SetClear(const nsAString & aClear) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLBRELEMENT \ + NS_IMETHOD GetClear(nsAString & aClear); \ + NS_IMETHOD SetClear(const nsAString & aClear); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLBRELEMENT(_to) \ + NS_IMETHOD GetClear(nsAString & aClear) { return _to GetClear(aClear); } \ + NS_IMETHOD SetClear(const nsAString & aClear) { return _to SetClear(aClear); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLBRELEMENT(_to) \ + NS_IMETHOD GetClear(nsAString & aClear) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClear(aClear); } \ + NS_IMETHOD SetClear(const nsAString & aClear) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetClear(aClear); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLBRElement : public nsIDOMHTMLBRElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLBRELEMENT + + nsDOMHTMLBRElement(); + +private: + ~nsDOMHTMLBRElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLBRElement, nsIDOMHTMLBRElement) + +nsDOMHTMLBRElement::nsDOMHTMLBRElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLBRElement::~nsDOMHTMLBRElement() +{ + /* destructor code */ +} + +/* attribute DOMString clear; */ +NS_IMETHODIMP nsDOMHTMLBRElement::GetClear(nsAString & aClear) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBRElement::SetClear(const nsAString & aClear) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLBRElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBaseElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBaseElement.h new file mode 100644 index 00000000..81b0d987 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBaseElement.h @@ -0,0 +1,126 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLBaseElement.idl + */ + +#ifndef __gen_nsIDOMHTMLBaseElement_h__ +#define __gen_nsIDOMHTMLBaseElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLBaseElement */ +#define NS_IDOMHTMLBASEELEMENT_IID_STR "a6cf908b-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLBASEELEMENT_IID \ + {0xa6cf908b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLBaseElement interface is the interface to a [X]HTML + * base element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLBaseElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLBASEELEMENT_IID) + + /* attribute DOMString href; */ + NS_IMETHOD GetHref(nsAString & aHref) = 0; + NS_IMETHOD SetHref(const nsAString & aHref) = 0; + + /* attribute DOMString target; */ + NS_IMETHOD GetTarget(nsAString & aTarget) = 0; + NS_IMETHOD SetTarget(const nsAString & aTarget) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLBASEELEMENT \ + NS_IMETHOD GetHref(nsAString & aHref); \ + NS_IMETHOD SetHref(const nsAString & aHref); \ + NS_IMETHOD GetTarget(nsAString & aTarget); \ + NS_IMETHOD SetTarget(const nsAString & aTarget); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLBASEELEMENT(_to) \ + NS_IMETHOD GetHref(nsAString & aHref) { return _to GetHref(aHref); } \ + NS_IMETHOD SetHref(const nsAString & aHref) { return _to SetHref(aHref); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return _to GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return _to SetTarget(aTarget); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLBASEELEMENT(_to) \ + NS_IMETHOD GetHref(nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHref(aHref); } \ + NS_IMETHOD SetHref(const nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHref(aHref); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTarget(aTarget); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLBaseElement : public nsIDOMHTMLBaseElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLBASEELEMENT + + nsDOMHTMLBaseElement(); + +private: + ~nsDOMHTMLBaseElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLBaseElement, nsIDOMHTMLBaseElement) + +nsDOMHTMLBaseElement::nsDOMHTMLBaseElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLBaseElement::~nsDOMHTMLBaseElement() +{ + /* destructor code */ +} + +/* attribute DOMString href; */ +NS_IMETHODIMP nsDOMHTMLBaseElement::GetHref(nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBaseElement::SetHref(const nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString target; */ +NS_IMETHODIMP nsDOMHTMLBaseElement::GetTarget(nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBaseElement::SetTarget(const nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLBaseElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBaseFontElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBaseFontElement.h new file mode 100644 index 00000000..805785c9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBaseFontElement.h @@ -0,0 +1,146 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLBaseFontElement.idl + */ + +#ifndef __gen_nsIDOMHTMLBaseFontElement_h__ +#define __gen_nsIDOMHTMLBaseFontElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLBaseFontElement */ +#define NS_IDOMHTMLBASEFONTELEMENT_IID_STR "a6cf90a6-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLBASEFONTELEMENT_IID \ + {0xa6cf90a6, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLBaseFontElement interface is the interface to a + * [X]HTML basefont element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLBaseFontElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLBASEFONTELEMENT_IID) + + /* attribute DOMString color; */ + NS_IMETHOD GetColor(nsAString & aColor) = 0; + NS_IMETHOD SetColor(const nsAString & aColor) = 0; + + /* attribute DOMString face; */ + NS_IMETHOD GetFace(nsAString & aFace) = 0; + NS_IMETHOD SetFace(const nsAString & aFace) = 0; + + /* attribute long size; */ + NS_IMETHOD GetSize(PRInt32 *aSize) = 0; + NS_IMETHOD SetSize(PRInt32 aSize) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLBASEFONTELEMENT \ + NS_IMETHOD GetColor(nsAString & aColor); \ + NS_IMETHOD SetColor(const nsAString & aColor); \ + NS_IMETHOD GetFace(nsAString & aFace); \ + NS_IMETHOD SetFace(const nsAString & aFace); \ + NS_IMETHOD GetSize(PRInt32 *aSize); \ + NS_IMETHOD SetSize(PRInt32 aSize); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLBASEFONTELEMENT(_to) \ + NS_IMETHOD GetColor(nsAString & aColor) { return _to GetColor(aColor); } \ + NS_IMETHOD SetColor(const nsAString & aColor) { return _to SetColor(aColor); } \ + NS_IMETHOD GetFace(nsAString & aFace) { return _to GetFace(aFace); } \ + NS_IMETHOD SetFace(const nsAString & aFace) { return _to SetFace(aFace); } \ + NS_IMETHOD GetSize(PRInt32 *aSize) { return _to GetSize(aSize); } \ + NS_IMETHOD SetSize(PRInt32 aSize) { return _to SetSize(aSize); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLBASEFONTELEMENT(_to) \ + NS_IMETHOD GetColor(nsAString & aColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetColor(aColor); } \ + NS_IMETHOD SetColor(const nsAString & aColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetColor(aColor); } \ + NS_IMETHOD GetFace(nsAString & aFace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFace(aFace); } \ + NS_IMETHOD SetFace(const nsAString & aFace) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFace(aFace); } \ + NS_IMETHOD GetSize(PRInt32 *aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \ + NS_IMETHOD SetSize(PRInt32 aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSize(aSize); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLBaseFontElement : public nsIDOMHTMLBaseFontElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLBASEFONTELEMENT + + nsDOMHTMLBaseFontElement(); + +private: + ~nsDOMHTMLBaseFontElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLBaseFontElement, nsIDOMHTMLBaseFontElement) + +nsDOMHTMLBaseFontElement::nsDOMHTMLBaseFontElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLBaseFontElement::~nsDOMHTMLBaseFontElement() +{ + /* destructor code */ +} + +/* attribute DOMString color; */ +NS_IMETHODIMP nsDOMHTMLBaseFontElement::GetColor(nsAString & aColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBaseFontElement::SetColor(const nsAString & aColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString face; */ +NS_IMETHODIMP nsDOMHTMLBaseFontElement::GetFace(nsAString & aFace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBaseFontElement::SetFace(const nsAString & aFace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long size; */ +NS_IMETHODIMP nsDOMHTMLBaseFontElement::GetSize(PRInt32 *aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBaseFontElement::SetSize(PRInt32 aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLBaseFontElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBodyElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBodyElement.h new file mode 100644 index 00000000..b09e5a11 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLBodyElement.h @@ -0,0 +1,206 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLBodyElement.idl + */ + +#ifndef __gen_nsIDOMHTMLBodyElement_h__ +#define __gen_nsIDOMHTMLBodyElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLBodyElement */ +#define NS_IDOMHTMLBODYELEMENT_IID_STR "a6cf908e-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLBODYELEMENT_IID \ + {0xa6cf908e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLBodyElement interface is the interface to a [X]HTML + * body element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLBodyElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLBODYELEMENT_IID) + + /* attribute DOMString aLink; */ + NS_IMETHOD GetALink(nsAString & aALink) = 0; + NS_IMETHOD SetALink(const nsAString & aALink) = 0; + + /* attribute DOMString background; */ + NS_IMETHOD GetBackground(nsAString & aBackground) = 0; + NS_IMETHOD SetBackground(const nsAString & aBackground) = 0; + + /* attribute DOMString bgColor; */ + NS_IMETHOD GetBgColor(nsAString & aBgColor) = 0; + NS_IMETHOD SetBgColor(const nsAString & aBgColor) = 0; + + /* attribute DOMString link; */ + NS_IMETHOD GetLink(nsAString & aLink) = 0; + NS_IMETHOD SetLink(const nsAString & aLink) = 0; + + /* attribute DOMString text; */ + NS_IMETHOD GetText(nsAString & aText) = 0; + NS_IMETHOD SetText(const nsAString & aText) = 0; + + /* attribute DOMString vLink; */ + NS_IMETHOD GetVLink(nsAString & aVLink) = 0; + NS_IMETHOD SetVLink(const nsAString & aVLink) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLBODYELEMENT \ + NS_IMETHOD GetALink(nsAString & aALink); \ + NS_IMETHOD SetALink(const nsAString & aALink); \ + NS_IMETHOD GetBackground(nsAString & aBackground); \ + NS_IMETHOD SetBackground(const nsAString & aBackground); \ + NS_IMETHOD GetBgColor(nsAString & aBgColor); \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor); \ + NS_IMETHOD GetLink(nsAString & aLink); \ + NS_IMETHOD SetLink(const nsAString & aLink); \ + NS_IMETHOD GetText(nsAString & aText); \ + NS_IMETHOD SetText(const nsAString & aText); \ + NS_IMETHOD GetVLink(nsAString & aVLink); \ + NS_IMETHOD SetVLink(const nsAString & aVLink); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLBODYELEMENT(_to) \ + NS_IMETHOD GetALink(nsAString & aALink) { return _to GetALink(aALink); } \ + NS_IMETHOD SetALink(const nsAString & aALink) { return _to SetALink(aALink); } \ + NS_IMETHOD GetBackground(nsAString & aBackground) { return _to GetBackground(aBackground); } \ + NS_IMETHOD SetBackground(const nsAString & aBackground) { return _to SetBackground(aBackground); } \ + NS_IMETHOD GetBgColor(nsAString & aBgColor) { return _to GetBgColor(aBgColor); } \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor) { return _to SetBgColor(aBgColor); } \ + NS_IMETHOD GetLink(nsAString & aLink) { return _to GetLink(aLink); } \ + NS_IMETHOD SetLink(const nsAString & aLink) { return _to SetLink(aLink); } \ + NS_IMETHOD GetText(nsAString & aText) { return _to GetText(aText); } \ + NS_IMETHOD SetText(const nsAString & aText) { return _to SetText(aText); } \ + NS_IMETHOD GetVLink(nsAString & aVLink) { return _to GetVLink(aVLink); } \ + NS_IMETHOD SetVLink(const nsAString & aVLink) { return _to SetVLink(aVLink); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLBODYELEMENT(_to) \ + NS_IMETHOD GetALink(nsAString & aALink) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetALink(aALink); } \ + NS_IMETHOD SetALink(const nsAString & aALink) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetALink(aALink); } \ + NS_IMETHOD GetBackground(nsAString & aBackground) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBackground(aBackground); } \ + NS_IMETHOD SetBackground(const nsAString & aBackground) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBackground(aBackground); } \ + NS_IMETHOD GetBgColor(nsAString & aBgColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBgColor(aBgColor); } \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBgColor(aBgColor); } \ + NS_IMETHOD GetLink(nsAString & aLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLink(aLink); } \ + NS_IMETHOD SetLink(const nsAString & aLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLink(aLink); } \ + NS_IMETHOD GetText(nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetText(aText); } \ + NS_IMETHOD SetText(const nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetText(aText); } \ + NS_IMETHOD GetVLink(nsAString & aVLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVLink(aVLink); } \ + NS_IMETHOD SetVLink(const nsAString & aVLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVLink(aVLink); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLBodyElement : public nsIDOMHTMLBodyElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLBODYELEMENT + + nsDOMHTMLBodyElement(); + +private: + ~nsDOMHTMLBodyElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLBodyElement, nsIDOMHTMLBodyElement) + +nsDOMHTMLBodyElement::nsDOMHTMLBodyElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLBodyElement::~nsDOMHTMLBodyElement() +{ + /* destructor code */ +} + +/* attribute DOMString aLink; */ +NS_IMETHODIMP nsDOMHTMLBodyElement::GetALink(nsAString & aALink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBodyElement::SetALink(const nsAString & aALink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString background; */ +NS_IMETHODIMP nsDOMHTMLBodyElement::GetBackground(nsAString & aBackground) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBodyElement::SetBackground(const nsAString & aBackground) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString bgColor; */ +NS_IMETHODIMP nsDOMHTMLBodyElement::GetBgColor(nsAString & aBgColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBodyElement::SetBgColor(const nsAString & aBgColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString link; */ +NS_IMETHODIMP nsDOMHTMLBodyElement::GetLink(nsAString & aLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBodyElement::SetLink(const nsAString & aLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString text; */ +NS_IMETHODIMP nsDOMHTMLBodyElement::GetText(nsAString & aText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBodyElement::SetText(const nsAString & aText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString vLink; */ +NS_IMETHODIMP nsDOMHTMLBodyElement::GetVLink(nsAString & aVLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLBodyElement::SetVLink(const nsAString & aVLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLBodyElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLButtonElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLButtonElement.h new file mode 100644 index 00000000..97cf7a01 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLButtonElement.h @@ -0,0 +1,210 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLButtonElement.idl + */ + +#ifndef __gen_nsIDOMHTMLButtonElement_h__ +#define __gen_nsIDOMHTMLButtonElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLButtonElement */ +#define NS_IDOMHTMLBUTTONELEMENT_IID_STR "a6cf9095-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLBUTTONELEMENT_IID \ + {0xa6cf9095, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLButtonElement interface is the interface to a [X]HTML + * button element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLButtonElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLBUTTONELEMENT_IID) + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* attribute DOMString accessKey; */ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) = 0; + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) = 0; + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute long tabIndex; */ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) = 0; + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) = 0; + + /* [noscript] readonly attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + + /* attribute DOMString value; */ + NS_IMETHOD GetValue(nsAString & aValue) = 0; + NS_IMETHOD SetValue(const nsAString & aValue) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLBUTTONELEMENT \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey); \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey); \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex); \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD GetValue(nsAString & aValue); \ + NS_IMETHOD SetValue(const nsAString & aValue); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLBUTTONELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return _to GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return _to SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return _to GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLBUTTONELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLButtonElement : public nsIDOMHTMLButtonElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLBUTTONELEMENT + + nsDOMHTMLButtonElement(); + +private: + ~nsDOMHTMLButtonElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLButtonElement, nsIDOMHTMLButtonElement) + +nsDOMHTMLButtonElement::nsDOMHTMLButtonElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLButtonElement::~nsDOMHTMLButtonElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLButtonElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString accessKey; */ +NS_IMETHODIMP nsDOMHTMLButtonElement::GetAccessKey(nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLButtonElement::SetAccessKey(const nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMHTMLButtonElement::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLButtonElement::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLButtonElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLButtonElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long tabIndex; */ +NS_IMETHODIMP nsDOMHTMLButtonElement::GetTabIndex(PRInt32 *aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLButtonElement::SetTabIndex(PRInt32 aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] readonly attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLButtonElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString value; */ +NS_IMETHODIMP nsDOMHTMLButtonElement::GetValue(nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLButtonElement::SetValue(const nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLButtonElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLCollection.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLCollection.h new file mode 100644 index 00000000..d4f45c1f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLCollection.h @@ -0,0 +1,122 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLCollection.idl + */ + +#ifndef __gen_nsIDOMHTMLCollection_h__ +#define __gen_nsIDOMHTMLCollection_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLCollection */ +#define NS_IDOMHTMLCOLLECTION_IID_STR "a6cf9083-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLCOLLECTION_IID \ + {0xa6cf9083, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMHTMLCollection : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLCOLLECTION_IID) + + /** + * The nsIDOMHTMLCollection interface is an interface to a collection + * of [X]HTML elements. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* nsIDOMNode item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode namedItem (in DOMString name); */ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLCOLLECTION \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval); \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLCOLLECTION(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return _to Item(index, _retval); } \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) { return _to NamedItem(name, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLCOLLECTION(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NamedItem(name, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLCollection : public nsIDOMHTMLCollection +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLCOLLECTION + + nsDOMHTMLCollection(); + +private: + ~nsDOMHTMLCollection(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLCollection, nsIDOMHTMLCollection) + +nsDOMHTMLCollection::nsDOMHTMLCollection() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLCollection::~nsDOMHTMLCollection() +{ + /* destructor code */ +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMHTMLCollection::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode item (in unsigned long index); */ +NS_IMETHODIMP nsDOMHTMLCollection::Item(PRUint32 index, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode namedItem (in DOMString name); */ +NS_IMETHODIMP nsDOMHTMLCollection::NamedItem(const nsAString & name, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLCollection_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDListElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDListElement.h new file mode 100644 index 00000000..2e674f13 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDListElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLDListElement.idl + */ + +#ifndef __gen_nsIDOMHTMLDListElement_h__ +#define __gen_nsIDOMHTMLDListElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLDListElement */ +#define NS_IDOMHTMLDLISTELEMENT_IID_STR "a6cf909b-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLDLISTELEMENT_IID \ + {0xa6cf909b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLDListElement interface is the interface to a [X]HTML + * dl element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLDListElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLDLISTELEMENT_IID) + + /* attribute boolean compact; */ + NS_IMETHOD GetCompact(PRBool *aCompact) = 0; + NS_IMETHOD SetCompact(PRBool aCompact) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLDLISTELEMENT \ + NS_IMETHOD GetCompact(PRBool *aCompact); \ + NS_IMETHOD SetCompact(PRBool aCompact); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLDLISTELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return _to GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return _to SetCompact(aCompact); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLDLISTELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCompact(aCompact); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLDListElement : public nsIDOMHTMLDListElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLDLISTELEMENT + + nsDOMHTMLDListElement(); + +private: + ~nsDOMHTMLDListElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLDListElement, nsIDOMHTMLDListElement) + +nsDOMHTMLDListElement::nsDOMHTMLDListElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLDListElement::~nsDOMHTMLDListElement() +{ + /* destructor code */ +} + +/* attribute boolean compact; */ +NS_IMETHODIMP nsDOMHTMLDListElement::GetCompact(PRBool *aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLDListElement::SetCompact(PRBool aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLDListElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDirectoryElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDirectoryElement.h new file mode 100644 index 00000000..94eee42d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDirectoryElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLDirectoryElement.idl + */ + +#ifndef __gen_nsIDOMHTMLDirectoryElement_h__ +#define __gen_nsIDOMHTMLDirectoryElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLDirectoryElement */ +#define NS_IDOMHTMLDIRECTORYELEMENT_IID_STR "a6cf909c-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLDIRECTORYELEMENT_IID \ + {0xa6cf909c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLDirectoryElement interface is the interface to a + * [X]HTML dir element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLDirectoryElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLDIRECTORYELEMENT_IID) + + /* attribute boolean compact; */ + NS_IMETHOD GetCompact(PRBool *aCompact) = 0; + NS_IMETHOD SetCompact(PRBool aCompact) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLDIRECTORYELEMENT \ + NS_IMETHOD GetCompact(PRBool *aCompact); \ + NS_IMETHOD SetCompact(PRBool aCompact); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLDIRECTORYELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return _to GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return _to SetCompact(aCompact); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLDIRECTORYELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCompact(aCompact); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLDirectoryElement : public nsIDOMHTMLDirectoryElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLDIRECTORYELEMENT + + nsDOMHTMLDirectoryElement(); + +private: + ~nsDOMHTMLDirectoryElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLDirectoryElement, nsIDOMHTMLDirectoryElement) + +nsDOMHTMLDirectoryElement::nsDOMHTMLDirectoryElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLDirectoryElement::~nsDOMHTMLDirectoryElement() +{ + /* destructor code */ +} + +/* attribute boolean compact; */ +NS_IMETHODIMP nsDOMHTMLDirectoryElement::GetCompact(PRBool *aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLDirectoryElement::SetCompact(PRBool aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLDirectoryElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDivElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDivElement.h new file mode 100644 index 00000000..c5595a71 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDivElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLDivElement.idl + */ + +#ifndef __gen_nsIDOMHTMLDivElement_h__ +#define __gen_nsIDOMHTMLDivElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLDivElement */ +#define NS_IDOMHTMLDIVELEMENT_IID_STR "a6cf90a0-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLDIVELEMENT_IID \ + {0xa6cf90a0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLDivElement interface is the interface to a [X]HTML + * div element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLDivElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLDIVELEMENT_IID) + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLDIVELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLDIVELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLDIVELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLDivElement : public nsIDOMHTMLDivElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLDIVELEMENT + + nsDOMHTMLDivElement(); + +private: + ~nsDOMHTMLDivElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLDivElement, nsIDOMHTMLDivElement) + +nsDOMHTMLDivElement::nsDOMHTMLDivElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLDivElement::~nsDOMHTMLDivElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLDivElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLDivElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLDivElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDocument.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDocument.h new file mode 100644 index 00000000..b86b310c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLDocument.h @@ -0,0 +1,302 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLDocument.idl + */ + +#ifndef __gen_nsIDOMHTMLDocument_h__ +#define __gen_nsIDOMHTMLDocument_h__ + + +#ifndef __gen_nsIDOMDocument_h__ +#include "nsIDOMDocument.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLDocument */ +#define NS_IDOMHTMLDOCUMENT_IID_STR "a6cf9084-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLDOCUMENT_IID \ + {0xa6cf9084, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLDocument interface is the interface to a [X]HTML + * document object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLDocument : public nsIDOMDocument { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLDOCUMENT_IID) + + /* attribute DOMString title; */ + NS_IMETHOD GetTitle(nsAString & aTitle) = 0; + NS_IMETHOD SetTitle(const nsAString & aTitle) = 0; + + /* readonly attribute DOMString referrer; */ + NS_IMETHOD GetReferrer(nsAString & aReferrer) = 0; + + /* [noscript] readonly attribute DOMString domain; */ + NS_IMETHOD GetDomain(nsAString & aDomain) = 0; + + /* readonly attribute DOMString URL; */ + NS_IMETHOD GetURL(nsAString & aURL) = 0; + + /* attribute nsIDOMHTMLElement body; */ + NS_IMETHOD GetBody(nsIDOMHTMLElement * *aBody) = 0; + NS_IMETHOD SetBody(nsIDOMHTMLElement * aBody) = 0; + + /* readonly attribute nsIDOMHTMLCollection images; */ + NS_IMETHOD GetImages(nsIDOMHTMLCollection * *aImages) = 0; + + /* readonly attribute nsIDOMHTMLCollection applets; */ + NS_IMETHOD GetApplets(nsIDOMHTMLCollection * *aApplets) = 0; + + /* readonly attribute nsIDOMHTMLCollection links; */ + NS_IMETHOD GetLinks(nsIDOMHTMLCollection * *aLinks) = 0; + + /* readonly attribute nsIDOMHTMLCollection forms; */ + NS_IMETHOD GetForms(nsIDOMHTMLCollection * *aForms) = 0; + + /* readonly attribute nsIDOMHTMLCollection anchors; */ + NS_IMETHOD GetAnchors(nsIDOMHTMLCollection * *aAnchors) = 0; + + /* attribute DOMString cookie; */ + NS_IMETHOD GetCookie(nsAString & aCookie) = 0; + NS_IMETHOD SetCookie(const nsAString & aCookie) = 0; + + /* [noscript] void open (); */ + NS_IMETHOD Open(void) = 0; + + /* void close (); */ + NS_IMETHOD Close(void) = 0; + + /* [noscript] void write (in DOMString text); */ + NS_IMETHOD Write(const nsAString & text) = 0; + + /* [noscript] void writeln (in DOMString text); */ + NS_IMETHOD Writeln(const nsAString & text) = 0; + + /* nsIDOMNodeList getElementsByName (in DOMString elementName); */ + NS_IMETHOD GetElementsByName(const nsAString & elementName, nsIDOMNodeList **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLDOCUMENT \ + NS_IMETHOD GetTitle(nsAString & aTitle); \ + NS_IMETHOD SetTitle(const nsAString & aTitle); \ + NS_IMETHOD GetReferrer(nsAString & aReferrer); \ + NS_IMETHOD GetDomain(nsAString & aDomain); \ + NS_IMETHOD GetURL(nsAString & aURL); \ + NS_IMETHOD GetBody(nsIDOMHTMLElement * *aBody); \ + NS_IMETHOD SetBody(nsIDOMHTMLElement * aBody); \ + NS_IMETHOD GetImages(nsIDOMHTMLCollection * *aImages); \ + NS_IMETHOD GetApplets(nsIDOMHTMLCollection * *aApplets); \ + NS_IMETHOD GetLinks(nsIDOMHTMLCollection * *aLinks); \ + NS_IMETHOD GetForms(nsIDOMHTMLCollection * *aForms); \ + NS_IMETHOD GetAnchors(nsIDOMHTMLCollection * *aAnchors); \ + NS_IMETHOD GetCookie(nsAString & aCookie); \ + NS_IMETHOD SetCookie(const nsAString & aCookie); \ + NS_IMETHOD Open(void); \ + NS_IMETHOD Close(void); \ + NS_IMETHOD Write(const nsAString & text); \ + NS_IMETHOD Writeln(const nsAString & text); \ + NS_IMETHOD GetElementsByName(const nsAString & elementName, nsIDOMNodeList **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLDOCUMENT(_to) \ + NS_IMETHOD GetTitle(nsAString & aTitle) { return _to GetTitle(aTitle); } \ + NS_IMETHOD SetTitle(const nsAString & aTitle) { return _to SetTitle(aTitle); } \ + NS_IMETHOD GetReferrer(nsAString & aReferrer) { return _to GetReferrer(aReferrer); } \ + NS_IMETHOD GetDomain(nsAString & aDomain) { return _to GetDomain(aDomain); } \ + NS_IMETHOD GetURL(nsAString & aURL) { return _to GetURL(aURL); } \ + NS_IMETHOD GetBody(nsIDOMHTMLElement * *aBody) { return _to GetBody(aBody); } \ + NS_IMETHOD SetBody(nsIDOMHTMLElement * aBody) { return _to SetBody(aBody); } \ + NS_IMETHOD GetImages(nsIDOMHTMLCollection * *aImages) { return _to GetImages(aImages); } \ + NS_IMETHOD GetApplets(nsIDOMHTMLCollection * *aApplets) { return _to GetApplets(aApplets); } \ + NS_IMETHOD GetLinks(nsIDOMHTMLCollection * *aLinks) { return _to GetLinks(aLinks); } \ + NS_IMETHOD GetForms(nsIDOMHTMLCollection * *aForms) { return _to GetForms(aForms); } \ + NS_IMETHOD GetAnchors(nsIDOMHTMLCollection * *aAnchors) { return _to GetAnchors(aAnchors); } \ + NS_IMETHOD GetCookie(nsAString & aCookie) { return _to GetCookie(aCookie); } \ + NS_IMETHOD SetCookie(const nsAString & aCookie) { return _to SetCookie(aCookie); } \ + NS_IMETHOD Open(void) { return _to Open(); } \ + NS_IMETHOD Close(void) { return _to Close(); } \ + NS_IMETHOD Write(const nsAString & text) { return _to Write(text); } \ + NS_IMETHOD Writeln(const nsAString & text) { return _to Writeln(text); } \ + NS_IMETHOD GetElementsByName(const nsAString & elementName, nsIDOMNodeList **_retval) { return _to GetElementsByName(elementName, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLDOCUMENT(_to) \ + NS_IMETHOD GetTitle(nsAString & aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \ + NS_IMETHOD SetTitle(const nsAString & aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTitle(aTitle); } \ + NS_IMETHOD GetReferrer(nsAString & aReferrer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReferrer(aReferrer); } \ + NS_IMETHOD GetDomain(nsAString & aDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDomain(aDomain); } \ + NS_IMETHOD GetURL(nsAString & aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURL(aURL); } \ + NS_IMETHOD GetBody(nsIDOMHTMLElement * *aBody) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBody(aBody); } \ + NS_IMETHOD SetBody(nsIDOMHTMLElement * aBody) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBody(aBody); } \ + NS_IMETHOD GetImages(nsIDOMHTMLCollection * *aImages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImages(aImages); } \ + NS_IMETHOD GetApplets(nsIDOMHTMLCollection * *aApplets) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApplets(aApplets); } \ + NS_IMETHOD GetLinks(nsIDOMHTMLCollection * *aLinks) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLinks(aLinks); } \ + NS_IMETHOD GetForms(nsIDOMHTMLCollection * *aForms) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForms(aForms); } \ + NS_IMETHOD GetAnchors(nsIDOMHTMLCollection * *aAnchors) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnchors(aAnchors); } \ + NS_IMETHOD GetCookie(nsAString & aCookie) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookie(aCookie); } \ + NS_IMETHOD SetCookie(const nsAString & aCookie) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCookie(aCookie); } \ + NS_IMETHOD Open(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(); } \ + NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \ + NS_IMETHOD Write(const nsAString & text) { return !_to ? NS_ERROR_NULL_POINTER : _to->Write(text); } \ + NS_IMETHOD Writeln(const nsAString & text) { return !_to ? NS_ERROR_NULL_POINTER : _to->Writeln(text); } \ + NS_IMETHOD GetElementsByName(const nsAString & elementName, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByName(elementName, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLDocument : public nsIDOMHTMLDocument +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLDOCUMENT + + nsDOMHTMLDocument(); + +private: + ~nsDOMHTMLDocument(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLDocument, nsIDOMHTMLDocument) + +nsDOMHTMLDocument::nsDOMHTMLDocument() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLDocument::~nsDOMHTMLDocument() +{ + /* destructor code */ +} + +/* attribute DOMString title; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetTitle(nsAString & aTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLDocument::SetTitle(const nsAString & aTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString referrer; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetReferrer(nsAString & aReferrer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] readonly attribute DOMString domain; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetDomain(nsAString & aDomain) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString URL; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetURL(nsAString & aURL) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIDOMHTMLElement body; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetBody(nsIDOMHTMLElement * *aBody) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLDocument::SetBody(nsIDOMHTMLElement * aBody) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection images; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetImages(nsIDOMHTMLCollection * *aImages) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection applets; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetApplets(nsIDOMHTMLCollection * *aApplets) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection links; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetLinks(nsIDOMHTMLCollection * *aLinks) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection forms; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetForms(nsIDOMHTMLCollection * *aForms) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection anchors; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetAnchors(nsIDOMHTMLCollection * *aAnchors) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString cookie; */ +NS_IMETHODIMP nsDOMHTMLDocument::GetCookie(nsAString & aCookie) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLDocument::SetCookie(const nsAString & aCookie) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void open (); */ +NS_IMETHODIMP nsDOMHTMLDocument::Open() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void close (); */ +NS_IMETHODIMP nsDOMHTMLDocument::Close() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void write (in DOMString text); */ +NS_IMETHODIMP nsDOMHTMLDocument::Write(const nsAString & text) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void writeln (in DOMString text); */ +NS_IMETHODIMP nsDOMHTMLDocument::Writeln(const nsAString & text) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNodeList getElementsByName (in DOMString elementName); */ +NS_IMETHODIMP nsDOMHTMLDocument::GetElementsByName(const nsAString & elementName, nsIDOMNodeList **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLDocument_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLElement.h new file mode 100644 index 00000000..8fa6c1a9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLElement.h @@ -0,0 +1,187 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLElement.idl + */ + +#ifndef __gen_nsIDOMHTMLElement_h__ +#define __gen_nsIDOMHTMLElement_h__ + + +#ifndef __gen_nsIDOMElement_h__ +#include "nsIDOMElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLElement */ +#define NS_IDOMHTMLELEMENT_IID_STR "a6cf9085-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLELEMENT_IID \ + {0xa6cf9085, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMHTMLElement : public nsIDOMElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLELEMENT_IID) + + /** + * The nsIDOMHTMLElement interface is the primary [X]HTML element + * interface. It represents a single [X]HTML element in the document + * tree. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + /* attribute DOMString id; */ + NS_IMETHOD GetId(nsAString & aId) = 0; + NS_IMETHOD SetId(const nsAString & aId) = 0; + + /* attribute DOMString title; */ + NS_IMETHOD GetTitle(nsAString & aTitle) = 0; + NS_IMETHOD SetTitle(const nsAString & aTitle) = 0; + + /* attribute DOMString lang; */ + NS_IMETHOD GetLang(nsAString & aLang) = 0; + NS_IMETHOD SetLang(const nsAString & aLang) = 0; + + /* attribute DOMString dir; */ + NS_IMETHOD GetDir(nsAString & aDir) = 0; + NS_IMETHOD SetDir(const nsAString & aDir) = 0; + + /* attribute DOMString className; */ + NS_IMETHOD GetClassName(nsAString & aClassName) = 0; + NS_IMETHOD SetClassName(const nsAString & aClassName) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLELEMENT \ + NS_IMETHOD GetId(nsAString & aId); \ + NS_IMETHOD SetId(const nsAString & aId); \ + NS_IMETHOD GetTitle(nsAString & aTitle); \ + NS_IMETHOD SetTitle(const nsAString & aTitle); \ + NS_IMETHOD GetLang(nsAString & aLang); \ + NS_IMETHOD SetLang(const nsAString & aLang); \ + NS_IMETHOD GetDir(nsAString & aDir); \ + NS_IMETHOD SetDir(const nsAString & aDir); \ + NS_IMETHOD GetClassName(nsAString & aClassName); \ + NS_IMETHOD SetClassName(const nsAString & aClassName); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLELEMENT(_to) \ + NS_IMETHOD GetId(nsAString & aId) { return _to GetId(aId); } \ + NS_IMETHOD SetId(const nsAString & aId) { return _to SetId(aId); } \ + NS_IMETHOD GetTitle(nsAString & aTitle) { return _to GetTitle(aTitle); } \ + NS_IMETHOD SetTitle(const nsAString & aTitle) { return _to SetTitle(aTitle); } \ + NS_IMETHOD GetLang(nsAString & aLang) { return _to GetLang(aLang); } \ + NS_IMETHOD SetLang(const nsAString & aLang) { return _to SetLang(aLang); } \ + NS_IMETHOD GetDir(nsAString & aDir) { return _to GetDir(aDir); } \ + NS_IMETHOD SetDir(const nsAString & aDir) { return _to SetDir(aDir); } \ + NS_IMETHOD GetClassName(nsAString & aClassName) { return _to GetClassName(aClassName); } \ + NS_IMETHOD SetClassName(const nsAString & aClassName) { return _to SetClassName(aClassName); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLELEMENT(_to) \ + NS_IMETHOD GetId(nsAString & aId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetId(aId); } \ + NS_IMETHOD SetId(const nsAString & aId) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetId(aId); } \ + NS_IMETHOD GetTitle(nsAString & aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \ + NS_IMETHOD SetTitle(const nsAString & aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTitle(aTitle); } \ + NS_IMETHOD GetLang(nsAString & aLang) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLang(aLang); } \ + NS_IMETHOD SetLang(const nsAString & aLang) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLang(aLang); } \ + NS_IMETHOD GetDir(nsAString & aDir) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDir(aDir); } \ + NS_IMETHOD SetDir(const nsAString & aDir) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDir(aDir); } \ + NS_IMETHOD GetClassName(nsAString & aClassName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassName(aClassName); } \ + NS_IMETHOD SetClassName(const nsAString & aClassName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetClassName(aClassName); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLElement : public nsIDOMHTMLElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLELEMENT + + nsDOMHTMLElement(); + +private: + ~nsDOMHTMLElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLElement, nsIDOMHTMLElement) + +nsDOMHTMLElement::nsDOMHTMLElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLElement::~nsDOMHTMLElement() +{ + /* destructor code */ +} + +/* attribute DOMString id; */ +NS_IMETHODIMP nsDOMHTMLElement::GetId(nsAString & aId) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLElement::SetId(const nsAString & aId) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString title; */ +NS_IMETHODIMP nsDOMHTMLElement::GetTitle(nsAString & aTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLElement::SetTitle(const nsAString & aTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString lang; */ +NS_IMETHODIMP nsDOMHTMLElement::GetLang(nsAString & aLang) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLElement::SetLang(const nsAString & aLang) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString dir; */ +NS_IMETHODIMP nsDOMHTMLElement::GetDir(nsAString & aDir) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLElement::SetDir(const nsAString & aDir) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString className; */ +NS_IMETHODIMP nsDOMHTMLElement::GetClassName(nsAString & aClassName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLElement::SetClassName(const nsAString & aClassName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLEmbedElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLEmbedElement.h new file mode 100644 index 00000000..e6160c35 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLEmbedElement.h @@ -0,0 +1,206 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLEmbedElement.idl + */ + +#ifndef __gen_nsIDOMHTMLEmbedElement_h__ +#define __gen_nsIDOMHTMLEmbedElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLEmbedElement */ +#define NS_IDOMHTMLEMBEDELEMENT_IID_STR "123f90ab-15b3-11d2-456e-00805f8add32" + +#define NS_IDOMHTMLEMBEDELEMENT_IID \ + {0x123f90ab, 0x15b3, 0x11d2, \ + { 0x45, 0x6e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLEmbedElement interface is the interface to a [X]HTML + * embed element. + * + * Note that this is not a W3C standard interface, it is Mozilla + * proprietary. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLEmbedElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLEMBEDELEMENT_IID) + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString height; */ + NS_IMETHOD GetHeight(nsAString & aHeight) = 0; + NS_IMETHOD SetHeight(const nsAString & aHeight) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString src; */ + NS_IMETHOD GetSrc(nsAString & aSrc) = 0; + NS_IMETHOD SetSrc(const nsAString & aSrc) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + + /* attribute DOMString width; */ + NS_IMETHOD GetWidth(nsAString & aWidth) = 0; + NS_IMETHOD SetWidth(const nsAString & aWidth) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLEMBEDELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetHeight(nsAString & aHeight); \ + NS_IMETHOD SetHeight(const nsAString & aHeight); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetSrc(nsAString & aSrc); \ + NS_IMETHOD SetSrc(const nsAString & aSrc); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); \ + NS_IMETHOD GetWidth(nsAString & aWidth); \ + NS_IMETHOD SetWidth(const nsAString & aWidth); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLEMBEDELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return _to GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return _to SetHeight(aHeight); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return _to GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return _to SetSrc(aSrc); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return _to SetWidth(aWidth); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLEMBEDELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHeight(aHeight); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSrc(aSrc); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLEmbedElement : public nsIDOMHTMLEmbedElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLEMBEDELEMENT + + nsDOMHTMLEmbedElement(); + +private: + ~nsDOMHTMLEmbedElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLEmbedElement, nsIDOMHTMLEmbedElement) + +nsDOMHTMLEmbedElement::nsDOMHTMLEmbedElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLEmbedElement::~nsDOMHTMLEmbedElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLEmbedElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLEmbedElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString height; */ +NS_IMETHODIMP nsDOMHTMLEmbedElement::GetHeight(nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLEmbedElement::SetHeight(const nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLEmbedElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLEmbedElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString src; */ +NS_IMETHODIMP nsDOMHTMLEmbedElement::GetSrc(nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLEmbedElement::SetSrc(const nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLEmbedElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLEmbedElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString width; */ +NS_IMETHODIMP nsDOMHTMLEmbedElement::GetWidth(nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLEmbedElement::SetWidth(const nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLEmbedElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFieldSetElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFieldSetElement.h new file mode 100644 index 00000000..841dafb7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFieldSetElement.h @@ -0,0 +1,98 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLFieldSetElement.idl + */ + +#ifndef __gen_nsIDOMHTMLFieldSetElement_h__ +#define __gen_nsIDOMHTMLFieldSetElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLFieldSetElement */ +#define NS_IDOMHTMLFIELDSETELEMENT_IID_STR "a6cf9097-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLFIELDSETELEMENT_IID \ + {0xa6cf9097, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLFieldSetElement interface is the interface to a + * [X]HTML fieldset element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLFieldSetElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLFIELDSETELEMENT_IID) + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLFIELDSETELEMENT \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLFIELDSETELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLFIELDSETELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLFieldSetElement : public nsIDOMHTMLFieldSetElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLFIELDSETELEMENT + + nsDOMHTMLFieldSetElement(); + +private: + ~nsDOMHTMLFieldSetElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLFieldSetElement, nsIDOMHTMLFieldSetElement) + +nsDOMHTMLFieldSetElement::nsDOMHTMLFieldSetElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLFieldSetElement::~nsDOMHTMLFieldSetElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLFieldSetElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLFieldSetElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFontElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFontElement.h new file mode 100644 index 00000000..b5c1ba34 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFontElement.h @@ -0,0 +1,146 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLFontElement.idl + */ + +#ifndef __gen_nsIDOMHTMLFontElement_h__ +#define __gen_nsIDOMHTMLFontElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLFontElement */ +#define NS_IDOMHTMLFONTELEMENT_IID_STR "a6cf90a7-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLFONTELEMENT_IID \ + {0xa6cf90a7, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLFontElement interface is the interface to a [X]HTML + * font element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLFontElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLFONTELEMENT_IID) + + /* attribute DOMString color; */ + NS_IMETHOD GetColor(nsAString & aColor) = 0; + NS_IMETHOD SetColor(const nsAString & aColor) = 0; + + /* attribute DOMString face; */ + NS_IMETHOD GetFace(nsAString & aFace) = 0; + NS_IMETHOD SetFace(const nsAString & aFace) = 0; + + /* attribute DOMString size; */ + NS_IMETHOD GetSize(nsAString & aSize) = 0; + NS_IMETHOD SetSize(const nsAString & aSize) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLFONTELEMENT \ + NS_IMETHOD GetColor(nsAString & aColor); \ + NS_IMETHOD SetColor(const nsAString & aColor); \ + NS_IMETHOD GetFace(nsAString & aFace); \ + NS_IMETHOD SetFace(const nsAString & aFace); \ + NS_IMETHOD GetSize(nsAString & aSize); \ + NS_IMETHOD SetSize(const nsAString & aSize); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLFONTELEMENT(_to) \ + NS_IMETHOD GetColor(nsAString & aColor) { return _to GetColor(aColor); } \ + NS_IMETHOD SetColor(const nsAString & aColor) { return _to SetColor(aColor); } \ + NS_IMETHOD GetFace(nsAString & aFace) { return _to GetFace(aFace); } \ + NS_IMETHOD SetFace(const nsAString & aFace) { return _to SetFace(aFace); } \ + NS_IMETHOD GetSize(nsAString & aSize) { return _to GetSize(aSize); } \ + NS_IMETHOD SetSize(const nsAString & aSize) { return _to SetSize(aSize); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLFONTELEMENT(_to) \ + NS_IMETHOD GetColor(nsAString & aColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetColor(aColor); } \ + NS_IMETHOD SetColor(const nsAString & aColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetColor(aColor); } \ + NS_IMETHOD GetFace(nsAString & aFace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFace(aFace); } \ + NS_IMETHOD SetFace(const nsAString & aFace) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFace(aFace); } \ + NS_IMETHOD GetSize(nsAString & aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \ + NS_IMETHOD SetSize(const nsAString & aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSize(aSize); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLFontElement : public nsIDOMHTMLFontElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLFONTELEMENT + + nsDOMHTMLFontElement(); + +private: + ~nsDOMHTMLFontElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLFontElement, nsIDOMHTMLFontElement) + +nsDOMHTMLFontElement::nsDOMHTMLFontElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLFontElement::~nsDOMHTMLFontElement() +{ + /* destructor code */ +} + +/* attribute DOMString color; */ +NS_IMETHODIMP nsDOMHTMLFontElement::GetColor(nsAString & aColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFontElement::SetColor(const nsAString & aColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString face; */ +NS_IMETHODIMP nsDOMHTMLFontElement::GetFace(nsAString & aFace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFontElement::SetFace(const nsAString & aFace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString size; */ +NS_IMETHODIMP nsDOMHTMLFontElement::GetSize(nsAString & aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFontElement::SetSize(const nsAString & aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLFontElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFormElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFormElement.h new file mode 100644 index 00000000..6c5cbdd0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFormElement.h @@ -0,0 +1,254 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLFormElement.idl + */ + +#ifndef __gen_nsIDOMHTMLFormElement_h__ +#define __gen_nsIDOMHTMLFormElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLFormElement */ +#define NS_IDOMHTMLFORMELEMENT_IID_STR "a6cf908f-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLFORMELEMENT_IID \ + {0xa6cf908f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMHTMLFormElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLFORMELEMENT_IID) + + /** + * The nsIDOMHTMLFormElement interface is the interface to a [X]HTML + * form element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + /* readonly attribute nsIDOMHTMLCollection elements; */ + NS_IMETHOD GetElements(nsIDOMHTMLCollection * *aElements) = 0; + + /* readonly attribute long length; */ + NS_IMETHOD GetLength(PRInt32 *aLength) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString acceptCharset; */ + NS_IMETHOD GetAcceptCharset(nsAString & aAcceptCharset) = 0; + NS_IMETHOD SetAcceptCharset(const nsAString & aAcceptCharset) = 0; + + /* attribute DOMString action; */ + NS_IMETHOD GetAction(nsAString & aAction) = 0; + NS_IMETHOD SetAction(const nsAString & aAction) = 0; + + /* attribute DOMString enctype; */ + NS_IMETHOD GetEnctype(nsAString & aEnctype) = 0; + NS_IMETHOD SetEnctype(const nsAString & aEnctype) = 0; + + /* attribute DOMString method; */ + NS_IMETHOD GetMethod(nsAString & aMethod) = 0; + NS_IMETHOD SetMethod(const nsAString & aMethod) = 0; + + /* attribute DOMString target; */ + NS_IMETHOD GetTarget(nsAString & aTarget) = 0; + NS_IMETHOD SetTarget(const nsAString & aTarget) = 0; + + /* void submit (); */ + NS_IMETHOD Submit(void) = 0; + + /* void reset (); */ + NS_IMETHOD Reset(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLFORMELEMENT \ + NS_IMETHOD GetElements(nsIDOMHTMLCollection * *aElements); \ + NS_IMETHOD GetLength(PRInt32 *aLength); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetAcceptCharset(nsAString & aAcceptCharset); \ + NS_IMETHOD SetAcceptCharset(const nsAString & aAcceptCharset); \ + NS_IMETHOD GetAction(nsAString & aAction); \ + NS_IMETHOD SetAction(const nsAString & aAction); \ + NS_IMETHOD GetEnctype(nsAString & aEnctype); \ + NS_IMETHOD SetEnctype(const nsAString & aEnctype); \ + NS_IMETHOD GetMethod(nsAString & aMethod); \ + NS_IMETHOD SetMethod(const nsAString & aMethod); \ + NS_IMETHOD GetTarget(nsAString & aTarget); \ + NS_IMETHOD SetTarget(const nsAString & aTarget); \ + NS_IMETHOD Submit(void); \ + NS_IMETHOD Reset(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLFORMELEMENT(_to) \ + NS_IMETHOD GetElements(nsIDOMHTMLCollection * *aElements) { return _to GetElements(aElements); } \ + NS_IMETHOD GetLength(PRInt32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetAcceptCharset(nsAString & aAcceptCharset) { return _to GetAcceptCharset(aAcceptCharset); } \ + NS_IMETHOD SetAcceptCharset(const nsAString & aAcceptCharset) { return _to SetAcceptCharset(aAcceptCharset); } \ + NS_IMETHOD GetAction(nsAString & aAction) { return _to GetAction(aAction); } \ + NS_IMETHOD SetAction(const nsAString & aAction) { return _to SetAction(aAction); } \ + NS_IMETHOD GetEnctype(nsAString & aEnctype) { return _to GetEnctype(aEnctype); } \ + NS_IMETHOD SetEnctype(const nsAString & aEnctype) { return _to SetEnctype(aEnctype); } \ + NS_IMETHOD GetMethod(nsAString & aMethod) { return _to GetMethod(aMethod); } \ + NS_IMETHOD SetMethod(const nsAString & aMethod) { return _to SetMethod(aMethod); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return _to GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return _to SetTarget(aTarget); } \ + NS_IMETHOD Submit(void) { return _to Submit(); } \ + NS_IMETHOD Reset(void) { return _to Reset(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLFORMELEMENT(_to) \ + NS_IMETHOD GetElements(nsIDOMHTMLCollection * *aElements) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElements(aElements); } \ + NS_IMETHOD GetLength(PRInt32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetAcceptCharset(nsAString & aAcceptCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAcceptCharset(aAcceptCharset); } \ + NS_IMETHOD SetAcceptCharset(const nsAString & aAcceptCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAcceptCharset(aAcceptCharset); } \ + NS_IMETHOD GetAction(nsAString & aAction) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAction(aAction); } \ + NS_IMETHOD SetAction(const nsAString & aAction) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAction(aAction); } \ + NS_IMETHOD GetEnctype(nsAString & aEnctype) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnctype(aEnctype); } \ + NS_IMETHOD SetEnctype(const nsAString & aEnctype) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEnctype(aEnctype); } \ + NS_IMETHOD GetMethod(nsAString & aMethod) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMethod(aMethod); } \ + NS_IMETHOD SetMethod(const nsAString & aMethod) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMethod(aMethod); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTarget(aTarget); } \ + NS_IMETHOD Submit(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Submit(); } \ + NS_IMETHOD Reset(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Reset(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLFormElement : public nsIDOMHTMLFormElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLFORMELEMENT + + nsDOMHTMLFormElement(); + +private: + ~nsDOMHTMLFormElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLFormElement, nsIDOMHTMLFormElement) + +nsDOMHTMLFormElement::nsDOMHTMLFormElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLFormElement::~nsDOMHTMLFormElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLCollection elements; */ +NS_IMETHODIMP nsDOMHTMLFormElement::GetElements(nsIDOMHTMLCollection * *aElements) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long length; */ +NS_IMETHODIMP nsDOMHTMLFormElement::GetLength(PRInt32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLFormElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFormElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString acceptCharset; */ +NS_IMETHODIMP nsDOMHTMLFormElement::GetAcceptCharset(nsAString & aAcceptCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFormElement::SetAcceptCharset(const nsAString & aAcceptCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString action; */ +NS_IMETHODIMP nsDOMHTMLFormElement::GetAction(nsAString & aAction) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFormElement::SetAction(const nsAString & aAction) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString enctype; */ +NS_IMETHODIMP nsDOMHTMLFormElement::GetEnctype(nsAString & aEnctype) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFormElement::SetEnctype(const nsAString & aEnctype) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString method; */ +NS_IMETHODIMP nsDOMHTMLFormElement::GetMethod(nsAString & aMethod) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFormElement::SetMethod(const nsAString & aMethod) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString target; */ +NS_IMETHODIMP nsDOMHTMLFormElement::GetTarget(nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFormElement::SetTarget(const nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void submit (); */ +NS_IMETHODIMP nsDOMHTMLFormElement::Submit() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void reset (); */ +NS_IMETHODIMP nsDOMHTMLFormElement::Reset() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLFormElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFrameElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFrameElement.h new file mode 100644 index 00000000..49178c63 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFrameElement.h @@ -0,0 +1,258 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLFrameElement.idl + */ + +#ifndef __gen_nsIDOMHTMLFrameElement_h__ +#define __gen_nsIDOMHTMLFrameElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLFrameElement */ +#define NS_IDOMHTMLFRAMEELEMENT_IID_STR "a6cf90b9-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLFRAMEELEMENT_IID \ + {0xa6cf90b9, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLFrameElement interface is the interface to a [X]HTML + * frame element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLFrameElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLFRAMEELEMENT_IID) + + /* attribute DOMString frameBorder; */ + NS_IMETHOD GetFrameBorder(nsAString & aFrameBorder) = 0; + NS_IMETHOD SetFrameBorder(const nsAString & aFrameBorder) = 0; + + /* attribute DOMString longDesc; */ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) = 0; + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) = 0; + + /* attribute DOMString marginHeight; */ + NS_IMETHOD GetMarginHeight(nsAString & aMarginHeight) = 0; + NS_IMETHOD SetMarginHeight(const nsAString & aMarginHeight) = 0; + + /* attribute DOMString marginWidth; */ + NS_IMETHOD GetMarginWidth(nsAString & aMarginWidth) = 0; + NS_IMETHOD SetMarginWidth(const nsAString & aMarginWidth) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute boolean noResize; */ + NS_IMETHOD GetNoResize(PRBool *aNoResize) = 0; + NS_IMETHOD SetNoResize(PRBool aNoResize) = 0; + + /* attribute DOMString scrolling; */ + NS_IMETHOD GetScrolling(nsAString & aScrolling) = 0; + NS_IMETHOD SetScrolling(const nsAString & aScrolling) = 0; + + /* attribute DOMString src; */ + NS_IMETHOD GetSrc(nsAString & aSrc) = 0; + NS_IMETHOD SetSrc(const nsAString & aSrc) = 0; + + /* readonly attribute nsIDOMDocument contentDocument; */ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLFRAMEELEMENT \ + NS_IMETHOD GetFrameBorder(nsAString & aFrameBorder); \ + NS_IMETHOD SetFrameBorder(const nsAString & aFrameBorder); \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc); \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc); \ + NS_IMETHOD GetMarginHeight(nsAString & aMarginHeight); \ + NS_IMETHOD SetMarginHeight(const nsAString & aMarginHeight); \ + NS_IMETHOD GetMarginWidth(nsAString & aMarginWidth); \ + NS_IMETHOD SetMarginWidth(const nsAString & aMarginWidth); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetNoResize(PRBool *aNoResize); \ + NS_IMETHOD SetNoResize(PRBool aNoResize); \ + NS_IMETHOD GetScrolling(nsAString & aScrolling); \ + NS_IMETHOD SetScrolling(const nsAString & aScrolling); \ + NS_IMETHOD GetSrc(nsAString & aSrc); \ + NS_IMETHOD SetSrc(const nsAString & aSrc); \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLFRAMEELEMENT(_to) \ + NS_IMETHOD GetFrameBorder(nsAString & aFrameBorder) { return _to GetFrameBorder(aFrameBorder); } \ + NS_IMETHOD SetFrameBorder(const nsAString & aFrameBorder) { return _to SetFrameBorder(aFrameBorder); } \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) { return _to GetLongDesc(aLongDesc); } \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) { return _to SetLongDesc(aLongDesc); } \ + NS_IMETHOD GetMarginHeight(nsAString & aMarginHeight) { return _to GetMarginHeight(aMarginHeight); } \ + NS_IMETHOD SetMarginHeight(const nsAString & aMarginHeight) { return _to SetMarginHeight(aMarginHeight); } \ + NS_IMETHOD GetMarginWidth(nsAString & aMarginWidth) { return _to GetMarginWidth(aMarginWidth); } \ + NS_IMETHOD SetMarginWidth(const nsAString & aMarginWidth) { return _to SetMarginWidth(aMarginWidth); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetNoResize(PRBool *aNoResize) { return _to GetNoResize(aNoResize); } \ + NS_IMETHOD SetNoResize(PRBool aNoResize) { return _to SetNoResize(aNoResize); } \ + NS_IMETHOD GetScrolling(nsAString & aScrolling) { return _to GetScrolling(aScrolling); } \ + NS_IMETHOD SetScrolling(const nsAString & aScrolling) { return _to SetScrolling(aScrolling); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return _to GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return _to SetSrc(aSrc); } \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) { return _to GetContentDocument(aContentDocument); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLFRAMEELEMENT(_to) \ + NS_IMETHOD GetFrameBorder(nsAString & aFrameBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrameBorder(aFrameBorder); } \ + NS_IMETHOD SetFrameBorder(const nsAString & aFrameBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFrameBorder(aFrameBorder); } \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLongDesc(aLongDesc); } \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLongDesc(aLongDesc); } \ + NS_IMETHOD GetMarginHeight(nsAString & aMarginHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMarginHeight(aMarginHeight); } \ + NS_IMETHOD SetMarginHeight(const nsAString & aMarginHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMarginHeight(aMarginHeight); } \ + NS_IMETHOD GetMarginWidth(nsAString & aMarginWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMarginWidth(aMarginWidth); } \ + NS_IMETHOD SetMarginWidth(const nsAString & aMarginWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMarginWidth(aMarginWidth); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetNoResize(PRBool *aNoResize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNoResize(aNoResize); } \ + NS_IMETHOD SetNoResize(PRBool aNoResize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNoResize(aNoResize); } \ + NS_IMETHOD GetScrolling(nsAString & aScrolling) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrolling(aScrolling); } \ + NS_IMETHOD SetScrolling(const nsAString & aScrolling) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScrolling(aScrolling); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSrc(aSrc); } \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentDocument(aContentDocument); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLFrameElement : public nsIDOMHTMLFrameElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLFRAMEELEMENT + + nsDOMHTMLFrameElement(); + +private: + ~nsDOMHTMLFrameElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLFrameElement, nsIDOMHTMLFrameElement) + +nsDOMHTMLFrameElement::nsDOMHTMLFrameElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLFrameElement::~nsDOMHTMLFrameElement() +{ + /* destructor code */ +} + +/* attribute DOMString frameBorder; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetFrameBorder(nsAString & aFrameBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameElement::SetFrameBorder(const nsAString & aFrameBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString longDesc; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetLongDesc(nsAString & aLongDesc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameElement::SetLongDesc(const nsAString & aLongDesc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString marginHeight; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetMarginHeight(nsAString & aMarginHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameElement::SetMarginHeight(const nsAString & aMarginHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString marginWidth; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetMarginWidth(nsAString & aMarginWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameElement::SetMarginWidth(const nsAString & aMarginWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean noResize; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetNoResize(PRBool *aNoResize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameElement::SetNoResize(PRBool aNoResize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString scrolling; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetScrolling(nsAString & aScrolling) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameElement::SetScrolling(const nsAString & aScrolling) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString src; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetSrc(nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameElement::SetSrc(const nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMDocument contentDocument; */ +NS_IMETHODIMP nsDOMHTMLFrameElement::GetContentDocument(nsIDOMDocument * *aContentDocument) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLFrameElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFrameSetElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFrameSetElement.h new file mode 100644 index 00000000..b4557d1a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLFrameSetElement.h @@ -0,0 +1,126 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLFrameSetElement.idl + */ + +#ifndef __gen_nsIDOMHTMLFrameSetElement_h__ +#define __gen_nsIDOMHTMLFrameSetElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLFrameSetElement */ +#define NS_IDOMHTMLFRAMESETELEMENT_IID_STR "a6cf90b8-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLFRAMESETELEMENT_IID \ + {0xa6cf90b8, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLFrameSetElement interface is the interface to a + * [X]HTML frameset element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLFrameSetElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLFRAMESETELEMENT_IID) + + /* attribute DOMString cols; */ + NS_IMETHOD GetCols(nsAString & aCols) = 0; + NS_IMETHOD SetCols(const nsAString & aCols) = 0; + + /* attribute DOMString rows; */ + NS_IMETHOD GetRows(nsAString & aRows) = 0; + NS_IMETHOD SetRows(const nsAString & aRows) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLFRAMESETELEMENT \ + NS_IMETHOD GetCols(nsAString & aCols); \ + NS_IMETHOD SetCols(const nsAString & aCols); \ + NS_IMETHOD GetRows(nsAString & aRows); \ + NS_IMETHOD SetRows(const nsAString & aRows); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLFRAMESETELEMENT(_to) \ + NS_IMETHOD GetCols(nsAString & aCols) { return _to GetCols(aCols); } \ + NS_IMETHOD SetCols(const nsAString & aCols) { return _to SetCols(aCols); } \ + NS_IMETHOD GetRows(nsAString & aRows) { return _to GetRows(aRows); } \ + NS_IMETHOD SetRows(const nsAString & aRows) { return _to SetRows(aRows); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLFRAMESETELEMENT(_to) \ + NS_IMETHOD GetCols(nsAString & aCols) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCols(aCols); } \ + NS_IMETHOD SetCols(const nsAString & aCols) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCols(aCols); } \ + NS_IMETHOD GetRows(nsAString & aRows) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRows(aRows); } \ + NS_IMETHOD SetRows(const nsAString & aRows) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRows(aRows); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLFrameSetElement : public nsIDOMHTMLFrameSetElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLFRAMESETELEMENT + + nsDOMHTMLFrameSetElement(); + +private: + ~nsDOMHTMLFrameSetElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLFrameSetElement, nsIDOMHTMLFrameSetElement) + +nsDOMHTMLFrameSetElement::nsDOMHTMLFrameSetElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLFrameSetElement::~nsDOMHTMLFrameSetElement() +{ + /* destructor code */ +} + +/* attribute DOMString cols; */ +NS_IMETHODIMP nsDOMHTMLFrameSetElement::GetCols(nsAString & aCols) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameSetElement::SetCols(const nsAString & aCols) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString rows; */ +NS_IMETHODIMP nsDOMHTMLFrameSetElement::GetRows(nsAString & aRows) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLFrameSetElement::SetRows(const nsAString & aRows) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLFrameSetElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHRElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHRElement.h new file mode 100644 index 00000000..318b0e9c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHRElement.h @@ -0,0 +1,166 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLHRElement.idl + */ + +#ifndef __gen_nsIDOMHTMLHRElement_h__ +#define __gen_nsIDOMHTMLHRElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLHRElement */ +#define NS_IDOMHTMLHRELEMENT_IID_STR "a6cf90a8-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLHRELEMENT_IID \ + {0xa6cf90a8, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLHRElement interface is the interface to a [X]HTML hr + * element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLHRElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLHRELEMENT_IID) + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute boolean noShade; */ + NS_IMETHOD GetNoShade(PRBool *aNoShade) = 0; + NS_IMETHOD SetNoShade(PRBool aNoShade) = 0; + + /* attribute DOMString size; */ + NS_IMETHOD GetSize(nsAString & aSize) = 0; + NS_IMETHOD SetSize(const nsAString & aSize) = 0; + + /* attribute DOMString width; */ + NS_IMETHOD GetWidth(nsAString & aWidth) = 0; + NS_IMETHOD SetWidth(const nsAString & aWidth) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLHRELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetNoShade(PRBool *aNoShade); \ + NS_IMETHOD SetNoShade(PRBool aNoShade); \ + NS_IMETHOD GetSize(nsAString & aSize); \ + NS_IMETHOD SetSize(const nsAString & aSize); \ + NS_IMETHOD GetWidth(nsAString & aWidth); \ + NS_IMETHOD SetWidth(const nsAString & aWidth); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLHRELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetNoShade(PRBool *aNoShade) { return _to GetNoShade(aNoShade); } \ + NS_IMETHOD SetNoShade(PRBool aNoShade) { return _to SetNoShade(aNoShade); } \ + NS_IMETHOD GetSize(nsAString & aSize) { return _to GetSize(aSize); } \ + NS_IMETHOD SetSize(const nsAString & aSize) { return _to SetSize(aSize); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return _to SetWidth(aWidth); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLHRELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetNoShade(PRBool *aNoShade) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNoShade(aNoShade); } \ + NS_IMETHOD SetNoShade(PRBool aNoShade) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNoShade(aNoShade); } \ + NS_IMETHOD GetSize(nsAString & aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \ + NS_IMETHOD SetSize(const nsAString & aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSize(aSize); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLHRElement : public nsIDOMHTMLHRElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLHRELEMENT + + nsDOMHTMLHRElement(); + +private: + ~nsDOMHTMLHRElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLHRElement, nsIDOMHTMLHRElement) + +nsDOMHTMLHRElement::nsDOMHTMLHRElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLHRElement::~nsDOMHTMLHRElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLHRElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLHRElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean noShade; */ +NS_IMETHODIMP nsDOMHTMLHRElement::GetNoShade(PRBool *aNoShade) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLHRElement::SetNoShade(PRBool aNoShade) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString size; */ +NS_IMETHODIMP nsDOMHTMLHRElement::GetSize(nsAString & aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLHRElement::SetSize(const nsAString & aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString width; */ +NS_IMETHODIMP nsDOMHTMLHRElement::GetWidth(nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLHRElement::SetWidth(const nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLHRElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHeadElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHeadElement.h new file mode 100644 index 00000000..d9379325 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHeadElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLHeadElement.idl + */ + +#ifndef __gen_nsIDOMHTMLHeadElement_h__ +#define __gen_nsIDOMHTMLHeadElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLHeadElement */ +#define NS_IDOMHTMLHEADELEMENT_IID_STR "a6cf9087-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLHEADELEMENT_IID \ + {0xa6cf9087, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLHeadElement interface is the interface to a [X]HTML + * head element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLHeadElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLHEADELEMENT_IID) + + /* attribute DOMString profile; */ + NS_IMETHOD GetProfile(nsAString & aProfile) = 0; + NS_IMETHOD SetProfile(const nsAString & aProfile) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLHEADELEMENT \ + NS_IMETHOD GetProfile(nsAString & aProfile); \ + NS_IMETHOD SetProfile(const nsAString & aProfile); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLHEADELEMENT(_to) \ + NS_IMETHOD GetProfile(nsAString & aProfile) { return _to GetProfile(aProfile); } \ + NS_IMETHOD SetProfile(const nsAString & aProfile) { return _to SetProfile(aProfile); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLHEADELEMENT(_to) \ + NS_IMETHOD GetProfile(nsAString & aProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfile(aProfile); } \ + NS_IMETHOD SetProfile(const nsAString & aProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProfile(aProfile); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLHeadElement : public nsIDOMHTMLHeadElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLHEADELEMENT + + nsDOMHTMLHeadElement(); + +private: + ~nsDOMHTMLHeadElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLHeadElement, nsIDOMHTMLHeadElement) + +nsDOMHTMLHeadElement::nsDOMHTMLHeadElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLHeadElement::~nsDOMHTMLHeadElement() +{ + /* destructor code */ +} + +/* attribute DOMString profile; */ +NS_IMETHODIMP nsDOMHTMLHeadElement::GetProfile(nsAString & aProfile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLHeadElement::SetProfile(const nsAString & aProfile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLHeadElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHeadingElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHeadingElement.h new file mode 100644 index 00000000..9bc98c54 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHeadingElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLHeadingElement.idl + */ + +#ifndef __gen_nsIDOMHTMLHeadingElement_h__ +#define __gen_nsIDOMHTMLHeadingElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLHeadingElement */ +#define NS_IDOMHTMLHEADINGELEMENT_IID_STR "a6cf90a2-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLHEADINGELEMENT_IID \ + {0xa6cf90a2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLHeadingElement interface is the interface to a + * [X]HTML h1, h2, h3, ... element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLHeadingElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLHEADINGELEMENT_IID) + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLHEADINGELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLHEADINGELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLHEADINGELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLHeadingElement : public nsIDOMHTMLHeadingElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLHEADINGELEMENT + + nsDOMHTMLHeadingElement(); + +private: + ~nsDOMHTMLHeadingElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLHeadingElement, nsIDOMHTMLHeadingElement) + +nsDOMHTMLHeadingElement::nsDOMHTMLHeadingElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLHeadingElement::~nsDOMHTMLHeadingElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLHeadingElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLHeadingElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLHeadingElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHtmlElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHtmlElement.h new file mode 100644 index 00000000..7f2428c7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLHtmlElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLHtmlElement.idl + */ + +#ifndef __gen_nsIDOMHTMLHtmlElement_h__ +#define __gen_nsIDOMHTMLHtmlElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLHtmlElement */ +#define NS_IDOMHTMLHTMLELEMENT_IID_STR "a6cf9086-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLHTMLELEMENT_IID \ + {0xa6cf9086, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLHtmlElement interface is the interface to a [X]HTML + * html element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLHtmlElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLHTMLELEMENT_IID) + + /* attribute DOMString version; */ + NS_IMETHOD GetVersion(nsAString & aVersion) = 0; + NS_IMETHOD SetVersion(const nsAString & aVersion) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLHTMLELEMENT \ + NS_IMETHOD GetVersion(nsAString & aVersion); \ + NS_IMETHOD SetVersion(const nsAString & aVersion); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLHTMLELEMENT(_to) \ + NS_IMETHOD GetVersion(nsAString & aVersion) { return _to GetVersion(aVersion); } \ + NS_IMETHOD SetVersion(const nsAString & aVersion) { return _to SetVersion(aVersion); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLHTMLELEMENT(_to) \ + NS_IMETHOD GetVersion(nsAString & aVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVersion(aVersion); } \ + NS_IMETHOD SetVersion(const nsAString & aVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVersion(aVersion); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLHtmlElement : public nsIDOMHTMLHtmlElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLHTMLELEMENT + + nsDOMHTMLHtmlElement(); + +private: + ~nsDOMHTMLHtmlElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLHtmlElement, nsIDOMHTMLHtmlElement) + +nsDOMHTMLHtmlElement::nsDOMHTMLHtmlElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLHtmlElement::~nsDOMHTMLHtmlElement() +{ + /* destructor code */ +} + +/* attribute DOMString version; */ +NS_IMETHODIMP nsDOMHTMLHtmlElement::GetVersion(nsAString & aVersion) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLHtmlElement::SetVersion(const nsAString & aVersion) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLHtmlElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLIFrameElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLIFrameElement.h new file mode 100644 index 00000000..26912ec6 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLIFrameElement.h @@ -0,0 +1,298 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLIFrameElement.idl + */ + +#ifndef __gen_nsIDOMHTMLIFrameElement_h__ +#define __gen_nsIDOMHTMLIFrameElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLIFrameElement */ +#define NS_IDOMHTMLIFRAMEELEMENT_IID_STR "a6cf90ba-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLIFRAMEELEMENT_IID \ + {0xa6cf90ba, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLIFrameElement interface is the interface to a [X]HTML + * iframe element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLIFrameElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLIFRAMEELEMENT_IID) + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString frameBorder; */ + NS_IMETHOD GetFrameBorder(nsAString & aFrameBorder) = 0; + NS_IMETHOD SetFrameBorder(const nsAString & aFrameBorder) = 0; + + /* attribute DOMString height; */ + NS_IMETHOD GetHeight(nsAString & aHeight) = 0; + NS_IMETHOD SetHeight(const nsAString & aHeight) = 0; + + /* attribute DOMString longDesc; */ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) = 0; + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) = 0; + + /* attribute DOMString marginHeight; */ + NS_IMETHOD GetMarginHeight(nsAString & aMarginHeight) = 0; + NS_IMETHOD SetMarginHeight(const nsAString & aMarginHeight) = 0; + + /* attribute DOMString marginWidth; */ + NS_IMETHOD GetMarginWidth(nsAString & aMarginWidth) = 0; + NS_IMETHOD SetMarginWidth(const nsAString & aMarginWidth) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString scrolling; */ + NS_IMETHOD GetScrolling(nsAString & aScrolling) = 0; + NS_IMETHOD SetScrolling(const nsAString & aScrolling) = 0; + + /* attribute DOMString src; */ + NS_IMETHOD GetSrc(nsAString & aSrc) = 0; + NS_IMETHOD SetSrc(const nsAString & aSrc) = 0; + + /* attribute DOMString width; */ + NS_IMETHOD GetWidth(nsAString & aWidth) = 0; + NS_IMETHOD SetWidth(const nsAString & aWidth) = 0; + + /* readonly attribute nsIDOMDocument contentDocument; */ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLIFRAMEELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetFrameBorder(nsAString & aFrameBorder); \ + NS_IMETHOD SetFrameBorder(const nsAString & aFrameBorder); \ + NS_IMETHOD GetHeight(nsAString & aHeight); \ + NS_IMETHOD SetHeight(const nsAString & aHeight); \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc); \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc); \ + NS_IMETHOD GetMarginHeight(nsAString & aMarginHeight); \ + NS_IMETHOD SetMarginHeight(const nsAString & aMarginHeight); \ + NS_IMETHOD GetMarginWidth(nsAString & aMarginWidth); \ + NS_IMETHOD SetMarginWidth(const nsAString & aMarginWidth); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetScrolling(nsAString & aScrolling); \ + NS_IMETHOD SetScrolling(const nsAString & aScrolling); \ + NS_IMETHOD GetSrc(nsAString & aSrc); \ + NS_IMETHOD SetSrc(const nsAString & aSrc); \ + NS_IMETHOD GetWidth(nsAString & aWidth); \ + NS_IMETHOD SetWidth(const nsAString & aWidth); \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLIFRAMEELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetFrameBorder(nsAString & aFrameBorder) { return _to GetFrameBorder(aFrameBorder); } \ + NS_IMETHOD SetFrameBorder(const nsAString & aFrameBorder) { return _to SetFrameBorder(aFrameBorder); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return _to GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return _to SetHeight(aHeight); } \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) { return _to GetLongDesc(aLongDesc); } \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) { return _to SetLongDesc(aLongDesc); } \ + NS_IMETHOD GetMarginHeight(nsAString & aMarginHeight) { return _to GetMarginHeight(aMarginHeight); } \ + NS_IMETHOD SetMarginHeight(const nsAString & aMarginHeight) { return _to SetMarginHeight(aMarginHeight); } \ + NS_IMETHOD GetMarginWidth(nsAString & aMarginWidth) { return _to GetMarginWidth(aMarginWidth); } \ + NS_IMETHOD SetMarginWidth(const nsAString & aMarginWidth) { return _to SetMarginWidth(aMarginWidth); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetScrolling(nsAString & aScrolling) { return _to GetScrolling(aScrolling); } \ + NS_IMETHOD SetScrolling(const nsAString & aScrolling) { return _to SetScrolling(aScrolling); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return _to GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return _to SetSrc(aSrc); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return _to SetWidth(aWidth); } \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) { return _to GetContentDocument(aContentDocument); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLIFRAMEELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetFrameBorder(nsAString & aFrameBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrameBorder(aFrameBorder); } \ + NS_IMETHOD SetFrameBorder(const nsAString & aFrameBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFrameBorder(aFrameBorder); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHeight(aHeight); } \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLongDesc(aLongDesc); } \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLongDesc(aLongDesc); } \ + NS_IMETHOD GetMarginHeight(nsAString & aMarginHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMarginHeight(aMarginHeight); } \ + NS_IMETHOD SetMarginHeight(const nsAString & aMarginHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMarginHeight(aMarginHeight); } \ + NS_IMETHOD GetMarginWidth(nsAString & aMarginWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMarginWidth(aMarginWidth); } \ + NS_IMETHOD SetMarginWidth(const nsAString & aMarginWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMarginWidth(aMarginWidth); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetScrolling(nsAString & aScrolling) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrolling(aScrolling); } \ + NS_IMETHOD SetScrolling(const nsAString & aScrolling) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScrolling(aScrolling); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSrc(aSrc); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentDocument(aContentDocument); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLIFrameElement : public nsIDOMHTMLIFrameElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLIFRAMEELEMENT + + nsDOMHTMLIFrameElement(); + +private: + ~nsDOMHTMLIFrameElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLIFrameElement, nsIDOMHTMLIFrameElement) + +nsDOMHTMLIFrameElement::nsDOMHTMLIFrameElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLIFrameElement::~nsDOMHTMLIFrameElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString frameBorder; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetFrameBorder(nsAString & aFrameBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetFrameBorder(const nsAString & aFrameBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString height; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetHeight(nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetHeight(const nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString longDesc; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetLongDesc(nsAString & aLongDesc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetLongDesc(const nsAString & aLongDesc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString marginHeight; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetMarginHeight(nsAString & aMarginHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetMarginHeight(const nsAString & aMarginHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString marginWidth; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetMarginWidth(nsAString & aMarginWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetMarginWidth(const nsAString & aMarginWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString scrolling; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetScrolling(nsAString & aScrolling) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetScrolling(const nsAString & aScrolling) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString src; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetSrc(nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetSrc(const nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString width; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetWidth(nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIFrameElement::SetWidth(const nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMDocument contentDocument; */ +NS_IMETHODIMP nsDOMHTMLIFrameElement::GetContentDocument(nsIDOMDocument * *aContentDocument) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLIFrameElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLImageElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLImageElement.h new file mode 100644 index 00000000..d7c612cb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLImageElement.h @@ -0,0 +1,326 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLImageElement.idl + */ + +#ifndef __gen_nsIDOMHTMLImageElement_h__ +#define __gen_nsIDOMHTMLImageElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLImageElement */ +#define NS_IDOMHTMLIMAGEELEMENT_IID_STR "a6cf90ab-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLIMAGEELEMENT_IID \ + {0xa6cf90ab, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLImageElement interface is the interface to a [X]HTML + * img element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLImageElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLIMAGEELEMENT_IID) + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString alt; */ + NS_IMETHOD GetAlt(nsAString & aAlt) = 0; + NS_IMETHOD SetAlt(const nsAString & aAlt) = 0; + + /* attribute DOMString border; */ + NS_IMETHOD GetBorder(nsAString & aBorder) = 0; + NS_IMETHOD SetBorder(const nsAString & aBorder) = 0; + + /* attribute long height; */ + NS_IMETHOD GetHeight(PRInt32 *aHeight) = 0; + NS_IMETHOD SetHeight(PRInt32 aHeight) = 0; + + /* attribute long hspace; */ + NS_IMETHOD GetHspace(PRInt32 *aHspace) = 0; + NS_IMETHOD SetHspace(PRInt32 aHspace) = 0; + + /* attribute boolean isMap; */ + NS_IMETHOD GetIsMap(PRBool *aIsMap) = 0; + NS_IMETHOD SetIsMap(PRBool aIsMap) = 0; + + /* attribute DOMString longDesc; */ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) = 0; + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) = 0; + + /* attribute DOMString src; */ + NS_IMETHOD GetSrc(nsAString & aSrc) = 0; + NS_IMETHOD SetSrc(const nsAString & aSrc) = 0; + + /* attribute DOMString useMap; */ + NS_IMETHOD GetUseMap(nsAString & aUseMap) = 0; + NS_IMETHOD SetUseMap(const nsAString & aUseMap) = 0; + + /* attribute long vspace; */ + NS_IMETHOD GetVspace(PRInt32 *aVspace) = 0; + NS_IMETHOD SetVspace(PRInt32 aVspace) = 0; + + /* attribute long width; */ + NS_IMETHOD GetWidth(PRInt32 *aWidth) = 0; + NS_IMETHOD SetWidth(PRInt32 aWidth) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLIMAGEELEMENT \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetAlt(nsAString & aAlt); \ + NS_IMETHOD SetAlt(const nsAString & aAlt); \ + NS_IMETHOD GetBorder(nsAString & aBorder); \ + NS_IMETHOD SetBorder(const nsAString & aBorder); \ + NS_IMETHOD GetHeight(PRInt32 *aHeight); \ + NS_IMETHOD SetHeight(PRInt32 aHeight); \ + NS_IMETHOD GetHspace(PRInt32 *aHspace); \ + NS_IMETHOD SetHspace(PRInt32 aHspace); \ + NS_IMETHOD GetIsMap(PRBool *aIsMap); \ + NS_IMETHOD SetIsMap(PRBool aIsMap); \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc); \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc); \ + NS_IMETHOD GetSrc(nsAString & aSrc); \ + NS_IMETHOD SetSrc(const nsAString & aSrc); \ + NS_IMETHOD GetUseMap(nsAString & aUseMap); \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap); \ + NS_IMETHOD GetVspace(PRInt32 *aVspace); \ + NS_IMETHOD SetVspace(PRInt32 aVspace); \ + NS_IMETHOD GetWidth(PRInt32 *aWidth); \ + NS_IMETHOD SetWidth(PRInt32 aWidth); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLIMAGEELEMENT(_to) \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetAlt(nsAString & aAlt) { return _to GetAlt(aAlt); } \ + NS_IMETHOD SetAlt(const nsAString & aAlt) { return _to SetAlt(aAlt); } \ + NS_IMETHOD GetBorder(nsAString & aBorder) { return _to GetBorder(aBorder); } \ + NS_IMETHOD SetBorder(const nsAString & aBorder) { return _to SetBorder(aBorder); } \ + NS_IMETHOD GetHeight(PRInt32 *aHeight) { return _to GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(PRInt32 aHeight) { return _to SetHeight(aHeight); } \ + NS_IMETHOD GetHspace(PRInt32 *aHspace) { return _to GetHspace(aHspace); } \ + NS_IMETHOD SetHspace(PRInt32 aHspace) { return _to SetHspace(aHspace); } \ + NS_IMETHOD GetIsMap(PRBool *aIsMap) { return _to GetIsMap(aIsMap); } \ + NS_IMETHOD SetIsMap(PRBool aIsMap) { return _to SetIsMap(aIsMap); } \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) { return _to GetLongDesc(aLongDesc); } \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) { return _to SetLongDesc(aLongDesc); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return _to GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return _to SetSrc(aSrc); } \ + NS_IMETHOD GetUseMap(nsAString & aUseMap) { return _to GetUseMap(aUseMap); } \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap) { return _to SetUseMap(aUseMap); } \ + NS_IMETHOD GetVspace(PRInt32 *aVspace) { return _to GetVspace(aVspace); } \ + NS_IMETHOD SetVspace(PRInt32 aVspace) { return _to SetVspace(aVspace); } \ + NS_IMETHOD GetWidth(PRInt32 *aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(PRInt32 aWidth) { return _to SetWidth(aWidth); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLIMAGEELEMENT(_to) \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetAlt(nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlt(aAlt); } \ + NS_IMETHOD SetAlt(const nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlt(aAlt); } \ + NS_IMETHOD GetBorder(nsAString & aBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBorder(aBorder); } \ + NS_IMETHOD SetBorder(const nsAString & aBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBorder(aBorder); } \ + NS_IMETHOD GetHeight(PRInt32 *aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(PRInt32 aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHeight(aHeight); } \ + NS_IMETHOD GetHspace(PRInt32 *aHspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHspace(aHspace); } \ + NS_IMETHOD SetHspace(PRInt32 aHspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHspace(aHspace); } \ + NS_IMETHOD GetIsMap(PRBool *aIsMap) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsMap(aIsMap); } \ + NS_IMETHOD SetIsMap(PRBool aIsMap) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsMap(aIsMap); } \ + NS_IMETHOD GetLongDesc(nsAString & aLongDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLongDesc(aLongDesc); } \ + NS_IMETHOD SetLongDesc(const nsAString & aLongDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLongDesc(aLongDesc); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSrc(aSrc); } \ + NS_IMETHOD GetUseMap(nsAString & aUseMap) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseMap(aUseMap); } \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseMap(aUseMap); } \ + NS_IMETHOD GetVspace(PRInt32 *aVspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVspace(aVspace); } \ + NS_IMETHOD SetVspace(PRInt32 aVspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVspace(aVspace); } \ + NS_IMETHOD GetWidth(PRInt32 *aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(PRInt32 aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLImageElement : public nsIDOMHTMLImageElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLIMAGEELEMENT + + nsDOMHTMLImageElement(); + +private: + ~nsDOMHTMLImageElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLImageElement, nsIDOMHTMLImageElement) + +nsDOMHTMLImageElement::nsDOMHTMLImageElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLImageElement::~nsDOMHTMLImageElement() +{ + /* destructor code */ +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString alt; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetAlt(nsAString & aAlt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetAlt(const nsAString & aAlt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString border; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetBorder(nsAString & aBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetBorder(const nsAString & aBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long height; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetHeight(PRInt32 *aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetHeight(PRInt32 aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long hspace; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetHspace(PRInt32 *aHspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetHspace(PRInt32 aHspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean isMap; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetIsMap(PRBool *aIsMap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetIsMap(PRBool aIsMap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString longDesc; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetLongDesc(nsAString & aLongDesc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetLongDesc(const nsAString & aLongDesc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString src; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetSrc(nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetSrc(const nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString useMap; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetUseMap(nsAString & aUseMap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetUseMap(const nsAString & aUseMap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long vspace; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetVspace(PRInt32 *aVspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetVspace(PRInt32 aVspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long width; */ +NS_IMETHODIMP nsDOMHTMLImageElement::GetWidth(PRInt32 *aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLImageElement::SetWidth(PRInt32 aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLImageElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLInputElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLInputElement.h new file mode 100644 index 00000000..760377ac --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLInputElement.h @@ -0,0 +1,486 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLInputElement.idl + */ + +#ifndef __gen_nsIDOMHTMLInputElement_h__ +#define __gen_nsIDOMHTMLInputElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLInputElement */ +#define NS_IDOMHTMLINPUTELEMENT_IID_STR "a6cf9093-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLINPUTELEMENT_IID \ + {0xa6cf9093, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLInputElement interface is the interface to a [X]HTML + * input element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLInputElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLINPUTELEMENT_IID) + + /* attribute DOMString defaultValue; */ + NS_IMETHOD GetDefaultValue(nsAString & aDefaultValue) = 0; + NS_IMETHOD SetDefaultValue(const nsAString & aDefaultValue) = 0; + + /* attribute boolean defaultChecked; */ + NS_IMETHOD GetDefaultChecked(PRBool *aDefaultChecked) = 0; + NS_IMETHOD SetDefaultChecked(PRBool aDefaultChecked) = 0; + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* attribute DOMString accept; */ + NS_IMETHOD GetAccept(nsAString & aAccept) = 0; + NS_IMETHOD SetAccept(const nsAString & aAccept) = 0; + + /* attribute DOMString accessKey; */ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) = 0; + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) = 0; + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString alt; */ + NS_IMETHOD GetAlt(nsAString & aAlt) = 0; + NS_IMETHOD SetAlt(const nsAString & aAlt) = 0; + + /* attribute boolean checked; */ + NS_IMETHOD GetChecked(PRBool *aChecked) = 0; + NS_IMETHOD SetChecked(PRBool aChecked) = 0; + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* attribute long maxLength; */ + NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) = 0; + NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute boolean readOnly; */ + NS_IMETHOD GetReadOnly(PRBool *aReadOnly) = 0; + NS_IMETHOD SetReadOnly(PRBool aReadOnly) = 0; + + /* attribute unsigned long size; */ + NS_IMETHOD GetSize(PRUint32 *aSize) = 0; + NS_IMETHOD SetSize(PRUint32 aSize) = 0; + + /* attribute DOMString src; */ + NS_IMETHOD GetSrc(nsAString & aSrc) = 0; + NS_IMETHOD SetSrc(const nsAString & aSrc) = 0; + + /* attribute long tabIndex; */ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) = 0; + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + + /* attribute DOMString useMap; */ + NS_IMETHOD GetUseMap(nsAString & aUseMap) = 0; + NS_IMETHOD SetUseMap(const nsAString & aUseMap) = 0; + + /* attribute DOMString value; */ + NS_IMETHOD GetValue(nsAString & aValue) = 0; + NS_IMETHOD SetValue(const nsAString & aValue) = 0; + + /* void blur (); */ + NS_IMETHOD Blur(void) = 0; + + /* void focus (); */ + NS_IMETHOD Focus(void) = 0; + + /* void select (); */ + NS_IMETHOD Select(void) = 0; + + /* void click (); */ + NS_IMETHOD Click(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLINPUTELEMENT \ + NS_IMETHOD GetDefaultValue(nsAString & aDefaultValue); \ + NS_IMETHOD SetDefaultValue(const nsAString & aDefaultValue); \ + NS_IMETHOD GetDefaultChecked(PRBool *aDefaultChecked); \ + NS_IMETHOD SetDefaultChecked(PRBool aDefaultChecked); \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetAccept(nsAString & aAccept); \ + NS_IMETHOD SetAccept(const nsAString & aAccept); \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey); \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey); \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetAlt(nsAString & aAlt); \ + NS_IMETHOD SetAlt(const nsAString & aAlt); \ + NS_IMETHOD GetChecked(PRBool *aChecked); \ + NS_IMETHOD SetChecked(PRBool aChecked); \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength); \ + NS_IMETHOD SetMaxLength(PRInt32 aMaxLength); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetReadOnly(PRBool *aReadOnly); \ + NS_IMETHOD SetReadOnly(PRBool aReadOnly); \ + NS_IMETHOD GetSize(PRUint32 *aSize); \ + NS_IMETHOD SetSize(PRUint32 aSize); \ + NS_IMETHOD GetSrc(nsAString & aSrc); \ + NS_IMETHOD SetSrc(const nsAString & aSrc); \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex); \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); \ + NS_IMETHOD GetUseMap(nsAString & aUseMap); \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap); \ + NS_IMETHOD GetValue(nsAString & aValue); \ + NS_IMETHOD SetValue(const nsAString & aValue); \ + NS_IMETHOD Blur(void); \ + NS_IMETHOD Focus(void); \ + NS_IMETHOD Select(void); \ + NS_IMETHOD Click(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLINPUTELEMENT(_to) \ + NS_IMETHOD GetDefaultValue(nsAString & aDefaultValue) { return _to GetDefaultValue(aDefaultValue); } \ + NS_IMETHOD SetDefaultValue(const nsAString & aDefaultValue) { return _to SetDefaultValue(aDefaultValue); } \ + NS_IMETHOD GetDefaultChecked(PRBool *aDefaultChecked) { return _to GetDefaultChecked(aDefaultChecked); } \ + NS_IMETHOD SetDefaultChecked(PRBool aDefaultChecked) { return _to SetDefaultChecked(aDefaultChecked); } \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetAccept(nsAString & aAccept) { return _to GetAccept(aAccept); } \ + NS_IMETHOD SetAccept(const nsAString & aAccept) { return _to SetAccept(aAccept); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return _to GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return _to SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetAlt(nsAString & aAlt) { return _to GetAlt(aAlt); } \ + NS_IMETHOD SetAlt(const nsAString & aAlt) { return _to SetAlt(aAlt); } \ + NS_IMETHOD GetChecked(PRBool *aChecked) { return _to GetChecked(aChecked); } \ + NS_IMETHOD SetChecked(PRBool aChecked) { return _to SetChecked(aChecked); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) { return _to GetMaxLength(aMaxLength); } \ + NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) { return _to SetMaxLength(aMaxLength); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetReadOnly(PRBool *aReadOnly) { return _to GetReadOnly(aReadOnly); } \ + NS_IMETHOD SetReadOnly(PRBool aReadOnly) { return _to SetReadOnly(aReadOnly); } \ + NS_IMETHOD GetSize(PRUint32 *aSize) { return _to GetSize(aSize); } \ + NS_IMETHOD SetSize(PRUint32 aSize) { return _to SetSize(aSize); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return _to GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return _to SetSrc(aSrc); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return _to GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } \ + NS_IMETHOD GetUseMap(nsAString & aUseMap) { return _to GetUseMap(aUseMap); } \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap) { return _to SetUseMap(aUseMap); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } \ + NS_IMETHOD Blur(void) { return _to Blur(); } \ + NS_IMETHOD Focus(void) { return _to Focus(); } \ + NS_IMETHOD Select(void) { return _to Select(); } \ + NS_IMETHOD Click(void) { return _to Click(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLINPUTELEMENT(_to) \ + NS_IMETHOD GetDefaultValue(nsAString & aDefaultValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultValue(aDefaultValue); } \ + NS_IMETHOD SetDefaultValue(const nsAString & aDefaultValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultValue(aDefaultValue); } \ + NS_IMETHOD GetDefaultChecked(PRBool *aDefaultChecked) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultChecked(aDefaultChecked); } \ + NS_IMETHOD SetDefaultChecked(PRBool aDefaultChecked) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultChecked(aDefaultChecked); } \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetAccept(nsAString & aAccept) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccept(aAccept); } \ + NS_IMETHOD SetAccept(const nsAString & aAccept) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccept(aAccept); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetAlt(nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlt(aAlt); } \ + NS_IMETHOD SetAlt(const nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlt(aAlt); } \ + NS_IMETHOD GetChecked(PRBool *aChecked) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChecked(aChecked); } \ + NS_IMETHOD SetChecked(PRBool aChecked) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChecked(aChecked); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMaxLength(aMaxLength); } \ + NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMaxLength(aMaxLength); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetReadOnly(PRBool *aReadOnly) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadOnly(aReadOnly); } \ + NS_IMETHOD SetReadOnly(PRBool aReadOnly) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReadOnly(aReadOnly); } \ + NS_IMETHOD GetSize(PRUint32 *aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \ + NS_IMETHOD SetSize(PRUint32 aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSize(aSize); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSrc(aSrc); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } \ + NS_IMETHOD GetUseMap(nsAString & aUseMap) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseMap(aUseMap); } \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseMap(aUseMap); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } \ + NS_IMETHOD Blur(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Blur(); } \ + NS_IMETHOD Focus(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Focus(); } \ + NS_IMETHOD Select(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Select(); } \ + NS_IMETHOD Click(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Click(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLInputElement : public nsIDOMHTMLInputElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLINPUTELEMENT + + nsDOMHTMLInputElement(); + +private: + ~nsDOMHTMLInputElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLInputElement, nsIDOMHTMLInputElement) + +nsDOMHTMLInputElement::nsDOMHTMLInputElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLInputElement::~nsDOMHTMLInputElement() +{ + /* destructor code */ +} + +/* attribute DOMString defaultValue; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetDefaultValue(nsAString & aDefaultValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetDefaultValue(const nsAString & aDefaultValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean defaultChecked; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetDefaultChecked(PRBool *aDefaultChecked) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetDefaultChecked(PRBool aDefaultChecked) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString accept; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetAccept(nsAString & aAccept) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetAccept(const nsAString & aAccept) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString accessKey; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetAccessKey(nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetAccessKey(const nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString alt; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetAlt(nsAString & aAlt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetAlt(const nsAString & aAlt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean checked; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetChecked(PRBool *aChecked) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetChecked(PRBool aChecked) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long maxLength; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetMaxLength(PRInt32 *aMaxLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetMaxLength(PRInt32 aMaxLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean readOnly; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetReadOnly(PRBool *aReadOnly) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetReadOnly(PRBool aReadOnly) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute unsigned long size; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetSize(PRUint32 *aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetSize(PRUint32 aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString src; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetSrc(nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetSrc(const nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long tabIndex; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetTabIndex(PRInt32 *aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetTabIndex(PRInt32 aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString useMap; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetUseMap(nsAString & aUseMap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetUseMap(const nsAString & aUseMap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString value; */ +NS_IMETHODIMP nsDOMHTMLInputElement::GetValue(nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLInputElement::SetValue(const nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void blur (); */ +NS_IMETHODIMP nsDOMHTMLInputElement::Blur() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void focus (); */ +NS_IMETHODIMP nsDOMHTMLInputElement::Focus() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void select (); */ +NS_IMETHODIMP nsDOMHTMLInputElement::Select() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void click (); */ +NS_IMETHODIMP nsDOMHTMLInputElement::Click() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLInputElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLIsIndexElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLIsIndexElement.h new file mode 100644 index 00000000..a5cf9cfd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLIsIndexElement.h @@ -0,0 +1,118 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLIsIndexElement.idl + */ + +#ifndef __gen_nsIDOMHTMLIsIndexElement_h__ +#define __gen_nsIDOMHTMLIsIndexElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLIsIndexElement */ +#define NS_IDOMHTMLISINDEXELEMENT_IID_STR "a6cf908c-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLISINDEXELEMENT_IID \ + {0xa6cf908c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLIsIndexElement interface is the interface to a + * [X]HTML isindex element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLIsIndexElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLISINDEXELEMENT_IID) + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* attribute DOMString prompt; */ + NS_IMETHOD GetPrompt(nsAString & aPrompt) = 0; + NS_IMETHOD SetPrompt(const nsAString & aPrompt) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLISINDEXELEMENT \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetPrompt(nsAString & aPrompt); \ + NS_IMETHOD SetPrompt(const nsAString & aPrompt); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLISINDEXELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetPrompt(nsAString & aPrompt) { return _to GetPrompt(aPrompt); } \ + NS_IMETHOD SetPrompt(const nsAString & aPrompt) { return _to SetPrompt(aPrompt); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLISINDEXELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetPrompt(nsAString & aPrompt) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrompt(aPrompt); } \ + NS_IMETHOD SetPrompt(const nsAString & aPrompt) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrompt(aPrompt); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLIsIndexElement : public nsIDOMHTMLIsIndexElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLISINDEXELEMENT + + nsDOMHTMLIsIndexElement(); + +private: + ~nsDOMHTMLIsIndexElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLIsIndexElement, nsIDOMHTMLIsIndexElement) + +nsDOMHTMLIsIndexElement::nsDOMHTMLIsIndexElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLIsIndexElement::~nsDOMHTMLIsIndexElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLIsIndexElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString prompt; */ +NS_IMETHODIMP nsDOMHTMLIsIndexElement::GetPrompt(nsAString & aPrompt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLIsIndexElement::SetPrompt(const nsAString & aPrompt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLIsIndexElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLIElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLIElement.h new file mode 100644 index 00000000..74bbed32 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLIElement.h @@ -0,0 +1,126 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLLIElement.idl + */ + +#ifndef __gen_nsIDOMHTMLLIElement_h__ +#define __gen_nsIDOMHTMLLIElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLLIElement */ +#define NS_IDOMHTMLLIELEMENT_IID_STR "a6cf909e-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLLIELEMENT_IID \ + {0xa6cf909e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLLIElement interface is the interface to a [X]HTML li + * element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLLIElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLLIELEMENT_IID) + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + + /* attribute long value; */ + NS_IMETHOD GetValue(PRInt32 *aValue) = 0; + NS_IMETHOD SetValue(PRInt32 aValue) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLLIELEMENT \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); \ + NS_IMETHOD GetValue(PRInt32 *aValue); \ + NS_IMETHOD SetValue(PRInt32 aValue); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLLIELEMENT(_to) \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } \ + NS_IMETHOD GetValue(PRInt32 *aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD SetValue(PRInt32 aValue) { return _to SetValue(aValue); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLLIELEMENT(_to) \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } \ + NS_IMETHOD GetValue(PRInt32 *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD SetValue(PRInt32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLLIElement : public nsIDOMHTMLLIElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLLIELEMENT + + nsDOMHTMLLIElement(); + +private: + ~nsDOMHTMLLIElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLLIElement, nsIDOMHTMLLIElement) + +nsDOMHTMLLIElement::nsDOMHTMLLIElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLLIElement::~nsDOMHTMLLIElement() +{ + /* destructor code */ +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLLIElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLIElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long value; */ +NS_IMETHODIMP nsDOMHTMLLIElement::GetValue(PRInt32 *aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLIElement::SetValue(PRInt32 aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLLIElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLabelElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLabelElement.h new file mode 100644 index 00000000..070f092b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLabelElement.h @@ -0,0 +1,138 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLLabelElement.idl + */ + +#ifndef __gen_nsIDOMHTMLLabelElement_h__ +#define __gen_nsIDOMHTMLLabelElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLLabelElement */ +#define NS_IDOMHTMLLABELELEMENT_IID_STR "a6cf9096-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLLABELELEMENT_IID \ + {0xa6cf9096, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLLabelElement interface is the interface to a [X]HTML + * label element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLLabelElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLLABELELEMENT_IID) + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* attribute DOMString accessKey; */ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) = 0; + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) = 0; + + /* attribute DOMString htmlFor; */ + NS_IMETHOD GetHtmlFor(nsAString & aHtmlFor) = 0; + NS_IMETHOD SetHtmlFor(const nsAString & aHtmlFor) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLLABELELEMENT \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey); \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey); \ + NS_IMETHOD GetHtmlFor(nsAString & aHtmlFor); \ + NS_IMETHOD SetHtmlFor(const nsAString & aHtmlFor); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLLABELELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return _to GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return _to SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetHtmlFor(nsAString & aHtmlFor) { return _to GetHtmlFor(aHtmlFor); } \ + NS_IMETHOD SetHtmlFor(const nsAString & aHtmlFor) { return _to SetHtmlFor(aHtmlFor); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLLABELELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetHtmlFor(nsAString & aHtmlFor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHtmlFor(aHtmlFor); } \ + NS_IMETHOD SetHtmlFor(const nsAString & aHtmlFor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHtmlFor(aHtmlFor); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLLabelElement : public nsIDOMHTMLLabelElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLLABELELEMENT + + nsDOMHTMLLabelElement(); + +private: + ~nsDOMHTMLLabelElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLLabelElement, nsIDOMHTMLLabelElement) + +nsDOMHTMLLabelElement::nsDOMHTMLLabelElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLLabelElement::~nsDOMHTMLLabelElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLLabelElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString accessKey; */ +NS_IMETHODIMP nsDOMHTMLLabelElement::GetAccessKey(nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLabelElement::SetAccessKey(const nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString htmlFor; */ +NS_IMETHODIMP nsDOMHTMLLabelElement::GetHtmlFor(nsAString & aHtmlFor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLabelElement::SetHtmlFor(const nsAString & aHtmlFor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLLabelElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLegendElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLegendElement.h new file mode 100644 index 00000000..6925760f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLegendElement.h @@ -0,0 +1,138 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLLegendElement.idl + */ + +#ifndef __gen_nsIDOMHTMLLegendElement_h__ +#define __gen_nsIDOMHTMLLegendElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLLegendElement */ +#define NS_IDOMHTMLLEGENDELEMENT_IID_STR "a6cf9098-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLLEGENDELEMENT_IID \ + {0xa6cf9098, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLLegendElement interface is the interface to a [X]HTML + * legend element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLLegendElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLLEGENDELEMENT_IID) + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* attribute DOMString accessKey; */ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) = 0; + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) = 0; + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLLEGENDELEMENT \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey); \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey); \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLLEGENDELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return _to GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return _to SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLLEGENDELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLLegendElement : public nsIDOMHTMLLegendElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLLEGENDELEMENT + + nsDOMHTMLLegendElement(); + +private: + ~nsDOMHTMLLegendElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLLegendElement, nsIDOMHTMLLegendElement) + +nsDOMHTMLLegendElement::nsDOMHTMLLegendElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLLegendElement::~nsDOMHTMLLegendElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLLegendElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString accessKey; */ +NS_IMETHODIMP nsDOMHTMLLegendElement::GetAccessKey(nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLegendElement::SetAccessKey(const nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLLegendElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLegendElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLLegendElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLinkElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLinkElement.h new file mode 100644 index 00000000..5ae1a545 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLLinkElement.h @@ -0,0 +1,266 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLLinkElement.idl + */ + +#ifndef __gen_nsIDOMHTMLLinkElement_h__ +#define __gen_nsIDOMHTMLLinkElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLLinkElement */ +#define NS_IDOMHTMLLINKELEMENT_IID_STR "a6cf9088-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLLINKELEMENT_IID \ + {0xa6cf9088, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLLinkElement interface is the interface to a [X]HTML + * link element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLLinkElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLLINKELEMENT_IID) + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* attribute DOMString charset; */ + NS_IMETHOD GetCharset(nsAString & aCharset) = 0; + NS_IMETHOD SetCharset(const nsAString & aCharset) = 0; + + /* attribute DOMString href; */ + NS_IMETHOD GetHref(nsAString & aHref) = 0; + NS_IMETHOD SetHref(const nsAString & aHref) = 0; + + /* attribute DOMString hreflang; */ + NS_IMETHOD GetHreflang(nsAString & aHreflang) = 0; + NS_IMETHOD SetHreflang(const nsAString & aHreflang) = 0; + + /* attribute DOMString media; */ + NS_IMETHOD GetMedia(nsAString & aMedia) = 0; + NS_IMETHOD SetMedia(const nsAString & aMedia) = 0; + + /* attribute DOMString rel; */ + NS_IMETHOD GetRel(nsAString & aRel) = 0; + NS_IMETHOD SetRel(const nsAString & aRel) = 0; + + /* attribute DOMString rev; */ + NS_IMETHOD GetRev(nsAString & aRev) = 0; + NS_IMETHOD SetRev(const nsAString & aRev) = 0; + + /* attribute DOMString target; */ + NS_IMETHOD GetTarget(nsAString & aTarget) = 0; + NS_IMETHOD SetTarget(const nsAString & aTarget) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLLINKELEMENT \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetCharset(nsAString & aCharset); \ + NS_IMETHOD SetCharset(const nsAString & aCharset); \ + NS_IMETHOD GetHref(nsAString & aHref); \ + NS_IMETHOD SetHref(const nsAString & aHref); \ + NS_IMETHOD GetHreflang(nsAString & aHreflang); \ + NS_IMETHOD SetHreflang(const nsAString & aHreflang); \ + NS_IMETHOD GetMedia(nsAString & aMedia); \ + NS_IMETHOD SetMedia(const nsAString & aMedia); \ + NS_IMETHOD GetRel(nsAString & aRel); \ + NS_IMETHOD SetRel(const nsAString & aRel); \ + NS_IMETHOD GetRev(nsAString & aRev); \ + NS_IMETHOD SetRev(const nsAString & aRev); \ + NS_IMETHOD GetTarget(nsAString & aTarget); \ + NS_IMETHOD SetTarget(const nsAString & aTarget); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLLINKELEMENT(_to) \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetCharset(nsAString & aCharset) { return _to GetCharset(aCharset); } \ + NS_IMETHOD SetCharset(const nsAString & aCharset) { return _to SetCharset(aCharset); } \ + NS_IMETHOD GetHref(nsAString & aHref) { return _to GetHref(aHref); } \ + NS_IMETHOD SetHref(const nsAString & aHref) { return _to SetHref(aHref); } \ + NS_IMETHOD GetHreflang(nsAString & aHreflang) { return _to GetHreflang(aHreflang); } \ + NS_IMETHOD SetHreflang(const nsAString & aHreflang) { return _to SetHreflang(aHreflang); } \ + NS_IMETHOD GetMedia(nsAString & aMedia) { return _to GetMedia(aMedia); } \ + NS_IMETHOD SetMedia(const nsAString & aMedia) { return _to SetMedia(aMedia); } \ + NS_IMETHOD GetRel(nsAString & aRel) { return _to GetRel(aRel); } \ + NS_IMETHOD SetRel(const nsAString & aRel) { return _to SetRel(aRel); } \ + NS_IMETHOD GetRev(nsAString & aRev) { return _to GetRev(aRev); } \ + NS_IMETHOD SetRev(const nsAString & aRev) { return _to SetRev(aRev); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return _to GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return _to SetTarget(aTarget); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLLINKELEMENT(_to) \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetCharset(nsAString & aCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharset(aCharset); } \ + NS_IMETHOD SetCharset(const nsAString & aCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCharset(aCharset); } \ + NS_IMETHOD GetHref(nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHref(aHref); } \ + NS_IMETHOD SetHref(const nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHref(aHref); } \ + NS_IMETHOD GetHreflang(nsAString & aHreflang) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHreflang(aHreflang); } \ + NS_IMETHOD SetHreflang(const nsAString & aHreflang) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHreflang(aHreflang); } \ + NS_IMETHOD GetMedia(nsAString & aMedia) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMedia(aMedia); } \ + NS_IMETHOD SetMedia(const nsAString & aMedia) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMedia(aMedia); } \ + NS_IMETHOD GetRel(nsAString & aRel) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRel(aRel); } \ + NS_IMETHOD SetRel(const nsAString & aRel) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRel(aRel); } \ + NS_IMETHOD GetRev(nsAString & aRev) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRev(aRev); } \ + NS_IMETHOD SetRev(const nsAString & aRev) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRev(aRev); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \ + NS_IMETHOD SetTarget(const nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTarget(aTarget); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLLinkElement : public nsIDOMHTMLLinkElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLLINKELEMENT + + nsDOMHTMLLinkElement(); + +private: + ~nsDOMHTMLLinkElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLLinkElement, nsIDOMHTMLLinkElement) + +nsDOMHTMLLinkElement::nsDOMHTMLLinkElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLLinkElement::~nsDOMHTMLLinkElement() +{ + /* destructor code */ +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString charset; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetCharset(nsAString & aCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetCharset(const nsAString & aCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString href; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetHref(nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetHref(const nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString hreflang; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetHreflang(nsAString & aHreflang) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetHreflang(const nsAString & aHreflang) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString media; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetMedia(nsAString & aMedia) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetMedia(const nsAString & aMedia) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString rel; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetRel(nsAString & aRel) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetRel(const nsAString & aRel) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString rev; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetRev(nsAString & aRev) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetRev(const nsAString & aRev) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString target; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetTarget(nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetTarget(const nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLLinkElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLLinkElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLLinkElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMapElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMapElement.h new file mode 100644 index 00000000..d72050f1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMapElement.h @@ -0,0 +1,118 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLMapElement.idl + */ + +#ifndef __gen_nsIDOMHTMLMapElement_h__ +#define __gen_nsIDOMHTMLMapElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLMapElement */ +#define NS_IDOMHTMLMAPELEMENT_IID_STR "a6cf90af-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLMAPELEMENT_IID \ + {0xa6cf90af, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLMapElement interface is the interface to a [X]HTML + * map element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLMapElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLMAPELEMENT_IID) + + /* readonly attribute nsIDOMHTMLCollection areas; */ + NS_IMETHOD GetAreas(nsIDOMHTMLCollection * *aAreas) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLMAPELEMENT \ + NS_IMETHOD GetAreas(nsIDOMHTMLCollection * *aAreas); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLMAPELEMENT(_to) \ + NS_IMETHOD GetAreas(nsIDOMHTMLCollection * *aAreas) { return _to GetAreas(aAreas); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLMAPELEMENT(_to) \ + NS_IMETHOD GetAreas(nsIDOMHTMLCollection * *aAreas) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAreas(aAreas); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLMapElement : public nsIDOMHTMLMapElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLMAPELEMENT + + nsDOMHTMLMapElement(); + +private: + ~nsDOMHTMLMapElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLMapElement, nsIDOMHTMLMapElement) + +nsDOMHTMLMapElement::nsDOMHTMLMapElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLMapElement::~nsDOMHTMLMapElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLCollection areas; */ +NS_IMETHODIMP nsDOMHTMLMapElement::GetAreas(nsIDOMHTMLCollection * *aAreas) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLMapElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLMapElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLMapElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMenuElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMenuElement.h new file mode 100644 index 00000000..11fdbecf --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMenuElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLMenuElement.idl + */ + +#ifndef __gen_nsIDOMHTMLMenuElement_h__ +#define __gen_nsIDOMHTMLMenuElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLMenuElement */ +#define NS_IDOMHTMLMENUELEMENT_IID_STR "a6cf909d-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLMENUELEMENT_IID \ + {0xa6cf909d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLMenuElement interface is the interface to a [X]HTML + * menu element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLMenuElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLMENUELEMENT_IID) + + /* attribute boolean compact; */ + NS_IMETHOD GetCompact(PRBool *aCompact) = 0; + NS_IMETHOD SetCompact(PRBool aCompact) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLMENUELEMENT \ + NS_IMETHOD GetCompact(PRBool *aCompact); \ + NS_IMETHOD SetCompact(PRBool aCompact); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLMENUELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return _to GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return _to SetCompact(aCompact); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLMENUELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCompact(aCompact); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLMenuElement : public nsIDOMHTMLMenuElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLMENUELEMENT + + nsDOMHTMLMenuElement(); + +private: + ~nsDOMHTMLMenuElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLMenuElement, nsIDOMHTMLMenuElement) + +nsDOMHTMLMenuElement::nsDOMHTMLMenuElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLMenuElement::~nsDOMHTMLMenuElement() +{ + /* destructor code */ +} + +/* attribute boolean compact; */ +NS_IMETHODIMP nsDOMHTMLMenuElement::GetCompact(PRBool *aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLMenuElement::SetCompact(PRBool aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLMenuElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMetaElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMetaElement.h new file mode 100644 index 00000000..6f3122a4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLMetaElement.h @@ -0,0 +1,166 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLMetaElement.idl + */ + +#ifndef __gen_nsIDOMHTMLMetaElement_h__ +#define __gen_nsIDOMHTMLMetaElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLMetaElement */ +#define NS_IDOMHTMLMETAELEMENT_IID_STR "a6cf908a-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLMETAELEMENT_IID \ + {0xa6cf908a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLMetaElement interface is the interface to a [X]HTML + * meta element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLMetaElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLMETAELEMENT_IID) + + /* attribute DOMString content; */ + NS_IMETHOD GetContent(nsAString & aContent) = 0; + NS_IMETHOD SetContent(const nsAString & aContent) = 0; + + /* attribute DOMString httpEquiv; */ + NS_IMETHOD GetHttpEquiv(nsAString & aHttpEquiv) = 0; + NS_IMETHOD SetHttpEquiv(const nsAString & aHttpEquiv) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString scheme; */ + NS_IMETHOD GetScheme(nsAString & aScheme) = 0; + NS_IMETHOD SetScheme(const nsAString & aScheme) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLMETAELEMENT \ + NS_IMETHOD GetContent(nsAString & aContent); \ + NS_IMETHOD SetContent(const nsAString & aContent); \ + NS_IMETHOD GetHttpEquiv(nsAString & aHttpEquiv); \ + NS_IMETHOD SetHttpEquiv(const nsAString & aHttpEquiv); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetScheme(nsAString & aScheme); \ + NS_IMETHOD SetScheme(const nsAString & aScheme); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLMETAELEMENT(_to) \ + NS_IMETHOD GetContent(nsAString & aContent) { return _to GetContent(aContent); } \ + NS_IMETHOD SetContent(const nsAString & aContent) { return _to SetContent(aContent); } \ + NS_IMETHOD GetHttpEquiv(nsAString & aHttpEquiv) { return _to GetHttpEquiv(aHttpEquiv); } \ + NS_IMETHOD SetHttpEquiv(const nsAString & aHttpEquiv) { return _to SetHttpEquiv(aHttpEquiv); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetScheme(nsAString & aScheme) { return _to GetScheme(aScheme); } \ + NS_IMETHOD SetScheme(const nsAString & aScheme) { return _to SetScheme(aScheme); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLMETAELEMENT(_to) \ + NS_IMETHOD GetContent(nsAString & aContent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContent(aContent); } \ + NS_IMETHOD SetContent(const nsAString & aContent) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContent(aContent); } \ + NS_IMETHOD GetHttpEquiv(nsAString & aHttpEquiv) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHttpEquiv(aHttpEquiv); } \ + NS_IMETHOD SetHttpEquiv(const nsAString & aHttpEquiv) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHttpEquiv(aHttpEquiv); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetScheme(nsAString & aScheme) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \ + NS_IMETHOD SetScheme(const nsAString & aScheme) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScheme(aScheme); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLMetaElement : public nsIDOMHTMLMetaElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLMETAELEMENT + + nsDOMHTMLMetaElement(); + +private: + ~nsDOMHTMLMetaElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLMetaElement, nsIDOMHTMLMetaElement) + +nsDOMHTMLMetaElement::nsDOMHTMLMetaElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLMetaElement::~nsDOMHTMLMetaElement() +{ + /* destructor code */ +} + +/* attribute DOMString content; */ +NS_IMETHODIMP nsDOMHTMLMetaElement::GetContent(nsAString & aContent) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLMetaElement::SetContent(const nsAString & aContent) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString httpEquiv; */ +NS_IMETHODIMP nsDOMHTMLMetaElement::GetHttpEquiv(nsAString & aHttpEquiv) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLMetaElement::SetHttpEquiv(const nsAString & aHttpEquiv) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLMetaElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLMetaElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString scheme; */ +NS_IMETHODIMP nsDOMHTMLMetaElement::GetScheme(nsAString & aScheme) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLMetaElement::SetScheme(const nsAString & aScheme) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLMetaElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLModElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLModElement.h new file mode 100644 index 00000000..8de6eef6 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLModElement.h @@ -0,0 +1,126 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLModElement.idl + */ + +#ifndef __gen_nsIDOMHTMLModElement_h__ +#define __gen_nsIDOMHTMLModElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLModElement */ +#define NS_IDOMHTMLMODELEMENT_IID_STR "a6cf90a9-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLMODELEMENT_IID \ + {0xa6cf90a9, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLModElement interface is the interface to a [X]HTML + * ins and del element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLModElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLMODELEMENT_IID) + + /* attribute DOMString cite; */ + NS_IMETHOD GetCite(nsAString & aCite) = 0; + NS_IMETHOD SetCite(const nsAString & aCite) = 0; + + /* attribute DOMString dateTime; */ + NS_IMETHOD GetDateTime(nsAString & aDateTime) = 0; + NS_IMETHOD SetDateTime(const nsAString & aDateTime) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLMODELEMENT \ + NS_IMETHOD GetCite(nsAString & aCite); \ + NS_IMETHOD SetCite(const nsAString & aCite); \ + NS_IMETHOD GetDateTime(nsAString & aDateTime); \ + NS_IMETHOD SetDateTime(const nsAString & aDateTime); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLMODELEMENT(_to) \ + NS_IMETHOD GetCite(nsAString & aCite) { return _to GetCite(aCite); } \ + NS_IMETHOD SetCite(const nsAString & aCite) { return _to SetCite(aCite); } \ + NS_IMETHOD GetDateTime(nsAString & aDateTime) { return _to GetDateTime(aDateTime); } \ + NS_IMETHOD SetDateTime(const nsAString & aDateTime) { return _to SetDateTime(aDateTime); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLMODELEMENT(_to) \ + NS_IMETHOD GetCite(nsAString & aCite) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCite(aCite); } \ + NS_IMETHOD SetCite(const nsAString & aCite) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCite(aCite); } \ + NS_IMETHOD GetDateTime(nsAString & aDateTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDateTime(aDateTime); } \ + NS_IMETHOD SetDateTime(const nsAString & aDateTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDateTime(aDateTime); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLModElement : public nsIDOMHTMLModElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLMODELEMENT + + nsDOMHTMLModElement(); + +private: + ~nsDOMHTMLModElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLModElement, nsIDOMHTMLModElement) + +nsDOMHTMLModElement::nsDOMHTMLModElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLModElement::~nsDOMHTMLModElement() +{ + /* destructor code */ +} + +/* attribute DOMString cite; */ +NS_IMETHODIMP nsDOMHTMLModElement::GetCite(nsAString & aCite) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLModElement::SetCite(const nsAString & aCite) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString dateTime; */ +NS_IMETHODIMP nsDOMHTMLModElement::GetDateTime(nsAString & aDateTime) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLModElement::SetDateTime(const nsAString & aDateTime) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLModElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOListElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOListElement.h new file mode 100644 index 00000000..684d79f0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOListElement.h @@ -0,0 +1,146 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLOListElement.idl + */ + +#ifndef __gen_nsIDOMHTMLOListElement_h__ +#define __gen_nsIDOMHTMLOListElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLOListElement */ +#define NS_IDOMHTMLOLISTELEMENT_IID_STR "a6cf909a-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLOLISTELEMENT_IID \ + {0xa6cf909a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLOListElement interface is the interface to a [X]HTML + * ol element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLOListElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLOLISTELEMENT_IID) + + /* attribute boolean compact; */ + NS_IMETHOD GetCompact(PRBool *aCompact) = 0; + NS_IMETHOD SetCompact(PRBool aCompact) = 0; + + /* attribute long start; */ + NS_IMETHOD GetStart(PRInt32 *aStart) = 0; + NS_IMETHOD SetStart(PRInt32 aStart) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLOLISTELEMENT \ + NS_IMETHOD GetCompact(PRBool *aCompact); \ + NS_IMETHOD SetCompact(PRBool aCompact); \ + NS_IMETHOD GetStart(PRInt32 *aStart); \ + NS_IMETHOD SetStart(PRInt32 aStart); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLOLISTELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return _to GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return _to SetCompact(aCompact); } \ + NS_IMETHOD GetStart(PRInt32 *aStart) { return _to GetStart(aStart); } \ + NS_IMETHOD SetStart(PRInt32 aStart) { return _to SetStart(aStart); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLOLISTELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCompact(aCompact); } \ + NS_IMETHOD GetStart(PRInt32 *aStart) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStart(aStart); } \ + NS_IMETHOD SetStart(PRInt32 aStart) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStart(aStart); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLOListElement : public nsIDOMHTMLOListElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLOLISTELEMENT + + nsDOMHTMLOListElement(); + +private: + ~nsDOMHTMLOListElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLOListElement, nsIDOMHTMLOListElement) + +nsDOMHTMLOListElement::nsDOMHTMLOListElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLOListElement::~nsDOMHTMLOListElement() +{ + /* destructor code */ +} + +/* attribute boolean compact; */ +NS_IMETHODIMP nsDOMHTMLOListElement::GetCompact(PRBool *aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOListElement::SetCompact(PRBool aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long start; */ +NS_IMETHODIMP nsDOMHTMLOListElement::GetStart(PRInt32 *aStart) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOListElement::SetStart(PRInt32 aStart) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLOListElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOListElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLOListElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLObjectElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLObjectElement.h new file mode 100644 index 00000000..9d6c5d01 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLObjectElement.h @@ -0,0 +1,450 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLObjectElement.idl + */ + +#ifndef __gen_nsIDOMHTMLObjectElement_h__ +#define __gen_nsIDOMHTMLObjectElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLObjectElement */ +#define NS_IDOMHTMLOBJECTELEMENT_IID_STR "a6cf90ac-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLOBJECTELEMENT_IID \ + {0xa6cf90ac, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLObjectElement interface is the interface to a [X]HTML + * object element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLObjectElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLOBJECTELEMENT_IID) + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* attribute DOMString code; */ + NS_IMETHOD GetCode(nsAString & aCode) = 0; + NS_IMETHOD SetCode(const nsAString & aCode) = 0; + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString archive; */ + NS_IMETHOD GetArchive(nsAString & aArchive) = 0; + NS_IMETHOD SetArchive(const nsAString & aArchive) = 0; + + /* attribute DOMString border; */ + NS_IMETHOD GetBorder(nsAString & aBorder) = 0; + NS_IMETHOD SetBorder(const nsAString & aBorder) = 0; + + /* attribute DOMString codeBase; */ + NS_IMETHOD GetCodeBase(nsAString & aCodeBase) = 0; + NS_IMETHOD SetCodeBase(const nsAString & aCodeBase) = 0; + + /* attribute DOMString codeType; */ + NS_IMETHOD GetCodeType(nsAString & aCodeType) = 0; + NS_IMETHOD SetCodeType(const nsAString & aCodeType) = 0; + + /* attribute DOMString data; */ + NS_IMETHOD GetData(nsAString & aData) = 0; + NS_IMETHOD SetData(const nsAString & aData) = 0; + + /* attribute boolean declare; */ + NS_IMETHOD GetDeclare(PRBool *aDeclare) = 0; + NS_IMETHOD SetDeclare(PRBool aDeclare) = 0; + + /* attribute DOMString height; */ + NS_IMETHOD GetHeight(nsAString & aHeight) = 0; + NS_IMETHOD SetHeight(const nsAString & aHeight) = 0; + + /* attribute long hspace; */ + NS_IMETHOD GetHspace(PRInt32 *aHspace) = 0; + NS_IMETHOD SetHspace(PRInt32 aHspace) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString standby; */ + NS_IMETHOD GetStandby(nsAString & aStandby) = 0; + NS_IMETHOD SetStandby(const nsAString & aStandby) = 0; + + /* attribute long tabIndex; */ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) = 0; + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + + /* attribute DOMString useMap; */ + NS_IMETHOD GetUseMap(nsAString & aUseMap) = 0; + NS_IMETHOD SetUseMap(const nsAString & aUseMap) = 0; + + /* attribute long vspace; */ + NS_IMETHOD GetVspace(PRInt32 *aVspace) = 0; + NS_IMETHOD SetVspace(PRInt32 aVspace) = 0; + + /* attribute DOMString width; */ + NS_IMETHOD GetWidth(nsAString & aWidth) = 0; + NS_IMETHOD SetWidth(const nsAString & aWidth) = 0; + + /* readonly attribute nsIDOMDocument contentDocument; */ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLOBJECTELEMENT \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetCode(nsAString & aCode); \ + NS_IMETHOD SetCode(const nsAString & aCode); \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetArchive(nsAString & aArchive); \ + NS_IMETHOD SetArchive(const nsAString & aArchive); \ + NS_IMETHOD GetBorder(nsAString & aBorder); \ + NS_IMETHOD SetBorder(const nsAString & aBorder); \ + NS_IMETHOD GetCodeBase(nsAString & aCodeBase); \ + NS_IMETHOD SetCodeBase(const nsAString & aCodeBase); \ + NS_IMETHOD GetCodeType(nsAString & aCodeType); \ + NS_IMETHOD SetCodeType(const nsAString & aCodeType); \ + NS_IMETHOD GetData(nsAString & aData); \ + NS_IMETHOD SetData(const nsAString & aData); \ + NS_IMETHOD GetDeclare(PRBool *aDeclare); \ + NS_IMETHOD SetDeclare(PRBool aDeclare); \ + NS_IMETHOD GetHeight(nsAString & aHeight); \ + NS_IMETHOD SetHeight(const nsAString & aHeight); \ + NS_IMETHOD GetHspace(PRInt32 *aHspace); \ + NS_IMETHOD SetHspace(PRInt32 aHspace); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetStandby(nsAString & aStandby); \ + NS_IMETHOD SetStandby(const nsAString & aStandby); \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex); \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); \ + NS_IMETHOD GetUseMap(nsAString & aUseMap); \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap); \ + NS_IMETHOD GetVspace(PRInt32 *aVspace); \ + NS_IMETHOD SetVspace(PRInt32 aVspace); \ + NS_IMETHOD GetWidth(nsAString & aWidth); \ + NS_IMETHOD SetWidth(const nsAString & aWidth); \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLOBJECTELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetCode(nsAString & aCode) { return _to GetCode(aCode); } \ + NS_IMETHOD SetCode(const nsAString & aCode) { return _to SetCode(aCode); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetArchive(nsAString & aArchive) { return _to GetArchive(aArchive); } \ + NS_IMETHOD SetArchive(const nsAString & aArchive) { return _to SetArchive(aArchive); } \ + NS_IMETHOD GetBorder(nsAString & aBorder) { return _to GetBorder(aBorder); } \ + NS_IMETHOD SetBorder(const nsAString & aBorder) { return _to SetBorder(aBorder); } \ + NS_IMETHOD GetCodeBase(nsAString & aCodeBase) { return _to GetCodeBase(aCodeBase); } \ + NS_IMETHOD SetCodeBase(const nsAString & aCodeBase) { return _to SetCodeBase(aCodeBase); } \ + NS_IMETHOD GetCodeType(nsAString & aCodeType) { return _to GetCodeType(aCodeType); } \ + NS_IMETHOD SetCodeType(const nsAString & aCodeType) { return _to SetCodeType(aCodeType); } \ + NS_IMETHOD GetData(nsAString & aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(const nsAString & aData) { return _to SetData(aData); } \ + NS_IMETHOD GetDeclare(PRBool *aDeclare) { return _to GetDeclare(aDeclare); } \ + NS_IMETHOD SetDeclare(PRBool aDeclare) { return _to SetDeclare(aDeclare); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return _to GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return _to SetHeight(aHeight); } \ + NS_IMETHOD GetHspace(PRInt32 *aHspace) { return _to GetHspace(aHspace); } \ + NS_IMETHOD SetHspace(PRInt32 aHspace) { return _to SetHspace(aHspace); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetStandby(nsAString & aStandby) { return _to GetStandby(aStandby); } \ + NS_IMETHOD SetStandby(const nsAString & aStandby) { return _to SetStandby(aStandby); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return _to GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } \ + NS_IMETHOD GetUseMap(nsAString & aUseMap) { return _to GetUseMap(aUseMap); } \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap) { return _to SetUseMap(aUseMap); } \ + NS_IMETHOD GetVspace(PRInt32 *aVspace) { return _to GetVspace(aVspace); } \ + NS_IMETHOD SetVspace(PRInt32 aVspace) { return _to SetVspace(aVspace); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return _to SetWidth(aWidth); } \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) { return _to GetContentDocument(aContentDocument); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLOBJECTELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetCode(nsAString & aCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCode(aCode); } \ + NS_IMETHOD SetCode(const nsAString & aCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCode(aCode); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetArchive(nsAString & aArchive) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetArchive(aArchive); } \ + NS_IMETHOD SetArchive(const nsAString & aArchive) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetArchive(aArchive); } \ + NS_IMETHOD GetBorder(nsAString & aBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBorder(aBorder); } \ + NS_IMETHOD SetBorder(const nsAString & aBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBorder(aBorder); } \ + NS_IMETHOD GetCodeBase(nsAString & aCodeBase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCodeBase(aCodeBase); } \ + NS_IMETHOD SetCodeBase(const nsAString & aCodeBase) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCodeBase(aCodeBase); } \ + NS_IMETHOD GetCodeType(nsAString & aCodeType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCodeType(aCodeType); } \ + NS_IMETHOD SetCodeType(const nsAString & aCodeType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCodeType(aCodeType); } \ + NS_IMETHOD GetData(nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD GetDeclare(PRBool *aDeclare) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDeclare(aDeclare); } \ + NS_IMETHOD SetDeclare(PRBool aDeclare) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDeclare(aDeclare); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHeight(aHeight); } \ + NS_IMETHOD GetHspace(PRInt32 *aHspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHspace(aHspace); } \ + NS_IMETHOD SetHspace(PRInt32 aHspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHspace(aHspace); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetStandby(nsAString & aStandby) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStandby(aStandby); } \ + NS_IMETHOD SetStandby(const nsAString & aStandby) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStandby(aStandby); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } \ + NS_IMETHOD GetUseMap(nsAString & aUseMap) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseMap(aUseMap); } \ + NS_IMETHOD SetUseMap(const nsAString & aUseMap) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseMap(aUseMap); } \ + NS_IMETHOD GetVspace(PRInt32 *aVspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVspace(aVspace); } \ + NS_IMETHOD SetVspace(PRInt32 aVspace) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVspace(aVspace); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } \ + NS_IMETHOD GetContentDocument(nsIDOMDocument * *aContentDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentDocument(aContentDocument); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLObjectElement : public nsIDOMHTMLObjectElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLOBJECTELEMENT + + nsDOMHTMLObjectElement(); + +private: + ~nsDOMHTMLObjectElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLObjectElement, nsIDOMHTMLObjectElement) + +nsDOMHTMLObjectElement::nsDOMHTMLObjectElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLObjectElement::~nsDOMHTMLObjectElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString code; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetCode(nsAString & aCode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetCode(const nsAString & aCode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString archive; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetArchive(nsAString & aArchive) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetArchive(const nsAString & aArchive) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString border; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetBorder(nsAString & aBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetBorder(const nsAString & aBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString codeBase; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetCodeBase(nsAString & aCodeBase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetCodeBase(const nsAString & aCodeBase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString codeType; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetCodeType(nsAString & aCodeType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetCodeType(const nsAString & aCodeType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString data; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetData(nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetData(const nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean declare; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetDeclare(PRBool *aDeclare) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetDeclare(PRBool aDeclare) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString height; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetHeight(nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetHeight(const nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long hspace; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetHspace(PRInt32 *aHspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetHspace(PRInt32 aHspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString standby; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetStandby(nsAString & aStandby) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetStandby(const nsAString & aStandby) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long tabIndex; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetTabIndex(PRInt32 *aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetTabIndex(PRInt32 aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString useMap; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetUseMap(nsAString & aUseMap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetUseMap(const nsAString & aUseMap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long vspace; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetVspace(PRInt32 *aVspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetVspace(PRInt32 aVspace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString width; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetWidth(nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLObjectElement::SetWidth(const nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMDocument contentDocument; */ +NS_IMETHODIMP nsDOMHTMLObjectElement::GetContentDocument(nsIDOMDocument * *aContentDocument) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLObjectElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptGroupElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptGroupElement.h new file mode 100644 index 00000000..9d9e4823 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptGroupElement.h @@ -0,0 +1,126 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLOptGroupElement.idl + */ + +#ifndef __gen_nsIDOMHTMLOptGroupElement_h__ +#define __gen_nsIDOMHTMLOptGroupElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLOptGroupElement */ +#define NS_IDOMHTMLOPTGROUPELEMENT_IID_STR "a6cf9091-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLOPTGROUPELEMENT_IID \ + {0xa6cf9091, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLOptGroupElement interface is the interface to a + * [X]HTML optgroup element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLOptGroupElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLOPTGROUPELEMENT_IID) + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* attribute DOMString label; */ + NS_IMETHOD GetLabel(nsAString & aLabel) = 0; + NS_IMETHOD SetLabel(const nsAString & aLabel) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLOPTGROUPELEMENT \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetLabel(nsAString & aLabel); \ + NS_IMETHOD SetLabel(const nsAString & aLabel); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLOPTGROUPELEMENT(_to) \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetLabel(nsAString & aLabel) { return _to GetLabel(aLabel); } \ + NS_IMETHOD SetLabel(const nsAString & aLabel) { return _to SetLabel(aLabel); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLOPTGROUPELEMENT(_to) \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetLabel(nsAString & aLabel) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLabel(aLabel); } \ + NS_IMETHOD SetLabel(const nsAString & aLabel) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLabel(aLabel); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLOptGroupElement : public nsIDOMHTMLOptGroupElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLOPTGROUPELEMENT + + nsDOMHTMLOptGroupElement(); + +private: + ~nsDOMHTMLOptGroupElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLOptGroupElement, nsIDOMHTMLOptGroupElement) + +nsDOMHTMLOptGroupElement::nsDOMHTMLOptGroupElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLOptGroupElement::~nsDOMHTMLOptGroupElement() +{ + /* destructor code */ +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMHTMLOptGroupElement::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOptGroupElement::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString label; */ +NS_IMETHODIMP nsDOMHTMLOptGroupElement::GetLabel(nsAString & aLabel) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOptGroupElement::SetLabel(const nsAString & aLabel) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLOptGroupElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptionElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptionElement.h new file mode 100644 index 00000000..519a6074 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptionElement.h @@ -0,0 +1,222 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLOptionElement.idl + */ + +#ifndef __gen_nsIDOMHTMLOptionElement_h__ +#define __gen_nsIDOMHTMLOptionElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLOptionElement */ +#define NS_IDOMHTMLOPTIONELEMENT_IID_STR "a6cf9092-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLOPTIONELEMENT_IID \ + {0xa6cf9092, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLOptionElement interface is the interface to a [X]HTML + * option element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLOptionElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLOPTIONELEMENT_IID) + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* attribute boolean defaultSelected; */ + NS_IMETHOD GetDefaultSelected(PRBool *aDefaultSelected) = 0; + NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected) = 0; + + /* readonly attribute DOMString text; */ + NS_IMETHOD GetText(nsAString & aText) = 0; + + /* readonly attribute long index; */ + NS_IMETHOD GetIndex(PRInt32 *aIndex) = 0; + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* attribute DOMString label; */ + NS_IMETHOD GetLabel(nsAString & aLabel) = 0; + NS_IMETHOD SetLabel(const nsAString & aLabel) = 0; + + /* attribute boolean selected; */ + NS_IMETHOD GetSelected(PRBool *aSelected) = 0; + NS_IMETHOD SetSelected(PRBool aSelected) = 0; + + /* attribute DOMString value; */ + NS_IMETHOD GetValue(nsAString & aValue) = 0; + NS_IMETHOD SetValue(const nsAString & aValue) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLOPTIONELEMENT \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetDefaultSelected(PRBool *aDefaultSelected); \ + NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected); \ + NS_IMETHOD GetText(nsAString & aText); \ + NS_IMETHOD GetIndex(PRInt32 *aIndex); \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetLabel(nsAString & aLabel); \ + NS_IMETHOD SetLabel(const nsAString & aLabel); \ + NS_IMETHOD GetSelected(PRBool *aSelected); \ + NS_IMETHOD SetSelected(PRBool aSelected); \ + NS_IMETHOD GetValue(nsAString & aValue); \ + NS_IMETHOD SetValue(const nsAString & aValue); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLOPTIONELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetDefaultSelected(PRBool *aDefaultSelected) { return _to GetDefaultSelected(aDefaultSelected); } \ + NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected) { return _to SetDefaultSelected(aDefaultSelected); } \ + NS_IMETHOD GetText(nsAString & aText) { return _to GetText(aText); } \ + NS_IMETHOD GetIndex(PRInt32 *aIndex) { return _to GetIndex(aIndex); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetLabel(nsAString & aLabel) { return _to GetLabel(aLabel); } \ + NS_IMETHOD SetLabel(const nsAString & aLabel) { return _to SetLabel(aLabel); } \ + NS_IMETHOD GetSelected(PRBool *aSelected) { return _to GetSelected(aSelected); } \ + NS_IMETHOD SetSelected(PRBool aSelected) { return _to SetSelected(aSelected); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLOPTIONELEMENT(_to) \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetDefaultSelected(PRBool *aDefaultSelected) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultSelected(aDefaultSelected); } \ + NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultSelected(aDefaultSelected); } \ + NS_IMETHOD GetText(nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetText(aText); } \ + NS_IMETHOD GetIndex(PRInt32 *aIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndex(aIndex); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetLabel(nsAString & aLabel) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLabel(aLabel); } \ + NS_IMETHOD SetLabel(const nsAString & aLabel) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLabel(aLabel); } \ + NS_IMETHOD GetSelected(PRBool *aSelected) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelected(aSelected); } \ + NS_IMETHOD SetSelected(PRBool aSelected) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSelected(aSelected); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLOptionElement : public nsIDOMHTMLOptionElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLOPTIONELEMENT + + nsDOMHTMLOptionElement(); + +private: + ~nsDOMHTMLOptionElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLOptionElement, nsIDOMHTMLOptionElement) + +nsDOMHTMLOptionElement::nsDOMHTMLOptionElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLOptionElement::~nsDOMHTMLOptionElement() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLOptionElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean defaultSelected; */ +NS_IMETHODIMP nsDOMHTMLOptionElement::GetDefaultSelected(PRBool *aDefaultSelected) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOptionElement::SetDefaultSelected(PRBool aDefaultSelected) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString text; */ +NS_IMETHODIMP nsDOMHTMLOptionElement::GetText(nsAString & aText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long index; */ +NS_IMETHODIMP nsDOMHTMLOptionElement::GetIndex(PRInt32 *aIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMHTMLOptionElement::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOptionElement::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString label; */ +NS_IMETHODIMP nsDOMHTMLOptionElement::GetLabel(nsAString & aLabel) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOptionElement::SetLabel(const nsAString & aLabel) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean selected; */ +NS_IMETHODIMP nsDOMHTMLOptionElement::GetSelected(PRBool *aSelected) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOptionElement::SetSelected(PRBool aSelected) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString value; */ +NS_IMETHODIMP nsDOMHTMLOptionElement::GetValue(nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOptionElement::SetValue(const nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLOptionElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptionsCollection.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptionsCollection.h new file mode 100644 index 00000000..e3f7da16 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLOptionsCollection.h @@ -0,0 +1,130 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLOptionsCollection.idl + */ + +#ifndef __gen_nsIDOMHTMLOptionsCollection_h__ +#define __gen_nsIDOMHTMLOptionsCollection_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLOptionsCollection */ +#define NS_IDOMHTMLOPTIONSCOLLECTION_IID_STR "bce0213c-f70f-488f-b93f-688acca55d63" + +#define NS_IDOMHTMLOPTIONSCOLLECTION_IID \ + {0xbce0213c, 0xf70f, 0x488f, \ + { 0xb9, 0x3f, 0x68, 0x8a, 0xcc, 0xa5, 0x5d, 0x63 }} + +/** + * The nsIDOMHTMLOptionsCollection interface is the interface to a + * collection of [X]HTML option elements. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLOptionsCollection : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLOPTIONSCOLLECTION_IID) + + /* attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + NS_IMETHOD SetLength(PRUint32 aLength) = 0; + + /* nsIDOMNode item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode namedItem (in DOMString name); */ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLOPTIONSCOLLECTION \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD SetLength(PRUint32 aLength); \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval); \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLOPTIONSCOLLECTION(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD SetLength(PRUint32 aLength) { return _to SetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return _to Item(index, _retval); } \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) { return _to NamedItem(name, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLOPTIONSCOLLECTION(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD SetLength(PRUint32 aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NamedItem(name, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLOptionsCollection : public nsIDOMHTMLOptionsCollection +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLOPTIONSCOLLECTION + + nsDOMHTMLOptionsCollection(); + +private: + ~nsDOMHTMLOptionsCollection(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLOptionsCollection, nsIDOMHTMLOptionsCollection) + +nsDOMHTMLOptionsCollection::nsDOMHTMLOptionsCollection() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLOptionsCollection::~nsDOMHTMLOptionsCollection() +{ + /* destructor code */ +} + +/* attribute unsigned long length; */ +NS_IMETHODIMP nsDOMHTMLOptionsCollection::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLOptionsCollection::SetLength(PRUint32 aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode item (in unsigned long index); */ +NS_IMETHODIMP nsDOMHTMLOptionsCollection::Item(PRUint32 index, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode namedItem (in DOMString name); */ +NS_IMETHODIMP nsDOMHTMLOptionsCollection::NamedItem(const nsAString & name, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLOptionsCollection_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLParagraphElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLParagraphElement.h new file mode 100644 index 00000000..4f13be37 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLParagraphElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLParagraphElement.idl + */ + +#ifndef __gen_nsIDOMHTMLParagraphElement_h__ +#define __gen_nsIDOMHTMLParagraphElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLParagraphElement */ +#define NS_IDOMHTMLPARAGRAPHELEMENT_IID_STR "a6cf90a1-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLPARAGRAPHELEMENT_IID \ + {0xa6cf90a1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLParagraphElement interface is the interface to a + * [X]HTML p element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLParagraphElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLPARAGRAPHELEMENT_IID) + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLPARAGRAPHELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLPARAGRAPHELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLPARAGRAPHELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLParagraphElement : public nsIDOMHTMLParagraphElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLPARAGRAPHELEMENT + + nsDOMHTMLParagraphElement(); + +private: + ~nsDOMHTMLParagraphElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLParagraphElement, nsIDOMHTMLParagraphElement) + +nsDOMHTMLParagraphElement::nsDOMHTMLParagraphElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLParagraphElement::~nsDOMHTMLParagraphElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLParagraphElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLParagraphElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLParagraphElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLParamElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLParamElement.h new file mode 100644 index 00000000..d864a943 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLParamElement.h @@ -0,0 +1,166 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLParamElement.idl + */ + +#ifndef __gen_nsIDOMHTMLParamElement_h__ +#define __gen_nsIDOMHTMLParamElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLParamElement */ +#define NS_IDOMHTMLPARAMELEMENT_IID_STR "a6cf90ad-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLPARAMELEMENT_IID \ + {0xa6cf90ad, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLParamElement interface is the interface to a [X]HTML + * param element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLParamElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLPARAMELEMENT_IID) + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + + /* attribute DOMString value; */ + NS_IMETHOD GetValue(nsAString & aValue) = 0; + NS_IMETHOD SetValue(const nsAString & aValue) = 0; + + /* attribute DOMString valueType; */ + NS_IMETHOD GetValueType(nsAString & aValueType) = 0; + NS_IMETHOD SetValueType(const nsAString & aValueType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLPARAMELEMENT \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); \ + NS_IMETHOD GetValue(nsAString & aValue); \ + NS_IMETHOD SetValue(const nsAString & aValue); \ + NS_IMETHOD GetValueType(nsAString & aValueType); \ + NS_IMETHOD SetValueType(const nsAString & aValueType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLPARAMELEMENT(_to) \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } \ + NS_IMETHOD GetValueType(nsAString & aValueType) { return _to GetValueType(aValueType); } \ + NS_IMETHOD SetValueType(const nsAString & aValueType) { return _to SetValueType(aValueType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLPARAMELEMENT(_to) \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } \ + NS_IMETHOD GetValueType(nsAString & aValueType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValueType(aValueType); } \ + NS_IMETHOD SetValueType(const nsAString & aValueType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValueType(aValueType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLParamElement : public nsIDOMHTMLParamElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLPARAMELEMENT + + nsDOMHTMLParamElement(); + +private: + ~nsDOMHTMLParamElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLParamElement, nsIDOMHTMLParamElement) + +nsDOMHTMLParamElement::nsDOMHTMLParamElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLParamElement::~nsDOMHTMLParamElement() +{ + /* destructor code */ +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLParamElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLParamElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLParamElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLParamElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString value; */ +NS_IMETHODIMP nsDOMHTMLParamElement::GetValue(nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLParamElement::SetValue(const nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString valueType; */ +NS_IMETHODIMP nsDOMHTMLParamElement::GetValueType(nsAString & aValueType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLParamElement::SetValueType(const nsAString & aValueType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLParamElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLPreElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLPreElement.h new file mode 100644 index 00000000..b4e92e74 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLPreElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLPreElement.idl + */ + +#ifndef __gen_nsIDOMHTMLPreElement_h__ +#define __gen_nsIDOMHTMLPreElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLPreElement */ +#define NS_IDOMHTMLPREELEMENT_IID_STR "a6cf90a4-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLPREELEMENT_IID \ + {0xa6cf90a4, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLPreElement interface is the interface to a [X]HTML + * pre element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLPreElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLPREELEMENT_IID) + + /* attribute long width; */ + NS_IMETHOD GetWidth(PRInt32 *aWidth) = 0; + NS_IMETHOD SetWidth(PRInt32 aWidth) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLPREELEMENT \ + NS_IMETHOD GetWidth(PRInt32 *aWidth); \ + NS_IMETHOD SetWidth(PRInt32 aWidth); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLPREELEMENT(_to) \ + NS_IMETHOD GetWidth(PRInt32 *aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(PRInt32 aWidth) { return _to SetWidth(aWidth); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLPREELEMENT(_to) \ + NS_IMETHOD GetWidth(PRInt32 *aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(PRInt32 aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLPreElement : public nsIDOMHTMLPreElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLPREELEMENT + + nsDOMHTMLPreElement(); + +private: + ~nsDOMHTMLPreElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLPreElement, nsIDOMHTMLPreElement) + +nsDOMHTMLPreElement::nsDOMHTMLPreElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLPreElement::~nsDOMHTMLPreElement() +{ + /* destructor code */ +} + +/* attribute long width; */ +NS_IMETHODIMP nsDOMHTMLPreElement::GetWidth(PRInt32 *aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLPreElement::SetWidth(PRInt32 aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLPreElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLQuoteElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLQuoteElement.h new file mode 100644 index 00000000..ad94bc98 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLQuoteElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLQuoteElement.idl + */ + +#ifndef __gen_nsIDOMHTMLQuoteElement_h__ +#define __gen_nsIDOMHTMLQuoteElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLQuoteElement */ +#define NS_IDOMHTMLQUOTEELEMENT_IID_STR "a6cf90a3-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLQUOTEELEMENT_IID \ + {0xa6cf90a3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLQuoteElement interface is the interface to a [X]HTML + * q element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLQuoteElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLQUOTEELEMENT_IID) + + /* attribute DOMString cite; */ + NS_IMETHOD GetCite(nsAString & aCite) = 0; + NS_IMETHOD SetCite(const nsAString & aCite) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLQUOTEELEMENT \ + NS_IMETHOD GetCite(nsAString & aCite); \ + NS_IMETHOD SetCite(const nsAString & aCite); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLQUOTEELEMENT(_to) \ + NS_IMETHOD GetCite(nsAString & aCite) { return _to GetCite(aCite); } \ + NS_IMETHOD SetCite(const nsAString & aCite) { return _to SetCite(aCite); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLQUOTEELEMENT(_to) \ + NS_IMETHOD GetCite(nsAString & aCite) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCite(aCite); } \ + NS_IMETHOD SetCite(const nsAString & aCite) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCite(aCite); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLQuoteElement : public nsIDOMHTMLQuoteElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLQUOTEELEMENT + + nsDOMHTMLQuoteElement(); + +private: + ~nsDOMHTMLQuoteElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLQuoteElement, nsIDOMHTMLQuoteElement) + +nsDOMHTMLQuoteElement::nsDOMHTMLQuoteElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLQuoteElement::~nsDOMHTMLQuoteElement() +{ + /* destructor code */ +} + +/* attribute DOMString cite; */ +NS_IMETHODIMP nsDOMHTMLQuoteElement::GetCite(nsAString & aCite) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLQuoteElement::SetCite(const nsAString & aCite) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLQuoteElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLScriptElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLScriptElement.h new file mode 100644 index 00000000..895d5b47 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLScriptElement.h @@ -0,0 +1,226 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLScriptElement.idl + */ + +#ifndef __gen_nsIDOMHTMLScriptElement_h__ +#define __gen_nsIDOMHTMLScriptElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLScriptElement */ +#define NS_IDOMHTMLSCRIPTELEMENT_IID_STR "a6cf90b1-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLSCRIPTELEMENT_IID \ + {0xa6cf90b1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLScriptElement interface is the interface to a [X]HTML + * script element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLScriptElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLSCRIPTELEMENT_IID) + + /* attribute DOMString text; */ + NS_IMETHOD GetText(nsAString & aText) = 0; + NS_IMETHOD SetText(const nsAString & aText) = 0; + + /* attribute DOMString htmlFor; */ + NS_IMETHOD GetHtmlFor(nsAString & aHtmlFor) = 0; + NS_IMETHOD SetHtmlFor(const nsAString & aHtmlFor) = 0; + + /* attribute DOMString event; */ + NS_IMETHOD GetEvent(nsAString & aEvent) = 0; + NS_IMETHOD SetEvent(const nsAString & aEvent) = 0; + + /* attribute DOMString charset; */ + NS_IMETHOD GetCharset(nsAString & aCharset) = 0; + NS_IMETHOD SetCharset(const nsAString & aCharset) = 0; + + /* attribute boolean defer; */ + NS_IMETHOD GetDefer(PRBool *aDefer) = 0; + NS_IMETHOD SetDefer(PRBool aDefer) = 0; + + /* attribute DOMString src; */ + NS_IMETHOD GetSrc(nsAString & aSrc) = 0; + NS_IMETHOD SetSrc(const nsAString & aSrc) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLSCRIPTELEMENT \ + NS_IMETHOD GetText(nsAString & aText); \ + NS_IMETHOD SetText(const nsAString & aText); \ + NS_IMETHOD GetHtmlFor(nsAString & aHtmlFor); \ + NS_IMETHOD SetHtmlFor(const nsAString & aHtmlFor); \ + NS_IMETHOD GetEvent(nsAString & aEvent); \ + NS_IMETHOD SetEvent(const nsAString & aEvent); \ + NS_IMETHOD GetCharset(nsAString & aCharset); \ + NS_IMETHOD SetCharset(const nsAString & aCharset); \ + NS_IMETHOD GetDefer(PRBool *aDefer); \ + NS_IMETHOD SetDefer(PRBool aDefer); \ + NS_IMETHOD GetSrc(nsAString & aSrc); \ + NS_IMETHOD SetSrc(const nsAString & aSrc); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLSCRIPTELEMENT(_to) \ + NS_IMETHOD GetText(nsAString & aText) { return _to GetText(aText); } \ + NS_IMETHOD SetText(const nsAString & aText) { return _to SetText(aText); } \ + NS_IMETHOD GetHtmlFor(nsAString & aHtmlFor) { return _to GetHtmlFor(aHtmlFor); } \ + NS_IMETHOD SetHtmlFor(const nsAString & aHtmlFor) { return _to SetHtmlFor(aHtmlFor); } \ + NS_IMETHOD GetEvent(nsAString & aEvent) { return _to GetEvent(aEvent); } \ + NS_IMETHOD SetEvent(const nsAString & aEvent) { return _to SetEvent(aEvent); } \ + NS_IMETHOD GetCharset(nsAString & aCharset) { return _to GetCharset(aCharset); } \ + NS_IMETHOD SetCharset(const nsAString & aCharset) { return _to SetCharset(aCharset); } \ + NS_IMETHOD GetDefer(PRBool *aDefer) { return _to GetDefer(aDefer); } \ + NS_IMETHOD SetDefer(PRBool aDefer) { return _to SetDefer(aDefer); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return _to GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return _to SetSrc(aSrc); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLSCRIPTELEMENT(_to) \ + NS_IMETHOD GetText(nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetText(aText); } \ + NS_IMETHOD SetText(const nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetText(aText); } \ + NS_IMETHOD GetHtmlFor(nsAString & aHtmlFor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHtmlFor(aHtmlFor); } \ + NS_IMETHOD SetHtmlFor(const nsAString & aHtmlFor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHtmlFor(aHtmlFor); } \ + NS_IMETHOD GetEvent(nsAString & aEvent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEvent(aEvent); } \ + NS_IMETHOD SetEvent(const nsAString & aEvent) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEvent(aEvent); } \ + NS_IMETHOD GetCharset(nsAString & aCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharset(aCharset); } \ + NS_IMETHOD SetCharset(const nsAString & aCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCharset(aCharset); } \ + NS_IMETHOD GetDefer(PRBool *aDefer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefer(aDefer); } \ + NS_IMETHOD SetDefer(PRBool aDefer) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefer(aDefer); } \ + NS_IMETHOD GetSrc(nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSrc(aSrc); } \ + NS_IMETHOD SetSrc(const nsAString & aSrc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSrc(aSrc); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLScriptElement : public nsIDOMHTMLScriptElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLSCRIPTELEMENT + + nsDOMHTMLScriptElement(); + +private: + ~nsDOMHTMLScriptElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLScriptElement, nsIDOMHTMLScriptElement) + +nsDOMHTMLScriptElement::nsDOMHTMLScriptElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLScriptElement::~nsDOMHTMLScriptElement() +{ + /* destructor code */ +} + +/* attribute DOMString text; */ +NS_IMETHODIMP nsDOMHTMLScriptElement::GetText(nsAString & aText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLScriptElement::SetText(const nsAString & aText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString htmlFor; */ +NS_IMETHODIMP nsDOMHTMLScriptElement::GetHtmlFor(nsAString & aHtmlFor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLScriptElement::SetHtmlFor(const nsAString & aHtmlFor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString event; */ +NS_IMETHODIMP nsDOMHTMLScriptElement::GetEvent(nsAString & aEvent) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLScriptElement::SetEvent(const nsAString & aEvent) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString charset; */ +NS_IMETHODIMP nsDOMHTMLScriptElement::GetCharset(nsAString & aCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLScriptElement::SetCharset(const nsAString & aCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean defer; */ +NS_IMETHODIMP nsDOMHTMLScriptElement::GetDefer(PRBool *aDefer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLScriptElement::SetDefer(PRBool aDefer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString src; */ +NS_IMETHODIMP nsDOMHTMLScriptElement::GetSrc(nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLScriptElement::SetSrc(const nsAString & aSrc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLScriptElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLScriptElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLScriptElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLSelectElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLSelectElement.h new file mode 100644 index 00000000..73259816 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLSelectElement.h @@ -0,0 +1,334 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLSelectElement.idl + */ + +#ifndef __gen_nsIDOMHTMLSelectElement_h__ +#define __gen_nsIDOMHTMLSelectElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +#ifndef __gen_nsIDOMHTMLOptionsCollection_h__ +#include "nsIDOMHTMLOptionsCollection.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLSelectElement */ +#define NS_IDOMHTMLSELECTELEMENT_IID_STR "a6cf9090-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLSELECTELEMENT_IID \ + {0xa6cf9090, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLSelectElement interface is the interface to a [X]HTML + * select element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLSelectElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLSELECTELEMENT_IID) + + /* readonly attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + + /* attribute long selectedIndex; */ + NS_IMETHOD GetSelectedIndex(PRInt32 *aSelectedIndex) = 0; + NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex) = 0; + + /* attribute DOMString value; */ + NS_IMETHOD GetValue(nsAString & aValue) = 0; + NS_IMETHOD SetValue(const nsAString & aValue) = 0; + + /* attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + NS_IMETHOD SetLength(PRUint32 aLength) = 0; + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* readonly attribute nsIDOMHTMLOptionsCollection options; */ + NS_IMETHOD GetOptions(nsIDOMHTMLOptionsCollection * *aOptions) = 0; + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* attribute boolean multiple; */ + NS_IMETHOD GetMultiple(PRBool *aMultiple) = 0; + NS_IMETHOD SetMultiple(PRBool aMultiple) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute long size; */ + NS_IMETHOD GetSize(PRInt32 *aSize) = 0; + NS_IMETHOD SetSize(PRInt32 aSize) = 0; + + /* attribute long tabIndex; */ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) = 0; + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) = 0; + + /* void add (in nsIDOMHTMLElement element, in nsIDOMHTMLElement before) raises (DOMException); */ + NS_IMETHOD Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before) = 0; + + /* void remove (in long index); */ + NS_IMETHOD Remove(PRInt32 index) = 0; + + /* void blur (); */ + NS_IMETHOD Blur(void) = 0; + + /* void focus (); */ + NS_IMETHOD Focus(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLSELECTELEMENT \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD GetSelectedIndex(PRInt32 *aSelectedIndex); \ + NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex); \ + NS_IMETHOD GetValue(nsAString & aValue); \ + NS_IMETHOD SetValue(const nsAString & aValue); \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD SetLength(PRUint32 aLength); \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetOptions(nsIDOMHTMLOptionsCollection * *aOptions); \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetMultiple(PRBool *aMultiple); \ + NS_IMETHOD SetMultiple(PRBool aMultiple); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetSize(PRInt32 *aSize); \ + NS_IMETHOD SetSize(PRInt32 aSize); \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex); \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ + NS_IMETHOD Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before); \ + NS_IMETHOD Remove(PRInt32 index); \ + NS_IMETHOD Blur(void); \ + NS_IMETHOD Focus(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLSELECTELEMENT(_to) \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD GetSelectedIndex(PRInt32 *aSelectedIndex) { return _to GetSelectedIndex(aSelectedIndex); } \ + NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex) { return _to SetSelectedIndex(aSelectedIndex); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD SetLength(PRUint32 aLength) { return _to SetLength(aLength); } \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetOptions(nsIDOMHTMLOptionsCollection * *aOptions) { return _to GetOptions(aOptions); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetMultiple(PRBool *aMultiple) { return _to GetMultiple(aMultiple); } \ + NS_IMETHOD SetMultiple(PRBool aMultiple) { return _to SetMultiple(aMultiple); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetSize(PRInt32 *aSize) { return _to GetSize(aSize); } \ + NS_IMETHOD SetSize(PRInt32 aSize) { return _to SetSize(aSize); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return _to GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to SetTabIndex(aTabIndex); } \ + NS_IMETHOD Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before) { return _to Add(element, before); } \ + NS_IMETHOD Remove(PRInt32 index) { return _to Remove(index); } \ + NS_IMETHOD Blur(void) { return _to Blur(); } \ + NS_IMETHOD Focus(void) { return _to Focus(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLSELECTELEMENT(_to) \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD GetSelectedIndex(PRInt32 *aSelectedIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectedIndex(aSelectedIndex); } \ + NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSelectedIndex(aSelectedIndex); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD SetLength(PRUint32 aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLength(aLength); } \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetOptions(nsIDOMHTMLOptionsCollection * *aOptions) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOptions(aOptions); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetMultiple(PRBool *aMultiple) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMultiple(aMultiple); } \ + NS_IMETHOD SetMultiple(PRBool aMultiple) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMultiple(aMultiple); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetSize(PRInt32 *aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \ + NS_IMETHOD SetSize(PRInt32 aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSize(aSize); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTabIndex(aTabIndex); } \ + NS_IMETHOD Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before) { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(element, before); } \ + NS_IMETHOD Remove(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(index); } \ + NS_IMETHOD Blur(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Blur(); } \ + NS_IMETHOD Focus(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Focus(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLSelectElement : public nsIDOMHTMLSelectElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLSELECTELEMENT + + nsDOMHTMLSelectElement(); + +private: + ~nsDOMHTMLSelectElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLSelectElement, nsIDOMHTMLSelectElement) + +nsDOMHTMLSelectElement::nsDOMHTMLSelectElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLSelectElement::~nsDOMHTMLSelectElement() +{ + /* destructor code */ +} + +/* readonly attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long selectedIndex; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetSelectedIndex(PRInt32 *aSelectedIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLSelectElement::SetSelectedIndex(PRInt32 aSelectedIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString value; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetValue(nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLSelectElement::SetValue(const nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute unsigned long length; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLSelectElement::SetLength(PRUint32 aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLOptionsCollection options; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetOptions(nsIDOMHTMLOptionsCollection * *aOptions) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLSelectElement::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean multiple; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetMultiple(PRBool *aMultiple) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLSelectElement::SetMultiple(PRBool aMultiple) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLSelectElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long size; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetSize(PRInt32 *aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLSelectElement::SetSize(PRInt32 aSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long tabIndex; */ +NS_IMETHODIMP nsDOMHTMLSelectElement::GetTabIndex(PRInt32 *aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLSelectElement::SetTabIndex(PRInt32 aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void add (in nsIDOMHTMLElement element, in nsIDOMHTMLElement before) raises (DOMException); */ +NS_IMETHODIMP nsDOMHTMLSelectElement::Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void remove (in long index); */ +NS_IMETHODIMP nsDOMHTMLSelectElement::Remove(PRInt32 index) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void blur (); */ +NS_IMETHODIMP nsDOMHTMLSelectElement::Blur() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void focus (); */ +NS_IMETHODIMP nsDOMHTMLSelectElement::Focus() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLSelectElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLStyleElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLStyleElement.h new file mode 100644 index 00000000..b9820a59 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLStyleElement.h @@ -0,0 +1,146 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLStyleElement.idl + */ + +#ifndef __gen_nsIDOMHTMLStyleElement_h__ +#define __gen_nsIDOMHTMLStyleElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLStyleElement */ +#define NS_IDOMHTMLSTYLEELEMENT_IID_STR "a6cf908d-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLSTYLEELEMENT_IID \ + {0xa6cf908d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLStyleElement interface is the interface to a [X]HTML + * style element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLStyleElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLSTYLEELEMENT_IID) + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* attribute DOMString media; */ + NS_IMETHOD GetMedia(nsAString & aMedia) = 0; + NS_IMETHOD SetMedia(const nsAString & aMedia) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLSTYLEELEMENT \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetMedia(nsAString & aMedia); \ + NS_IMETHOD SetMedia(const nsAString & aMedia); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLSTYLEELEMENT(_to) \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetMedia(nsAString & aMedia) { return _to GetMedia(aMedia); } \ + NS_IMETHOD SetMedia(const nsAString & aMedia) { return _to SetMedia(aMedia); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLSTYLEELEMENT(_to) \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetMedia(nsAString & aMedia) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMedia(aMedia); } \ + NS_IMETHOD SetMedia(const nsAString & aMedia) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMedia(aMedia); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLStyleElement : public nsIDOMHTMLStyleElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLSTYLEELEMENT + + nsDOMHTMLStyleElement(); + +private: + ~nsDOMHTMLStyleElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLStyleElement, nsIDOMHTMLStyleElement) + +nsDOMHTMLStyleElement::nsDOMHTMLStyleElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLStyleElement::~nsDOMHTMLStyleElement() +{ + /* destructor code */ +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMHTMLStyleElement::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLStyleElement::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString media; */ +NS_IMETHODIMP nsDOMHTMLStyleElement::GetMedia(nsAString & aMedia) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLStyleElement::SetMedia(const nsAString & aMedia) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLStyleElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLStyleElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLStyleElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableCaptionElem.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableCaptionElem.h new file mode 100644 index 00000000..3bddb6bf --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableCaptionElem.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLTableCaptionElem.idl + */ + +#ifndef __gen_nsIDOMHTMLTableCaptionElem_h__ +#define __gen_nsIDOMHTMLTableCaptionElem_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLTableCaptionElement */ +#define NS_IDOMHTMLTABLECAPTIONELEMENT_IID_STR "a6cf90b3-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLTABLECAPTIONELEMENT_IID \ + {0xa6cf90b3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMHTMLTableCaptionElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLTABLECAPTIONELEMENT_IID) + + /** + * The nsIDOMHTMLTableCaptionElement interface is the interface to a + * [X]HTML caption element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLTABLECAPTIONELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLTABLECAPTIONELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLTABLECAPTIONELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLTableCaptionElement : public nsIDOMHTMLTableCaptionElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLTABLECAPTIONELEMENT + + nsDOMHTMLTableCaptionElement(); + +private: + ~nsDOMHTMLTableCaptionElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLTableCaptionElement, nsIDOMHTMLTableCaptionElement) + +nsDOMHTMLTableCaptionElement::nsDOMHTMLTableCaptionElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLTableCaptionElement::~nsDOMHTMLTableCaptionElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLTableCaptionElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCaptionElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLTableCaptionElem_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableCellElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableCellElement.h new file mode 100644 index 00000000..b7c1b955 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableCellElement.h @@ -0,0 +1,378 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLTableCellElement.idl + */ + +#ifndef __gen_nsIDOMHTMLTableCellElement_h__ +#define __gen_nsIDOMHTMLTableCellElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLTableCellElement */ +#define NS_IDOMHTMLTABLECELLELEMENT_IID_STR "a6cf90b7-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLTABLECELLELEMENT_IID \ + {0xa6cf90b7, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLTableCellElement interface is the interface to a + * [X]HTML td element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLTableCellElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLTABLECELLELEMENT_IID) + + /* readonly attribute long cellIndex; */ + NS_IMETHOD GetCellIndex(PRInt32 *aCellIndex) = 0; + + /* attribute DOMString abbr; */ + NS_IMETHOD GetAbbr(nsAString & aAbbr) = 0; + NS_IMETHOD SetAbbr(const nsAString & aAbbr) = 0; + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString axis; */ + NS_IMETHOD GetAxis(nsAString & aAxis) = 0; + NS_IMETHOD SetAxis(const nsAString & aAxis) = 0; + + /* attribute DOMString bgColor; */ + NS_IMETHOD GetBgColor(nsAString & aBgColor) = 0; + NS_IMETHOD SetBgColor(const nsAString & aBgColor) = 0; + + /* attribute DOMString ch; */ + NS_IMETHOD GetCh(nsAString & aCh) = 0; + NS_IMETHOD SetCh(const nsAString & aCh) = 0; + + /* attribute DOMString chOff; */ + NS_IMETHOD GetChOff(nsAString & aChOff) = 0; + NS_IMETHOD SetChOff(const nsAString & aChOff) = 0; + + /* attribute long colSpan; */ + NS_IMETHOD GetColSpan(PRInt32 *aColSpan) = 0; + NS_IMETHOD SetColSpan(PRInt32 aColSpan) = 0; + + /* attribute DOMString headers; */ + NS_IMETHOD GetHeaders(nsAString & aHeaders) = 0; + NS_IMETHOD SetHeaders(const nsAString & aHeaders) = 0; + + /* attribute DOMString height; */ + NS_IMETHOD GetHeight(nsAString & aHeight) = 0; + NS_IMETHOD SetHeight(const nsAString & aHeight) = 0; + + /* attribute boolean noWrap; */ + NS_IMETHOD GetNoWrap(PRBool *aNoWrap) = 0; + NS_IMETHOD SetNoWrap(PRBool aNoWrap) = 0; + + /* attribute long rowSpan; */ + NS_IMETHOD GetRowSpan(PRInt32 *aRowSpan) = 0; + NS_IMETHOD SetRowSpan(PRInt32 aRowSpan) = 0; + + /* attribute DOMString scope; */ + NS_IMETHOD GetScope(nsAString & aScope) = 0; + NS_IMETHOD SetScope(const nsAString & aScope) = 0; + + /* attribute DOMString vAlign; */ + NS_IMETHOD GetVAlign(nsAString & aVAlign) = 0; + NS_IMETHOD SetVAlign(const nsAString & aVAlign) = 0; + + /* attribute DOMString width; */ + NS_IMETHOD GetWidth(nsAString & aWidth) = 0; + NS_IMETHOD SetWidth(const nsAString & aWidth) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLTABLECELLELEMENT \ + NS_IMETHOD GetCellIndex(PRInt32 *aCellIndex); \ + NS_IMETHOD GetAbbr(nsAString & aAbbr); \ + NS_IMETHOD SetAbbr(const nsAString & aAbbr); \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetAxis(nsAString & aAxis); \ + NS_IMETHOD SetAxis(const nsAString & aAxis); \ + NS_IMETHOD GetBgColor(nsAString & aBgColor); \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor); \ + NS_IMETHOD GetCh(nsAString & aCh); \ + NS_IMETHOD SetCh(const nsAString & aCh); \ + NS_IMETHOD GetChOff(nsAString & aChOff); \ + NS_IMETHOD SetChOff(const nsAString & aChOff); \ + NS_IMETHOD GetColSpan(PRInt32 *aColSpan); \ + NS_IMETHOD SetColSpan(PRInt32 aColSpan); \ + NS_IMETHOD GetHeaders(nsAString & aHeaders); \ + NS_IMETHOD SetHeaders(const nsAString & aHeaders); \ + NS_IMETHOD GetHeight(nsAString & aHeight); \ + NS_IMETHOD SetHeight(const nsAString & aHeight); \ + NS_IMETHOD GetNoWrap(PRBool *aNoWrap); \ + NS_IMETHOD SetNoWrap(PRBool aNoWrap); \ + NS_IMETHOD GetRowSpan(PRInt32 *aRowSpan); \ + NS_IMETHOD SetRowSpan(PRInt32 aRowSpan); \ + NS_IMETHOD GetScope(nsAString & aScope); \ + NS_IMETHOD SetScope(const nsAString & aScope); \ + NS_IMETHOD GetVAlign(nsAString & aVAlign); \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign); \ + NS_IMETHOD GetWidth(nsAString & aWidth); \ + NS_IMETHOD SetWidth(const nsAString & aWidth); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLTABLECELLELEMENT(_to) \ + NS_IMETHOD GetCellIndex(PRInt32 *aCellIndex) { return _to GetCellIndex(aCellIndex); } \ + NS_IMETHOD GetAbbr(nsAString & aAbbr) { return _to GetAbbr(aAbbr); } \ + NS_IMETHOD SetAbbr(const nsAString & aAbbr) { return _to SetAbbr(aAbbr); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetAxis(nsAString & aAxis) { return _to GetAxis(aAxis); } \ + NS_IMETHOD SetAxis(const nsAString & aAxis) { return _to SetAxis(aAxis); } \ + NS_IMETHOD GetBgColor(nsAString & aBgColor) { return _to GetBgColor(aBgColor); } \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor) { return _to SetBgColor(aBgColor); } \ + NS_IMETHOD GetCh(nsAString & aCh) { return _to GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsAString & aCh) { return _to SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsAString & aChOff) { return _to GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsAString & aChOff) { return _to SetChOff(aChOff); } \ + NS_IMETHOD GetColSpan(PRInt32 *aColSpan) { return _to GetColSpan(aColSpan); } \ + NS_IMETHOD SetColSpan(PRInt32 aColSpan) { return _to SetColSpan(aColSpan); } \ + NS_IMETHOD GetHeaders(nsAString & aHeaders) { return _to GetHeaders(aHeaders); } \ + NS_IMETHOD SetHeaders(const nsAString & aHeaders) { return _to SetHeaders(aHeaders); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return _to GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return _to SetHeight(aHeight); } \ + NS_IMETHOD GetNoWrap(PRBool *aNoWrap) { return _to GetNoWrap(aNoWrap); } \ + NS_IMETHOD SetNoWrap(PRBool aNoWrap) { return _to SetNoWrap(aNoWrap); } \ + NS_IMETHOD GetRowSpan(PRInt32 *aRowSpan) { return _to GetRowSpan(aRowSpan); } \ + NS_IMETHOD SetRowSpan(PRInt32 aRowSpan) { return _to SetRowSpan(aRowSpan); } \ + NS_IMETHOD GetScope(nsAString & aScope) { return _to GetScope(aScope); } \ + NS_IMETHOD SetScope(const nsAString & aScope) { return _to SetScope(aScope); } \ + NS_IMETHOD GetVAlign(nsAString & aVAlign) { return _to GetVAlign(aVAlign); } \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign) { return _to SetVAlign(aVAlign); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return _to SetWidth(aWidth); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLTABLECELLELEMENT(_to) \ + NS_IMETHOD GetCellIndex(PRInt32 *aCellIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCellIndex(aCellIndex); } \ + NS_IMETHOD GetAbbr(nsAString & aAbbr) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAbbr(aAbbr); } \ + NS_IMETHOD SetAbbr(const nsAString & aAbbr) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAbbr(aAbbr); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetAxis(nsAString & aAxis) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAxis(aAxis); } \ + NS_IMETHOD SetAxis(const nsAString & aAxis) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAxis(aAxis); } \ + NS_IMETHOD GetBgColor(nsAString & aBgColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBgColor(aBgColor); } \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBgColor(aBgColor); } \ + NS_IMETHOD GetCh(nsAString & aCh) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsAString & aCh) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsAString & aChOff) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsAString & aChOff) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChOff(aChOff); } \ + NS_IMETHOD GetColSpan(PRInt32 *aColSpan) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetColSpan(aColSpan); } \ + NS_IMETHOD SetColSpan(PRInt32 aColSpan) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetColSpan(aColSpan); } \ + NS_IMETHOD GetHeaders(nsAString & aHeaders) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeaders(aHeaders); } \ + NS_IMETHOD SetHeaders(const nsAString & aHeaders) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHeaders(aHeaders); } \ + NS_IMETHOD GetHeight(nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsAString & aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHeight(aHeight); } \ + NS_IMETHOD GetNoWrap(PRBool *aNoWrap) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNoWrap(aNoWrap); } \ + NS_IMETHOD SetNoWrap(PRBool aNoWrap) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNoWrap(aNoWrap); } \ + NS_IMETHOD GetRowSpan(PRInt32 *aRowSpan) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRowSpan(aRowSpan); } \ + NS_IMETHOD SetRowSpan(PRInt32 aRowSpan) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRowSpan(aRowSpan); } \ + NS_IMETHOD GetScope(nsAString & aScope) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScope(aScope); } \ + NS_IMETHOD SetScope(const nsAString & aScope) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScope(aScope); } \ + NS_IMETHOD GetVAlign(nsAString & aVAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVAlign(aVAlign); } \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVAlign(aVAlign); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLTableCellElement : public nsIDOMHTMLTableCellElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLTABLECELLELEMENT + + nsDOMHTMLTableCellElement(); + +private: + ~nsDOMHTMLTableCellElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLTableCellElement, nsIDOMHTMLTableCellElement) + +nsDOMHTMLTableCellElement::nsDOMHTMLTableCellElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLTableCellElement::~nsDOMHTMLTableCellElement() +{ + /* destructor code */ +} + +/* readonly attribute long cellIndex; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetCellIndex(PRInt32 *aCellIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString abbr; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetAbbr(nsAString & aAbbr) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetAbbr(const nsAString & aAbbr) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString axis; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetAxis(nsAString & aAxis) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetAxis(const nsAString & aAxis) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString bgColor; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetBgColor(nsAString & aBgColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetBgColor(const nsAString & aBgColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString ch; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetCh(nsAString & aCh) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetCh(const nsAString & aCh) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString chOff; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetChOff(nsAString & aChOff) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetChOff(const nsAString & aChOff) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long colSpan; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetColSpan(PRInt32 *aColSpan) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetColSpan(PRInt32 aColSpan) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString headers; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetHeaders(nsAString & aHeaders) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetHeaders(const nsAString & aHeaders) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString height; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetHeight(nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetHeight(const nsAString & aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean noWrap; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetNoWrap(PRBool *aNoWrap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetNoWrap(PRBool aNoWrap) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long rowSpan; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetRowSpan(PRInt32 *aRowSpan) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetRowSpan(PRInt32 aRowSpan) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString scope; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetScope(nsAString & aScope) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetScope(const nsAString & aScope) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString vAlign; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetVAlign(nsAString & aVAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetVAlign(const nsAString & aVAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString width; */ +NS_IMETHODIMP nsDOMHTMLTableCellElement::GetWidth(nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableCellElement::SetWidth(const nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLTableCellElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableColElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableColElement.h new file mode 100644 index 00000000..40151e52 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableColElement.h @@ -0,0 +1,206 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLTableColElement.idl + */ + +#ifndef __gen_nsIDOMHTMLTableColElement_h__ +#define __gen_nsIDOMHTMLTableColElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLTableColElement */ +#define NS_IDOMHTMLTABLECOLELEMENT_IID_STR "a6cf90b4-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLTABLECOLELEMENT_IID \ + {0xa6cf90b4, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLTableColElement interface is the interface to a + * [X]HTML col element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLTableColElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLTABLECOLELEMENT_IID) + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString ch; */ + NS_IMETHOD GetCh(nsAString & aCh) = 0; + NS_IMETHOD SetCh(const nsAString & aCh) = 0; + + /* attribute DOMString chOff; */ + NS_IMETHOD GetChOff(nsAString & aChOff) = 0; + NS_IMETHOD SetChOff(const nsAString & aChOff) = 0; + + /* attribute long span; */ + NS_IMETHOD GetSpan(PRInt32 *aSpan) = 0; + NS_IMETHOD SetSpan(PRInt32 aSpan) = 0; + + /* attribute DOMString vAlign; */ + NS_IMETHOD GetVAlign(nsAString & aVAlign) = 0; + NS_IMETHOD SetVAlign(const nsAString & aVAlign) = 0; + + /* attribute DOMString width; */ + NS_IMETHOD GetWidth(nsAString & aWidth) = 0; + NS_IMETHOD SetWidth(const nsAString & aWidth) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLTABLECOLELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetCh(nsAString & aCh); \ + NS_IMETHOD SetCh(const nsAString & aCh); \ + NS_IMETHOD GetChOff(nsAString & aChOff); \ + NS_IMETHOD SetChOff(const nsAString & aChOff); \ + NS_IMETHOD GetSpan(PRInt32 *aSpan); \ + NS_IMETHOD SetSpan(PRInt32 aSpan); \ + NS_IMETHOD GetVAlign(nsAString & aVAlign); \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign); \ + NS_IMETHOD GetWidth(nsAString & aWidth); \ + NS_IMETHOD SetWidth(const nsAString & aWidth); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLTABLECOLELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetCh(nsAString & aCh) { return _to GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsAString & aCh) { return _to SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsAString & aChOff) { return _to GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsAString & aChOff) { return _to SetChOff(aChOff); } \ + NS_IMETHOD GetSpan(PRInt32 *aSpan) { return _to GetSpan(aSpan); } \ + NS_IMETHOD SetSpan(PRInt32 aSpan) { return _to SetSpan(aSpan); } \ + NS_IMETHOD GetVAlign(nsAString & aVAlign) { return _to GetVAlign(aVAlign); } \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign) { return _to SetVAlign(aVAlign); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return _to SetWidth(aWidth); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLTABLECOLELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetCh(nsAString & aCh) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsAString & aCh) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsAString & aChOff) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsAString & aChOff) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChOff(aChOff); } \ + NS_IMETHOD GetSpan(PRInt32 *aSpan) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSpan(aSpan); } \ + NS_IMETHOD SetSpan(PRInt32 aSpan) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSpan(aSpan); } \ + NS_IMETHOD GetVAlign(nsAString & aVAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVAlign(aVAlign); } \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVAlign(aVAlign); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLTableColElement : public nsIDOMHTMLTableColElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLTABLECOLELEMENT + + nsDOMHTMLTableColElement(); + +private: + ~nsDOMHTMLTableColElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLTableColElement, nsIDOMHTMLTableColElement) + +nsDOMHTMLTableColElement::nsDOMHTMLTableColElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLTableColElement::~nsDOMHTMLTableColElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLTableColElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableColElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString ch; */ +NS_IMETHODIMP nsDOMHTMLTableColElement::GetCh(nsAString & aCh) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableColElement::SetCh(const nsAString & aCh) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString chOff; */ +NS_IMETHODIMP nsDOMHTMLTableColElement::GetChOff(nsAString & aChOff) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableColElement::SetChOff(const nsAString & aChOff) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long span; */ +NS_IMETHODIMP nsDOMHTMLTableColElement::GetSpan(PRInt32 *aSpan) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableColElement::SetSpan(PRInt32 aSpan) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString vAlign; */ +NS_IMETHODIMP nsDOMHTMLTableColElement::GetVAlign(nsAString & aVAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableColElement::SetVAlign(const nsAString & aVAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString width; */ +NS_IMETHODIMP nsDOMHTMLTableColElement::GetWidth(nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableColElement::SetWidth(const nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLTableColElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableElement.h new file mode 100644 index 00000000..9d999d7f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableElement.h @@ -0,0 +1,446 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLTableElement.idl + */ + +#ifndef __gen_nsIDOMHTMLTableElement_h__ +#define __gen_nsIDOMHTMLTableElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLTableElement */ +#define NS_IDOMHTMLTABLEELEMENT_IID_STR "a6cf90b2-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLTABLEELEMENT_IID \ + {0xa6cf90b2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLTableElement interface is the interface to a [X]HTML + * table element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLTableElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLTABLEELEMENT_IID) + + /* attribute nsIDOMHTMLTableCaptionElement caption; */ + NS_IMETHOD GetCaption(nsIDOMHTMLTableCaptionElement * *aCaption) = 0; + NS_IMETHOD SetCaption(nsIDOMHTMLTableCaptionElement * aCaption) = 0; + + /* attribute nsIDOMHTMLTableSectionElement tHead; */ + NS_IMETHOD GetTHead(nsIDOMHTMLTableSectionElement * *aTHead) = 0; + NS_IMETHOD SetTHead(nsIDOMHTMLTableSectionElement * aTHead) = 0; + + /* attribute nsIDOMHTMLTableSectionElement tFoot; */ + NS_IMETHOD GetTFoot(nsIDOMHTMLTableSectionElement * *aTFoot) = 0; + NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement * aTFoot) = 0; + + /* readonly attribute nsIDOMHTMLCollection rows; */ + NS_IMETHOD GetRows(nsIDOMHTMLCollection * *aRows) = 0; + + /* readonly attribute nsIDOMHTMLCollection tBodies; */ + NS_IMETHOD GetTBodies(nsIDOMHTMLCollection * *aTBodies) = 0; + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString bgColor; */ + NS_IMETHOD GetBgColor(nsAString & aBgColor) = 0; + NS_IMETHOD SetBgColor(const nsAString & aBgColor) = 0; + + /* attribute DOMString border; */ + NS_IMETHOD GetBorder(nsAString & aBorder) = 0; + NS_IMETHOD SetBorder(const nsAString & aBorder) = 0; + + /* attribute DOMString cellPadding; */ + NS_IMETHOD GetCellPadding(nsAString & aCellPadding) = 0; + NS_IMETHOD SetCellPadding(const nsAString & aCellPadding) = 0; + + /* attribute DOMString cellSpacing; */ + NS_IMETHOD GetCellSpacing(nsAString & aCellSpacing) = 0; + NS_IMETHOD SetCellSpacing(const nsAString & aCellSpacing) = 0; + + /* attribute DOMString frame; */ + NS_IMETHOD GetFrame(nsAString & aFrame) = 0; + NS_IMETHOD SetFrame(const nsAString & aFrame) = 0; + + /* attribute DOMString rules; */ + NS_IMETHOD GetRules(nsAString & aRules) = 0; + NS_IMETHOD SetRules(const nsAString & aRules) = 0; + + /* attribute DOMString summary; */ + NS_IMETHOD GetSummary(nsAString & aSummary) = 0; + NS_IMETHOD SetSummary(const nsAString & aSummary) = 0; + + /* attribute DOMString width; */ + NS_IMETHOD GetWidth(nsAString & aWidth) = 0; + NS_IMETHOD SetWidth(const nsAString & aWidth) = 0; + + /* nsIDOMHTMLElement createTHead (); */ + NS_IMETHOD CreateTHead(nsIDOMHTMLElement **_retval) = 0; + + /* void deleteTHead (); */ + NS_IMETHOD DeleteTHead(void) = 0; + + /* nsIDOMHTMLElement createTFoot (); */ + NS_IMETHOD CreateTFoot(nsIDOMHTMLElement **_retval) = 0; + + /* void deleteTFoot (); */ + NS_IMETHOD DeleteTFoot(void) = 0; + + /* nsIDOMHTMLElement createCaption (); */ + NS_IMETHOD CreateCaption(nsIDOMHTMLElement **_retval) = 0; + + /* void deleteCaption (); */ + NS_IMETHOD DeleteCaption(void) = 0; + + /* nsIDOMHTMLElement insertRow (in long index) raises (DOMException); */ + NS_IMETHOD InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval) = 0; + + /* void deleteRow (in long index) raises (DOMException); */ + NS_IMETHOD DeleteRow(PRInt32 index) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLTABLEELEMENT \ + NS_IMETHOD GetCaption(nsIDOMHTMLTableCaptionElement * *aCaption); \ + NS_IMETHOD SetCaption(nsIDOMHTMLTableCaptionElement * aCaption); \ + NS_IMETHOD GetTHead(nsIDOMHTMLTableSectionElement * *aTHead); \ + NS_IMETHOD SetTHead(nsIDOMHTMLTableSectionElement * aTHead); \ + NS_IMETHOD GetTFoot(nsIDOMHTMLTableSectionElement * *aTFoot); \ + NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement * aTFoot); \ + NS_IMETHOD GetRows(nsIDOMHTMLCollection * *aRows); \ + NS_IMETHOD GetTBodies(nsIDOMHTMLCollection * *aTBodies); \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetBgColor(nsAString & aBgColor); \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor); \ + NS_IMETHOD GetBorder(nsAString & aBorder); \ + NS_IMETHOD SetBorder(const nsAString & aBorder); \ + NS_IMETHOD GetCellPadding(nsAString & aCellPadding); \ + NS_IMETHOD SetCellPadding(const nsAString & aCellPadding); \ + NS_IMETHOD GetCellSpacing(nsAString & aCellSpacing); \ + NS_IMETHOD SetCellSpacing(const nsAString & aCellSpacing); \ + NS_IMETHOD GetFrame(nsAString & aFrame); \ + NS_IMETHOD SetFrame(const nsAString & aFrame); \ + NS_IMETHOD GetRules(nsAString & aRules); \ + NS_IMETHOD SetRules(const nsAString & aRules); \ + NS_IMETHOD GetSummary(nsAString & aSummary); \ + NS_IMETHOD SetSummary(const nsAString & aSummary); \ + NS_IMETHOD GetWidth(nsAString & aWidth); \ + NS_IMETHOD SetWidth(const nsAString & aWidth); \ + NS_IMETHOD CreateTHead(nsIDOMHTMLElement **_retval); \ + NS_IMETHOD DeleteTHead(void); \ + NS_IMETHOD CreateTFoot(nsIDOMHTMLElement **_retval); \ + NS_IMETHOD DeleteTFoot(void); \ + NS_IMETHOD CreateCaption(nsIDOMHTMLElement **_retval); \ + NS_IMETHOD DeleteCaption(void); \ + NS_IMETHOD InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval); \ + NS_IMETHOD DeleteRow(PRInt32 index); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLTABLEELEMENT(_to) \ + NS_IMETHOD GetCaption(nsIDOMHTMLTableCaptionElement * *aCaption) { return _to GetCaption(aCaption); } \ + NS_IMETHOD SetCaption(nsIDOMHTMLTableCaptionElement * aCaption) { return _to SetCaption(aCaption); } \ + NS_IMETHOD GetTHead(nsIDOMHTMLTableSectionElement * *aTHead) { return _to GetTHead(aTHead); } \ + NS_IMETHOD SetTHead(nsIDOMHTMLTableSectionElement * aTHead) { return _to SetTHead(aTHead); } \ + NS_IMETHOD GetTFoot(nsIDOMHTMLTableSectionElement * *aTFoot) { return _to GetTFoot(aTFoot); } \ + NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement * aTFoot) { return _to SetTFoot(aTFoot); } \ + NS_IMETHOD GetRows(nsIDOMHTMLCollection * *aRows) { return _to GetRows(aRows); } \ + NS_IMETHOD GetTBodies(nsIDOMHTMLCollection * *aTBodies) { return _to GetTBodies(aTBodies); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetBgColor(nsAString & aBgColor) { return _to GetBgColor(aBgColor); } \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor) { return _to SetBgColor(aBgColor); } \ + NS_IMETHOD GetBorder(nsAString & aBorder) { return _to GetBorder(aBorder); } \ + NS_IMETHOD SetBorder(const nsAString & aBorder) { return _to SetBorder(aBorder); } \ + NS_IMETHOD GetCellPadding(nsAString & aCellPadding) { return _to GetCellPadding(aCellPadding); } \ + NS_IMETHOD SetCellPadding(const nsAString & aCellPadding) { return _to SetCellPadding(aCellPadding); } \ + NS_IMETHOD GetCellSpacing(nsAString & aCellSpacing) { return _to GetCellSpacing(aCellSpacing); } \ + NS_IMETHOD SetCellSpacing(const nsAString & aCellSpacing) { return _to SetCellSpacing(aCellSpacing); } \ + NS_IMETHOD GetFrame(nsAString & aFrame) { return _to GetFrame(aFrame); } \ + NS_IMETHOD SetFrame(const nsAString & aFrame) { return _to SetFrame(aFrame); } \ + NS_IMETHOD GetRules(nsAString & aRules) { return _to GetRules(aRules); } \ + NS_IMETHOD SetRules(const nsAString & aRules) { return _to SetRules(aRules); } \ + NS_IMETHOD GetSummary(nsAString & aSummary) { return _to GetSummary(aSummary); } \ + NS_IMETHOD SetSummary(const nsAString & aSummary) { return _to SetSummary(aSummary); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return _to SetWidth(aWidth); } \ + NS_IMETHOD CreateTHead(nsIDOMHTMLElement **_retval) { return _to CreateTHead(_retval); } \ + NS_IMETHOD DeleteTHead(void) { return _to DeleteTHead(); } \ + NS_IMETHOD CreateTFoot(nsIDOMHTMLElement **_retval) { return _to CreateTFoot(_retval); } \ + NS_IMETHOD DeleteTFoot(void) { return _to DeleteTFoot(); } \ + NS_IMETHOD CreateCaption(nsIDOMHTMLElement **_retval) { return _to CreateCaption(_retval); } \ + NS_IMETHOD DeleteCaption(void) { return _to DeleteCaption(); } \ + NS_IMETHOD InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval) { return _to InsertRow(index, _retval); } \ + NS_IMETHOD DeleteRow(PRInt32 index) { return _to DeleteRow(index); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLTABLEELEMENT(_to) \ + NS_IMETHOD GetCaption(nsIDOMHTMLTableCaptionElement * *aCaption) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCaption(aCaption); } \ + NS_IMETHOD SetCaption(nsIDOMHTMLTableCaptionElement * aCaption) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCaption(aCaption); } \ + NS_IMETHOD GetTHead(nsIDOMHTMLTableSectionElement * *aTHead) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTHead(aTHead); } \ + NS_IMETHOD SetTHead(nsIDOMHTMLTableSectionElement * aTHead) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTHead(aTHead); } \ + NS_IMETHOD GetTFoot(nsIDOMHTMLTableSectionElement * *aTFoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTFoot(aTFoot); } \ + NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement * aTFoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTFoot(aTFoot); } \ + NS_IMETHOD GetRows(nsIDOMHTMLCollection * *aRows) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRows(aRows); } \ + NS_IMETHOD GetTBodies(nsIDOMHTMLCollection * *aTBodies) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTBodies(aTBodies); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetBgColor(nsAString & aBgColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBgColor(aBgColor); } \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBgColor(aBgColor); } \ + NS_IMETHOD GetBorder(nsAString & aBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBorder(aBorder); } \ + NS_IMETHOD SetBorder(const nsAString & aBorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBorder(aBorder); } \ + NS_IMETHOD GetCellPadding(nsAString & aCellPadding) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCellPadding(aCellPadding); } \ + NS_IMETHOD SetCellPadding(const nsAString & aCellPadding) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCellPadding(aCellPadding); } \ + NS_IMETHOD GetCellSpacing(nsAString & aCellSpacing) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCellSpacing(aCellSpacing); } \ + NS_IMETHOD SetCellSpacing(const nsAString & aCellSpacing) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCellSpacing(aCellSpacing); } \ + NS_IMETHOD GetFrame(nsAString & aFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrame(aFrame); } \ + NS_IMETHOD SetFrame(const nsAString & aFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFrame(aFrame); } \ + NS_IMETHOD GetRules(nsAString & aRules) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRules(aRules); } \ + NS_IMETHOD SetRules(const nsAString & aRules) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRules(aRules); } \ + NS_IMETHOD GetSummary(nsAString & aSummary) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSummary(aSummary); } \ + NS_IMETHOD SetSummary(const nsAString & aSummary) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSummary(aSummary); } \ + NS_IMETHOD GetWidth(nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsAString & aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWidth(aWidth); } \ + NS_IMETHOD CreateTHead(nsIDOMHTMLElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateTHead(_retval); } \ + NS_IMETHOD DeleteTHead(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteTHead(); } \ + NS_IMETHOD CreateTFoot(nsIDOMHTMLElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateTFoot(_retval); } \ + NS_IMETHOD DeleteTFoot(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteTFoot(); } \ + NS_IMETHOD CreateCaption(nsIDOMHTMLElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCaption(_retval); } \ + NS_IMETHOD DeleteCaption(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCaption(); } \ + NS_IMETHOD InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertRow(index, _retval); } \ + NS_IMETHOD DeleteRow(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteRow(index); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLTableElement : public nsIDOMHTMLTableElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLTABLEELEMENT + + nsDOMHTMLTableElement(); + +private: + ~nsDOMHTMLTableElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLTableElement, nsIDOMHTMLTableElement) + +nsDOMHTMLTableElement::nsDOMHTMLTableElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLTableElement::~nsDOMHTMLTableElement() +{ + /* destructor code */ +} + +/* attribute nsIDOMHTMLTableCaptionElement caption; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetCaption(nsIDOMHTMLTableCaptionElement * *aCaption) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetCaption(nsIDOMHTMLTableCaptionElement * aCaption) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIDOMHTMLTableSectionElement tHead; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetTHead(nsIDOMHTMLTableSectionElement * *aTHead) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetTHead(nsIDOMHTMLTableSectionElement * aTHead) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIDOMHTMLTableSectionElement tFoot; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetTFoot(nsIDOMHTMLTableSectionElement * *aTFoot) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetTFoot(nsIDOMHTMLTableSectionElement * aTFoot) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection rows; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetRows(nsIDOMHTMLCollection * *aRows) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection tBodies; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetTBodies(nsIDOMHTMLCollection * *aTBodies) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString bgColor; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetBgColor(nsAString & aBgColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetBgColor(const nsAString & aBgColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString border; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetBorder(nsAString & aBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetBorder(const nsAString & aBorder) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString cellPadding; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetCellPadding(nsAString & aCellPadding) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetCellPadding(const nsAString & aCellPadding) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString cellSpacing; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetCellSpacing(nsAString & aCellSpacing) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetCellSpacing(const nsAString & aCellSpacing) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString frame; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetFrame(nsAString & aFrame) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetFrame(const nsAString & aFrame) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString rules; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetRules(nsAString & aRules) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetRules(const nsAString & aRules) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString summary; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetSummary(nsAString & aSummary) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetSummary(const nsAString & aSummary) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString width; */ +NS_IMETHODIMP nsDOMHTMLTableElement::GetWidth(nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableElement::SetWidth(const nsAString & aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMHTMLElement createTHead (); */ +NS_IMETHODIMP nsDOMHTMLTableElement::CreateTHead(nsIDOMHTMLElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteTHead (); */ +NS_IMETHODIMP nsDOMHTMLTableElement::DeleteTHead() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMHTMLElement createTFoot (); */ +NS_IMETHODIMP nsDOMHTMLTableElement::CreateTFoot(nsIDOMHTMLElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteTFoot (); */ +NS_IMETHODIMP nsDOMHTMLTableElement::DeleteTFoot() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMHTMLElement createCaption (); */ +NS_IMETHODIMP nsDOMHTMLTableElement::CreateCaption(nsIDOMHTMLElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteCaption (); */ +NS_IMETHODIMP nsDOMHTMLTableElement::DeleteCaption() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMHTMLElement insertRow (in long index) raises (DOMException); */ +NS_IMETHODIMP nsDOMHTMLTableElement::InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteRow (in long index) raises (DOMException); */ +NS_IMETHODIMP nsDOMHTMLTableElement::DeleteRow(PRInt32 index) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLTableElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableRowElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableRowElement.h new file mode 100644 index 00000000..e79b1d00 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableRowElement.h @@ -0,0 +1,246 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLTableRowElement.idl + */ + +#ifndef __gen_nsIDOMHTMLTableRowElement_h__ +#define __gen_nsIDOMHTMLTableRowElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLTableRowElement */ +#define NS_IDOMHTMLTABLEROWELEMENT_IID_STR "a6cf90b6-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLTABLEROWELEMENT_IID \ + {0xa6cf90b6, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLTableRowElement interface is the interface to a + * [X]HTML tr element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLTableRowElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLTABLEROWELEMENT_IID) + + /* readonly attribute long rowIndex; */ + NS_IMETHOD GetRowIndex(PRInt32 *aRowIndex) = 0; + + /* readonly attribute long sectionRowIndex; */ + NS_IMETHOD GetSectionRowIndex(PRInt32 *aSectionRowIndex) = 0; + + /* readonly attribute nsIDOMHTMLCollection cells; */ + NS_IMETHOD GetCells(nsIDOMHTMLCollection * *aCells) = 0; + + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString bgColor; */ + NS_IMETHOD GetBgColor(nsAString & aBgColor) = 0; + NS_IMETHOD SetBgColor(const nsAString & aBgColor) = 0; + + /* attribute DOMString ch; */ + NS_IMETHOD GetCh(nsAString & aCh) = 0; + NS_IMETHOD SetCh(const nsAString & aCh) = 0; + + /* attribute DOMString chOff; */ + NS_IMETHOD GetChOff(nsAString & aChOff) = 0; + NS_IMETHOD SetChOff(const nsAString & aChOff) = 0; + + /* attribute DOMString vAlign; */ + NS_IMETHOD GetVAlign(nsAString & aVAlign) = 0; + NS_IMETHOD SetVAlign(const nsAString & aVAlign) = 0; + + /* nsIDOMHTMLElement insertCell (in long index) raises (DOMException); */ + NS_IMETHOD InsertCell(PRInt32 index, nsIDOMHTMLElement **_retval) = 0; + + /* void deleteCell (in long index) raises (DOMException); */ + NS_IMETHOD DeleteCell(PRInt32 index) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLTABLEROWELEMENT \ + NS_IMETHOD GetRowIndex(PRInt32 *aRowIndex); \ + NS_IMETHOD GetSectionRowIndex(PRInt32 *aSectionRowIndex); \ + NS_IMETHOD GetCells(nsIDOMHTMLCollection * *aCells); \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetBgColor(nsAString & aBgColor); \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor); \ + NS_IMETHOD GetCh(nsAString & aCh); \ + NS_IMETHOD SetCh(const nsAString & aCh); \ + NS_IMETHOD GetChOff(nsAString & aChOff); \ + NS_IMETHOD SetChOff(const nsAString & aChOff); \ + NS_IMETHOD GetVAlign(nsAString & aVAlign); \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign); \ + NS_IMETHOD InsertCell(PRInt32 index, nsIDOMHTMLElement **_retval); \ + NS_IMETHOD DeleteCell(PRInt32 index); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLTABLEROWELEMENT(_to) \ + NS_IMETHOD GetRowIndex(PRInt32 *aRowIndex) { return _to GetRowIndex(aRowIndex); } \ + NS_IMETHOD GetSectionRowIndex(PRInt32 *aSectionRowIndex) { return _to GetSectionRowIndex(aSectionRowIndex); } \ + NS_IMETHOD GetCells(nsIDOMHTMLCollection * *aCells) { return _to GetCells(aCells); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetBgColor(nsAString & aBgColor) { return _to GetBgColor(aBgColor); } \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor) { return _to SetBgColor(aBgColor); } \ + NS_IMETHOD GetCh(nsAString & aCh) { return _to GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsAString & aCh) { return _to SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsAString & aChOff) { return _to GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsAString & aChOff) { return _to SetChOff(aChOff); } \ + NS_IMETHOD GetVAlign(nsAString & aVAlign) { return _to GetVAlign(aVAlign); } \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign) { return _to SetVAlign(aVAlign); } \ + NS_IMETHOD InsertCell(PRInt32 index, nsIDOMHTMLElement **_retval) { return _to InsertCell(index, _retval); } \ + NS_IMETHOD DeleteCell(PRInt32 index) { return _to DeleteCell(index); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLTABLEROWELEMENT(_to) \ + NS_IMETHOD GetRowIndex(PRInt32 *aRowIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRowIndex(aRowIndex); } \ + NS_IMETHOD GetSectionRowIndex(PRInt32 *aSectionRowIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSectionRowIndex(aSectionRowIndex); } \ + NS_IMETHOD GetCells(nsIDOMHTMLCollection * *aCells) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCells(aCells); } \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetBgColor(nsAString & aBgColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBgColor(aBgColor); } \ + NS_IMETHOD SetBgColor(const nsAString & aBgColor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBgColor(aBgColor); } \ + NS_IMETHOD GetCh(nsAString & aCh) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsAString & aCh) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsAString & aChOff) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsAString & aChOff) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChOff(aChOff); } \ + NS_IMETHOD GetVAlign(nsAString & aVAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVAlign(aVAlign); } \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVAlign(aVAlign); } \ + NS_IMETHOD InsertCell(PRInt32 index, nsIDOMHTMLElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertCell(index, _retval); } \ + NS_IMETHOD DeleteCell(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCell(index); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLTableRowElement : public nsIDOMHTMLTableRowElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLTABLEROWELEMENT + + nsDOMHTMLTableRowElement(); + +private: + ~nsDOMHTMLTableRowElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLTableRowElement, nsIDOMHTMLTableRowElement) + +nsDOMHTMLTableRowElement::nsDOMHTMLTableRowElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLTableRowElement::~nsDOMHTMLTableRowElement() +{ + /* destructor code */ +} + +/* readonly attribute long rowIndex; */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::GetRowIndex(PRInt32 *aRowIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long sectionRowIndex; */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::GetSectionRowIndex(PRInt32 *aSectionRowIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection cells; */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::GetCells(nsIDOMHTMLCollection * *aCells) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableRowElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString bgColor; */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::GetBgColor(nsAString & aBgColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableRowElement::SetBgColor(const nsAString & aBgColor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString ch; */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::GetCh(nsAString & aCh) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableRowElement::SetCh(const nsAString & aCh) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString chOff; */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::GetChOff(nsAString & aChOff) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableRowElement::SetChOff(const nsAString & aChOff) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString vAlign; */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::GetVAlign(nsAString & aVAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableRowElement::SetVAlign(const nsAString & aVAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMHTMLElement insertCell (in long index) raises (DOMException); */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::InsertCell(PRInt32 index, nsIDOMHTMLElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteCell (in long index) raises (DOMException); */ +NS_IMETHODIMP nsDOMHTMLTableRowElement::DeleteCell(PRInt32 index) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLTableRowElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableSectionElem.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableSectionElem.h new file mode 100644 index 00000000..ac13b67e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTableSectionElem.h @@ -0,0 +1,202 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLTableSectionElem.idl + */ + +#ifndef __gen_nsIDOMHTMLTableSectionElem_h__ +#define __gen_nsIDOMHTMLTableSectionElem_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLTableSectionElement */ +#define NS_IDOMHTMLTABLESECTIONELEMENT_IID_STR "a6cf90b5-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLTABLESECTIONELEMENT_IID \ + {0xa6cf90b5, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMHTMLTableSectionElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLTABLESECTIONELEMENT_IID) + + /** + * The nsIDOMHTMLTableSectionElement interface is the interface to a + * [X]HTML thead, tbody, and tfoot element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + /* attribute DOMString align; */ + NS_IMETHOD GetAlign(nsAString & aAlign) = 0; + NS_IMETHOD SetAlign(const nsAString & aAlign) = 0; + + /* attribute DOMString ch; */ + NS_IMETHOD GetCh(nsAString & aCh) = 0; + NS_IMETHOD SetCh(const nsAString & aCh) = 0; + + /* attribute DOMString chOff; */ + NS_IMETHOD GetChOff(nsAString & aChOff) = 0; + NS_IMETHOD SetChOff(const nsAString & aChOff) = 0; + + /* attribute DOMString vAlign; */ + NS_IMETHOD GetVAlign(nsAString & aVAlign) = 0; + NS_IMETHOD SetVAlign(const nsAString & aVAlign) = 0; + + /* readonly attribute nsIDOMHTMLCollection rows; */ + NS_IMETHOD GetRows(nsIDOMHTMLCollection * *aRows) = 0; + + /* nsIDOMHTMLElement insertRow (in long index) raises (DOMException); */ + NS_IMETHOD InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval) = 0; + + /* void deleteRow (in long index) raises (DOMException); */ + NS_IMETHOD DeleteRow(PRInt32 index) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLTABLESECTIONELEMENT \ + NS_IMETHOD GetAlign(nsAString & aAlign); \ + NS_IMETHOD SetAlign(const nsAString & aAlign); \ + NS_IMETHOD GetCh(nsAString & aCh); \ + NS_IMETHOD SetCh(const nsAString & aCh); \ + NS_IMETHOD GetChOff(nsAString & aChOff); \ + NS_IMETHOD SetChOff(const nsAString & aChOff); \ + NS_IMETHOD GetVAlign(nsAString & aVAlign); \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign); \ + NS_IMETHOD GetRows(nsIDOMHTMLCollection * *aRows); \ + NS_IMETHOD InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval); \ + NS_IMETHOD DeleteRow(PRInt32 index); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLTABLESECTIONELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return _to GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return _to SetAlign(aAlign); } \ + NS_IMETHOD GetCh(nsAString & aCh) { return _to GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsAString & aCh) { return _to SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsAString & aChOff) { return _to GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsAString & aChOff) { return _to SetChOff(aChOff); } \ + NS_IMETHOD GetVAlign(nsAString & aVAlign) { return _to GetVAlign(aVAlign); } \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign) { return _to SetVAlign(aVAlign); } \ + NS_IMETHOD GetRows(nsIDOMHTMLCollection * *aRows) { return _to GetRows(aRows); } \ + NS_IMETHOD InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval) { return _to InsertRow(index, _retval); } \ + NS_IMETHOD DeleteRow(PRInt32 index) { return _to DeleteRow(index); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLTABLESECTIONELEMENT(_to) \ + NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ + NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ + NS_IMETHOD GetCh(nsAString & aCh) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsAString & aCh) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsAString & aChOff) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsAString & aChOff) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChOff(aChOff); } \ + NS_IMETHOD GetVAlign(nsAString & aVAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVAlign(aVAlign); } \ + NS_IMETHOD SetVAlign(const nsAString & aVAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVAlign(aVAlign); } \ + NS_IMETHOD GetRows(nsIDOMHTMLCollection * *aRows) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRows(aRows); } \ + NS_IMETHOD InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertRow(index, _retval); } \ + NS_IMETHOD DeleteRow(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteRow(index); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLTableSectionElement : public nsIDOMHTMLTableSectionElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLTABLESECTIONELEMENT + + nsDOMHTMLTableSectionElement(); + +private: + ~nsDOMHTMLTableSectionElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLTableSectionElement, nsIDOMHTMLTableSectionElement) + +nsDOMHTMLTableSectionElement::nsDOMHTMLTableSectionElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLTableSectionElement::~nsDOMHTMLTableSectionElement() +{ + /* destructor code */ +} + +/* attribute DOMString align; */ +NS_IMETHODIMP nsDOMHTMLTableSectionElement::GetAlign(nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableSectionElement::SetAlign(const nsAString & aAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString ch; */ +NS_IMETHODIMP nsDOMHTMLTableSectionElement::GetCh(nsAString & aCh) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableSectionElement::SetCh(const nsAString & aCh) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString chOff; */ +NS_IMETHODIMP nsDOMHTMLTableSectionElement::GetChOff(nsAString & aChOff) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableSectionElement::SetChOff(const nsAString & aChOff) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString vAlign; */ +NS_IMETHODIMP nsDOMHTMLTableSectionElement::GetVAlign(nsAString & aVAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTableSectionElement::SetVAlign(const nsAString & aVAlign) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLCollection rows; */ +NS_IMETHODIMP nsDOMHTMLTableSectionElement::GetRows(nsIDOMHTMLCollection * *aRows) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMHTMLElement insertRow (in long index) raises (DOMException); */ +NS_IMETHODIMP nsDOMHTMLTableSectionElement::InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteRow (in long index) raises (DOMException); */ +NS_IMETHODIMP nsDOMHTMLTableSectionElement::DeleteRow(PRInt32 index) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLTableSectionElem_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTextAreaElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTextAreaElement.h new file mode 100644 index 00000000..a3799f20 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTextAreaElement.h @@ -0,0 +1,326 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLTextAreaElement.idl + */ + +#ifndef __gen_nsIDOMHTMLTextAreaElement_h__ +#define __gen_nsIDOMHTMLTextAreaElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLTextAreaElement */ +#define NS_IDOMHTMLTEXTAREAELEMENT_IID_STR "a6cf9094-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLTEXTAREAELEMENT_IID \ + {0xa6cf9094, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLTextAreaElement interface is the interface to a + * [X]HTML textarea element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLTextAreaElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLTEXTAREAELEMENT_IID) + + /* attribute DOMString defaultValue; */ + NS_IMETHOD GetDefaultValue(nsAString & aDefaultValue) = 0; + NS_IMETHOD SetDefaultValue(const nsAString & aDefaultValue) = 0; + + /* readonly attribute nsIDOMHTMLFormElement form; */ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) = 0; + + /* attribute DOMString accessKey; */ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) = 0; + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) = 0; + + /* attribute long cols; */ + NS_IMETHOD GetCols(PRInt32 *aCols) = 0; + NS_IMETHOD SetCols(PRInt32 aCols) = 0; + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /* attribute boolean readOnly; */ + NS_IMETHOD GetReadOnly(PRBool *aReadOnly) = 0; + NS_IMETHOD SetReadOnly(PRBool aReadOnly) = 0; + + /* attribute long rows; */ + NS_IMETHOD GetRows(PRInt32 *aRows) = 0; + NS_IMETHOD SetRows(PRInt32 aRows) = 0; + + /* attribute long tabIndex; */ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) = 0; + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) = 0; + + /* readonly attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + + /* attribute DOMString value; */ + NS_IMETHOD GetValue(nsAString & aValue) = 0; + NS_IMETHOD SetValue(const nsAString & aValue) = 0; + + /* void blur (); */ + NS_IMETHOD Blur(void) = 0; + + /* void focus (); */ + NS_IMETHOD Focus(void) = 0; + + /* void select (); */ + NS_IMETHOD Select(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLTEXTAREAELEMENT \ + NS_IMETHOD GetDefaultValue(nsAString & aDefaultValue); \ + NS_IMETHOD SetDefaultValue(const nsAString & aDefaultValue); \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm); \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey); \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey); \ + NS_IMETHOD GetCols(PRInt32 *aCols); \ + NS_IMETHOD SetCols(PRInt32 aCols); \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetReadOnly(PRBool *aReadOnly); \ + NS_IMETHOD SetReadOnly(PRBool aReadOnly); \ + NS_IMETHOD GetRows(PRInt32 *aRows); \ + NS_IMETHOD SetRows(PRInt32 aRows); \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex); \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD GetValue(nsAString & aValue); \ + NS_IMETHOD SetValue(const nsAString & aValue); \ + NS_IMETHOD Blur(void); \ + NS_IMETHOD Focus(void); \ + NS_IMETHOD Select(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLTEXTAREAELEMENT(_to) \ + NS_IMETHOD GetDefaultValue(nsAString & aDefaultValue) { return _to GetDefaultValue(aDefaultValue); } \ + NS_IMETHOD SetDefaultValue(const nsAString & aDefaultValue) { return _to SetDefaultValue(aDefaultValue); } \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return _to GetForm(aForm); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return _to GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return _to SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetCols(PRInt32 *aCols) { return _to GetCols(aCols); } \ + NS_IMETHOD SetCols(PRInt32 aCols) { return _to SetCols(aCols); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetReadOnly(PRBool *aReadOnly) { return _to GetReadOnly(aReadOnly); } \ + NS_IMETHOD SetReadOnly(PRBool aReadOnly) { return _to SetReadOnly(aReadOnly); } \ + NS_IMETHOD GetRows(PRInt32 *aRows) { return _to GetRows(aRows); } \ + NS_IMETHOD SetRows(PRInt32 aRows) { return _to SetRows(aRows); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return _to GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } \ + NS_IMETHOD Blur(void) { return _to Blur(); } \ + NS_IMETHOD Focus(void) { return _to Focus(); } \ + NS_IMETHOD Select(void) { return _to Select(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLTEXTAREAELEMENT(_to) \ + NS_IMETHOD GetDefaultValue(nsAString & aDefaultValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultValue(aDefaultValue); } \ + NS_IMETHOD SetDefaultValue(const nsAString & aDefaultValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultValue(aDefaultValue); } \ + NS_IMETHOD GetForm(nsIDOMHTMLFormElement * *aForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForm(aForm); } \ + NS_IMETHOD GetAccessKey(nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessKey(aAccessKey); } \ + NS_IMETHOD SetAccessKey(const nsAString & aAccessKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccessKey(aAccessKey); } \ + NS_IMETHOD GetCols(PRInt32 *aCols) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCols(aCols); } \ + NS_IMETHOD SetCols(PRInt32 aCols) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCols(aCols); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetReadOnly(PRBool *aReadOnly) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadOnly(aReadOnly); } \ + NS_IMETHOD SetReadOnly(PRBool aReadOnly) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReadOnly(aReadOnly); } \ + NS_IMETHOD GetRows(PRInt32 *aRows) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRows(aRows); } \ + NS_IMETHOD SetRows(PRInt32 aRows) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRows(aRows); } \ + NS_IMETHOD GetTabIndex(PRInt32 *aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabIndex(aTabIndex); } \ + NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } \ + NS_IMETHOD Blur(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Blur(); } \ + NS_IMETHOD Focus(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Focus(); } \ + NS_IMETHOD Select(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Select(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLTextAreaElement : public nsIDOMHTMLTextAreaElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLTEXTAREAELEMENT + + nsDOMHTMLTextAreaElement(); + +private: + ~nsDOMHTMLTextAreaElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLTextAreaElement, nsIDOMHTMLTextAreaElement) + +nsDOMHTMLTextAreaElement::nsDOMHTMLTextAreaElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLTextAreaElement::~nsDOMHTMLTextAreaElement() +{ + /* destructor code */ +} + +/* attribute DOMString defaultValue; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetDefaultValue(nsAString & aDefaultValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetDefaultValue(const nsAString & aDefaultValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMHTMLFormElement form; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetForm(nsIDOMHTMLFormElement * *aForm) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString accessKey; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetAccessKey(nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetAccessKey(const nsAString & aAccessKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long cols; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetCols(PRInt32 *aCols) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetCols(PRInt32 aCols) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean readOnly; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetReadOnly(PRBool *aReadOnly) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetReadOnly(PRBool aReadOnly) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long rows; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetRows(PRInt32 *aRows) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetRows(PRInt32 aRows) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long tabIndex; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetTabIndex(PRInt32 *aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetTabIndex(PRInt32 aTabIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString value; */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::GetValue(nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTextAreaElement::SetValue(const nsAString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void blur (); */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::Blur() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void focus (); */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::Focus() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void select (); */ +NS_IMETHODIMP nsDOMHTMLTextAreaElement::Select() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLTextAreaElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTitleElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTitleElement.h new file mode 100644 index 00000000..a4fe1748 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLTitleElement.h @@ -0,0 +1,106 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLTitleElement.idl + */ + +#ifndef __gen_nsIDOMHTMLTitleElement_h__ +#define __gen_nsIDOMHTMLTitleElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLTitleElement */ +#define NS_IDOMHTMLTITLEELEMENT_IID_STR "a6cf9089-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLTITLEELEMENT_IID \ + {0xa6cf9089, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLTitleElement interface is the interface to a [X]HTML + * title element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLTitleElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLTITLEELEMENT_IID) + + /* attribute DOMString text; */ + NS_IMETHOD GetText(nsAString & aText) = 0; + NS_IMETHOD SetText(const nsAString & aText) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLTITLEELEMENT \ + NS_IMETHOD GetText(nsAString & aText); \ + NS_IMETHOD SetText(const nsAString & aText); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLTITLEELEMENT(_to) \ + NS_IMETHOD GetText(nsAString & aText) { return _to GetText(aText); } \ + NS_IMETHOD SetText(const nsAString & aText) { return _to SetText(aText); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLTITLEELEMENT(_to) \ + NS_IMETHOD GetText(nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetText(aText); } \ + NS_IMETHOD SetText(const nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetText(aText); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLTitleElement : public nsIDOMHTMLTitleElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLTITLEELEMENT + + nsDOMHTMLTitleElement(); + +private: + ~nsDOMHTMLTitleElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLTitleElement, nsIDOMHTMLTitleElement) + +nsDOMHTMLTitleElement::nsDOMHTMLTitleElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLTitleElement::~nsDOMHTMLTitleElement() +{ + /* destructor code */ +} + +/* attribute DOMString text; */ +NS_IMETHODIMP nsDOMHTMLTitleElement::GetText(nsAString & aText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLTitleElement::SetText(const nsAString & aText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLTitleElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLUListElement.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLUListElement.h new file mode 100644 index 00000000..8e4779da --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMHTMLUListElement.h @@ -0,0 +1,126 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLUListElement.idl + */ + +#ifndef __gen_nsIDOMHTMLUListElement_h__ +#define __gen_nsIDOMHTMLUListElement_h__ + + +#ifndef __gen_nsIDOMHTMLElement_h__ +#include "nsIDOMHTMLElement.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMHTMLUListElement */ +#define NS_IDOMHTMLULISTELEMENT_IID_STR "a6cf9099-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMHTMLULISTELEMENT_IID \ + {0xa6cf9099, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMHTMLUListElement interface is the interface to a [X]HTML + * ul element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMHTMLUListElement : public nsIDOMHTMLElement { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLULISTELEMENT_IID) + + /* attribute boolean compact; */ + NS_IMETHOD GetCompact(PRBool *aCompact) = 0; + NS_IMETHOD SetCompact(PRBool aCompact) = 0; + + /* attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + NS_IMETHOD SetType(const nsAString & aType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMHTMLULISTELEMENT \ + NS_IMETHOD GetCompact(PRBool *aCompact); \ + NS_IMETHOD SetCompact(PRBool aCompact); \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD SetType(const nsAString & aType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMHTMLULISTELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return _to GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return _to SetCompact(aCompact); } \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMHTMLULISTELEMENT(_to) \ + NS_IMETHOD GetCompact(PRBool *aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCompact(aCompact); } \ + NS_IMETHOD SetCompact(PRBool aCompact) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCompact(aCompact); } \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD SetType(const nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetType(aType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMHTMLUListElement : public nsIDOMHTMLUListElement +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMHTMLULISTELEMENT + + nsDOMHTMLUListElement(); + +private: + ~nsDOMHTMLUListElement(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMHTMLUListElement, nsIDOMHTMLUListElement) + +nsDOMHTMLUListElement::nsDOMHTMLUListElement() +{ + /* member initializers and constructor code */ +} + +nsDOMHTMLUListElement::~nsDOMHTMLUListElement() +{ + /* destructor code */ +} + +/* attribute boolean compact; */ +NS_IMETHODIMP nsDOMHTMLUListElement::GetCompact(PRBool *aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLUListElement::SetCompact(PRBool aCompact) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString type; */ +NS_IMETHODIMP nsDOMHTMLUListElement::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMHTMLUListElement::SetType(const nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMHTMLUListElement_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMMediaList.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMMediaList.h new file mode 100644 index 00000000..74459037 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMMediaList.h @@ -0,0 +1,154 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/stylesheets/nsIDOMMediaList.idl + */ + +#ifndef __gen_nsIDOMMediaList_h__ +#define __gen_nsIDOMMediaList_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMMediaList */ +#define NS_IDOMMEDIALIST_IID_STR "9b0c2ed7-111c-4824-adf9-ef0da6dad371" + +#define NS_IDOMMEDIALIST_IID \ + {0x9b0c2ed7, 0x111c, 0x4824, \ + { 0xad, 0xf9, 0xef, 0x0d, 0xa6, 0xda, 0xd3, 0x71 }} + +class NS_NO_VTABLE nsIDOMMediaList : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMMEDIALIST_IID) + + /** + * The nsIDOMMediaList interface is a datatype for a list of media + * types in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + /* attribute DOMString mediaText; */ + NS_IMETHOD GetMediaText(nsAString & aMediaText) = 0; + NS_IMETHOD SetMediaText(const nsAString & aMediaText) = 0; + + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* DOMString item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsAString & _retval) = 0; + + /* void deleteMedium (in DOMString oldMedium) raises (DOMException); */ + NS_IMETHOD DeleteMedium(const nsAString & oldMedium) = 0; + + /* void appendMedium (in DOMString newMedium) raises (DOMException); */ + NS_IMETHOD AppendMedium(const nsAString & newMedium) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMMEDIALIST \ + NS_IMETHOD GetMediaText(nsAString & aMediaText); \ + NS_IMETHOD SetMediaText(const nsAString & aMediaText); \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD Item(PRUint32 index, nsAString & _retval); \ + NS_IMETHOD DeleteMedium(const nsAString & oldMedium); \ + NS_IMETHOD AppendMedium(const nsAString & newMedium); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMMEDIALIST(_to) \ + NS_IMETHOD GetMediaText(nsAString & aMediaText) { return _to GetMediaText(aMediaText); } \ + NS_IMETHOD SetMediaText(const nsAString & aMediaText) { return _to SetMediaText(aMediaText); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsAString & _retval) { return _to Item(index, _retval); } \ + NS_IMETHOD DeleteMedium(const nsAString & oldMedium) { return _to DeleteMedium(oldMedium); } \ + NS_IMETHOD AppendMedium(const nsAString & newMedium) { return _to AppendMedium(newMedium); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMMEDIALIST(_to) \ + NS_IMETHOD GetMediaText(nsAString & aMediaText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMediaText(aMediaText); } \ + NS_IMETHOD SetMediaText(const nsAString & aMediaText) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMediaText(aMediaText); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \ + NS_IMETHOD DeleteMedium(const nsAString & oldMedium) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteMedium(oldMedium); } \ + NS_IMETHOD AppendMedium(const nsAString & newMedium) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendMedium(newMedium); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMMediaList : public nsIDOMMediaList +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMMEDIALIST + + nsDOMMediaList(); + +private: + ~nsDOMMediaList(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMMediaList, nsIDOMMediaList) + +nsDOMMediaList::nsDOMMediaList() +{ + /* member initializers and constructor code */ +} + +nsDOMMediaList::~nsDOMMediaList() +{ + /* destructor code */ +} + +/* attribute DOMString mediaText; */ +NS_IMETHODIMP nsDOMMediaList::GetMediaText(nsAString & aMediaText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMMediaList::SetMediaText(const nsAString & aMediaText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMMediaList::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString item (in unsigned long index); */ +NS_IMETHODIMP nsDOMMediaList::Item(PRUint32 index, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteMedium (in DOMString oldMedium) raises (DOMException); */ +NS_IMETHODIMP nsDOMMediaList::DeleteMedium(const nsAString & oldMedium) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void appendMedium (in DOMString newMedium) raises (DOMException); */ +NS_IMETHODIMP nsDOMMediaList::AppendMedium(const nsAString & newMedium) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMMediaList_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMMouseEvent.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMMouseEvent.h new file mode 100644 index 00000000..0fcd36b7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMMouseEvent.h @@ -0,0 +1,218 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOMMouseEvent.idl + */ + +#ifndef __gen_nsIDOMMouseEvent_h__ +#define __gen_nsIDOMMouseEvent_h__ + + +#ifndef __gen_nsIDOMUIEvent_h__ +#include "nsIDOMUIEvent.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMMouseEvent */ +#define NS_IDOMMOUSEEVENT_IID_STR "ff751edc-8b02-aae7-0010-8301838a3123" + +#define NS_IDOMMOUSEEVENT_IID \ + {0xff751edc, 0x8b02, 0xaae7, \ + { 0x00, 0x10, 0x83, 0x01, 0x83, 0x8a, 0x31, 0x23 }} + +/** + * The nsIDOMMouseEvent interface is the datatype for all mouse events + * in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMMouseEvent : public nsIDOMUIEvent { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMMOUSEEVENT_IID) + + /* readonly attribute long screenX; */ + NS_IMETHOD GetScreenX(PRInt32 *aScreenX) = 0; + + /* readonly attribute long screenY; */ + NS_IMETHOD GetScreenY(PRInt32 *aScreenY) = 0; + + /* readonly attribute long clientX; */ + NS_IMETHOD GetClientX(PRInt32 *aClientX) = 0; + + /* readonly attribute long clientY; */ + NS_IMETHOD GetClientY(PRInt32 *aClientY) = 0; + + /* readonly attribute boolean ctrlKey; */ + NS_IMETHOD GetCtrlKey(PRBool *aCtrlKey) = 0; + + /* readonly attribute boolean shiftKey; */ + NS_IMETHOD GetShiftKey(PRBool *aShiftKey) = 0; + + /* readonly attribute boolean altKey; */ + NS_IMETHOD GetAltKey(PRBool *aAltKey) = 0; + + /* readonly attribute boolean metaKey; */ + NS_IMETHOD GetMetaKey(PRBool *aMetaKey) = 0; + + /* readonly attribute unsigned short button; */ + NS_IMETHOD GetButton(PRUint16 *aButton) = 0; + + /* readonly attribute nsIDOMEventTarget relatedTarget; */ + NS_IMETHOD GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget) = 0; + + /* void initMouseEvent (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTargetArg); */ + NS_IMETHOD InitMouseEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg, nsIDOMEventTarget *relatedTargetArg) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMMOUSEEVENT \ + NS_IMETHOD GetScreenX(PRInt32 *aScreenX); \ + NS_IMETHOD GetScreenY(PRInt32 *aScreenY); \ + NS_IMETHOD GetClientX(PRInt32 *aClientX); \ + NS_IMETHOD GetClientY(PRInt32 *aClientY); \ + NS_IMETHOD GetCtrlKey(PRBool *aCtrlKey); \ + NS_IMETHOD GetShiftKey(PRBool *aShiftKey); \ + NS_IMETHOD GetAltKey(PRBool *aAltKey); \ + NS_IMETHOD GetMetaKey(PRBool *aMetaKey); \ + NS_IMETHOD GetButton(PRUint16 *aButton); \ + NS_IMETHOD GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget); \ + NS_IMETHOD InitMouseEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg, nsIDOMEventTarget *relatedTargetArg); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMMOUSEEVENT(_to) \ + NS_IMETHOD GetScreenX(PRInt32 *aScreenX) { return _to GetScreenX(aScreenX); } \ + NS_IMETHOD GetScreenY(PRInt32 *aScreenY) { return _to GetScreenY(aScreenY); } \ + NS_IMETHOD GetClientX(PRInt32 *aClientX) { return _to GetClientX(aClientX); } \ + NS_IMETHOD GetClientY(PRInt32 *aClientY) { return _to GetClientY(aClientY); } \ + NS_IMETHOD GetCtrlKey(PRBool *aCtrlKey) { return _to GetCtrlKey(aCtrlKey); } \ + NS_IMETHOD GetShiftKey(PRBool *aShiftKey) { return _to GetShiftKey(aShiftKey); } \ + NS_IMETHOD GetAltKey(PRBool *aAltKey) { return _to GetAltKey(aAltKey); } \ + NS_IMETHOD GetMetaKey(PRBool *aMetaKey) { return _to GetMetaKey(aMetaKey); } \ + NS_IMETHOD GetButton(PRUint16 *aButton) { return _to GetButton(aButton); } \ + NS_IMETHOD GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget) { return _to GetRelatedTarget(aRelatedTarget); } \ + NS_IMETHOD InitMouseEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg, nsIDOMEventTarget *relatedTargetArg) { return _to InitMouseEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMMOUSEEVENT(_to) \ + NS_IMETHOD GetScreenX(PRInt32 *aScreenX) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScreenX(aScreenX); } \ + NS_IMETHOD GetScreenY(PRInt32 *aScreenY) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScreenY(aScreenY); } \ + NS_IMETHOD GetClientX(PRInt32 *aClientX) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClientX(aClientX); } \ + NS_IMETHOD GetClientY(PRInt32 *aClientY) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClientY(aClientY); } \ + NS_IMETHOD GetCtrlKey(PRBool *aCtrlKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCtrlKey(aCtrlKey); } \ + NS_IMETHOD GetShiftKey(PRBool *aShiftKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShiftKey(aShiftKey); } \ + NS_IMETHOD GetAltKey(PRBool *aAltKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAltKey(aAltKey); } \ + NS_IMETHOD GetMetaKey(PRBool *aMetaKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMetaKey(aMetaKey); } \ + NS_IMETHOD GetButton(PRUint16 *aButton) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetButton(aButton); } \ + NS_IMETHOD GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRelatedTarget(aRelatedTarget); } \ + NS_IMETHOD InitMouseEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg, nsIDOMEventTarget *relatedTargetArg) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitMouseEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMMouseEvent : public nsIDOMMouseEvent +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMMOUSEEVENT + + nsDOMMouseEvent(); + +private: + ~nsDOMMouseEvent(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMMouseEvent, nsIDOMMouseEvent) + +nsDOMMouseEvent::nsDOMMouseEvent() +{ + /* member initializers and constructor code */ +} + +nsDOMMouseEvent::~nsDOMMouseEvent() +{ + /* destructor code */ +} + +/* readonly attribute long screenX; */ +NS_IMETHODIMP nsDOMMouseEvent::GetScreenX(PRInt32 *aScreenX) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long screenY; */ +NS_IMETHODIMP nsDOMMouseEvent::GetScreenY(PRInt32 *aScreenY) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long clientX; */ +NS_IMETHODIMP nsDOMMouseEvent::GetClientX(PRInt32 *aClientX) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long clientY; */ +NS_IMETHODIMP nsDOMMouseEvent::GetClientY(PRInt32 *aClientY) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean ctrlKey; */ +NS_IMETHODIMP nsDOMMouseEvent::GetCtrlKey(PRBool *aCtrlKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean shiftKey; */ +NS_IMETHODIMP nsDOMMouseEvent::GetShiftKey(PRBool *aShiftKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean altKey; */ +NS_IMETHODIMP nsDOMMouseEvent::GetAltKey(PRBool *aAltKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean metaKey; */ +NS_IMETHODIMP nsDOMMouseEvent::GetMetaKey(PRBool *aMetaKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned short button; */ +NS_IMETHODIMP nsDOMMouseEvent::GetButton(PRUint16 *aButton) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMEventTarget relatedTarget; */ +NS_IMETHODIMP nsDOMMouseEvent::GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void initMouseEvent (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTargetArg); */ +NS_IMETHODIMP nsDOMMouseEvent::InitMouseEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg, nsIDOMEventTarget *relatedTargetArg) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMMouseEvent_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNSDocumentStyle.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNSDocumentStyle.h new file mode 100644 index 00000000..a1b2c3f7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNSDocumentStyle.h @@ -0,0 +1,107 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/stylesheets/nsIDOMNSDocumentStyle.idl + */ + +#ifndef __gen_nsIDOMNSDocumentStyle_h__ +#define __gen_nsIDOMNSDocumentStyle_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +#ifndef __gen_nsIDOMDocumentStyle_h__ +#include "nsIDOMDocumentStyle.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMNSDocumentStyle */ +#define NS_IDOMNSDOCUMENTSTYLE_IID_STR "4ecdf254-a21e-47b0-8d72-55da8208299f" + +#define NS_IDOMNSDOCUMENTSTYLE_IID \ + {0x4ecdf254, 0xa21e, 0x47b0, \ + { 0x8d, 0x72, 0x55, 0xda, 0x82, 0x08, 0x29, 0x9f }} + +/** + * The nsIDOMNSDocumentStyle interface is an extension to the + * nsIDOMDocumentStyle interface. This interface exposes more ways to interact + * with style sheets in the Document Object Model. This interface is currently + * very much experimental. + */ +class NS_NO_VTABLE nsIDOMNSDocumentStyle : public nsIDOMDocumentStyle { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMNSDOCUMENTSTYLE_IID) + + /** + * This attribute indicates the preferredStylesheetSet as set by the + * author. It is determined from the order of stylesheet declarations and the + * Default-Style HTTP headers. See [[HTML4]]. If there is no preferred + * stylesheet set, this attribute returns the empty string. The case of this + * attribute must exactly match the case given by the author where the + * preferred stylesheet is specified or implied. + */ + /* readonly attribute DOMString preferredStylesheetSet; */ + NS_IMETHOD GetPreferredStylesheetSet(nsAString & aPreferredStylesheetSet) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMNSDOCUMENTSTYLE \ + NS_IMETHOD GetPreferredStylesheetSet(nsAString & aPreferredStylesheetSet); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMNSDOCUMENTSTYLE(_to) \ + NS_IMETHOD GetPreferredStylesheetSet(nsAString & aPreferredStylesheetSet) { return _to GetPreferredStylesheetSet(aPreferredStylesheetSet); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMNSDOCUMENTSTYLE(_to) \ + NS_IMETHOD GetPreferredStylesheetSet(nsAString & aPreferredStylesheetSet) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredStylesheetSet(aPreferredStylesheetSet); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMNSDocumentStyle : public nsIDOMNSDocumentStyle +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMNSDOCUMENTSTYLE + + nsDOMNSDocumentStyle(); + +private: + ~nsDOMNSDocumentStyle(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMNSDocumentStyle, nsIDOMNSDocumentStyle) + +nsDOMNSDocumentStyle::nsDOMNSDocumentStyle() +{ + /* member initializers and constructor code */ +} + +nsDOMNSDocumentStyle::~nsDOMNSDocumentStyle() +{ + /* destructor code */ +} + +/* readonly attribute DOMString preferredStylesheetSet; */ +NS_IMETHODIMP nsDOMNSDocumentStyle::GetPreferredStylesheetSet(nsAString & aPreferredStylesheetSet) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMNSDocumentStyle_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNamedNodeMap.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNamedNodeMap.h new file mode 100644 index 00000000..4d3193be --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNamedNodeMap.h @@ -0,0 +1,182 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMNamedNodeMap.idl + */ + +#ifndef __gen_nsIDOMNamedNodeMap_h__ +#define __gen_nsIDOMNamedNodeMap_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMNamedNodeMap */ +#define NS_IDOMNAMEDNODEMAP_IID_STR "a6cf907b-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMNAMEDNODEMAP_IID \ + {0xa6cf907b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMNamedNodeMap : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMNAMEDNODEMAP_IID) + + /** + * Objects implementing the nsIDOMNamedNodeMap interface are used to + * represent collections of nodes that can be accessed by name. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* nsIDOMNode getNamedItem (in DOMString name); */ + NS_IMETHOD GetNamedItem(const nsAString & name, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode setNamedItem (in nsIDOMNode arg) raises (DOMException); */ + NS_IMETHOD SetNamedItem(nsIDOMNode *arg, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode removeNamedItem (in DOMString name) raises (DOMException); */ + NS_IMETHOD RemoveNamedItem(const nsAString & name, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) = 0; + + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* nsIDOMNode getNamedItemNS (in DOMString namespaceURI, in DOMString localName); */ + NS_IMETHOD GetNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode setNamedItemNS (in nsIDOMNode arg) raises (DOMException); */ + NS_IMETHOD SetNamedItemNS(nsIDOMNode *arg, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode removeNamedItemNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */ + NS_IMETHOD RemoveNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMNAMEDNODEMAP \ + NS_IMETHOD GetNamedItem(const nsAString & name, nsIDOMNode **_retval); \ + NS_IMETHOD SetNamedItem(nsIDOMNode *arg, nsIDOMNode **_retval); \ + NS_IMETHOD RemoveNamedItem(const nsAString & name, nsIDOMNode **_retval); \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval); \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD GetNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval); \ + NS_IMETHOD SetNamedItemNS(nsIDOMNode *arg, nsIDOMNode **_retval); \ + NS_IMETHOD RemoveNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMNAMEDNODEMAP(_to) \ + NS_IMETHOD GetNamedItem(const nsAString & name, nsIDOMNode **_retval) { return _to GetNamedItem(name, _retval); } \ + NS_IMETHOD SetNamedItem(nsIDOMNode *arg, nsIDOMNode **_retval) { return _to SetNamedItem(arg, _retval); } \ + NS_IMETHOD RemoveNamedItem(const nsAString & name, nsIDOMNode **_retval) { return _to RemoveNamedItem(name, _retval); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return _to Item(index, _retval); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD GetNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval) { return _to GetNamedItemNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD SetNamedItemNS(nsIDOMNode *arg, nsIDOMNode **_retval) { return _to SetNamedItemNS(arg, _retval); } \ + NS_IMETHOD RemoveNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval) { return _to RemoveNamedItemNS(namespaceURI, localName, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMNAMEDNODEMAP(_to) \ + NS_IMETHOD GetNamedItem(const nsAString & name, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNamedItem(name, _retval); } \ + NS_IMETHOD SetNamedItem(nsIDOMNode *arg, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNamedItem(arg, _retval); } \ + NS_IMETHOD RemoveNamedItem(const nsAString & name, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveNamedItem(name, _retval); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD GetNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNamedItemNS(namespaceURI, localName, _retval); } \ + NS_IMETHOD SetNamedItemNS(nsIDOMNode *arg, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNamedItemNS(arg, _retval); } \ + NS_IMETHOD RemoveNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveNamedItemNS(namespaceURI, localName, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMNamedNodeMap : public nsIDOMNamedNodeMap +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMNAMEDNODEMAP + + nsDOMNamedNodeMap(); + +private: + ~nsDOMNamedNodeMap(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMNamedNodeMap, nsIDOMNamedNodeMap) + +nsDOMNamedNodeMap::nsDOMNamedNodeMap() +{ + /* member initializers and constructor code */ +} + +nsDOMNamedNodeMap::~nsDOMNamedNodeMap() +{ + /* destructor code */ +} + +/* nsIDOMNode getNamedItem (in DOMString name); */ +NS_IMETHODIMP nsDOMNamedNodeMap::GetNamedItem(const nsAString & name, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode setNamedItem (in nsIDOMNode arg) raises (DOMException); */ +NS_IMETHODIMP nsDOMNamedNodeMap::SetNamedItem(nsIDOMNode *arg, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode removeNamedItem (in DOMString name) raises (DOMException); */ +NS_IMETHODIMP nsDOMNamedNodeMap::RemoveNamedItem(const nsAString & name, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode item (in unsigned long index); */ +NS_IMETHODIMP nsDOMNamedNodeMap::Item(PRUint32 index, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMNamedNodeMap::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode getNamedItemNS (in DOMString namespaceURI, in DOMString localName); */ +NS_IMETHODIMP nsDOMNamedNodeMap::GetNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode setNamedItemNS (in nsIDOMNode arg) raises (DOMException); */ +NS_IMETHODIMP nsDOMNamedNodeMap::SetNamedItemNS(nsIDOMNode *arg, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode removeNamedItemNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */ +NS_IMETHODIMP nsDOMNamedNodeMap::RemoveNamedItemNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMNamedNodeMap_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNode.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNode.h new file mode 100644 index 00000000..91c49b47 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNode.h @@ -0,0 +1,403 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMNode.idl + */ + +#ifndef __gen_nsIDOMNode_h__ +#define __gen_nsIDOMNode_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMNode */ +#define NS_IDOMNODE_IID_STR "a6cf907c-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMNODE_IID \ + {0xa6cf907c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMNode : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMNODE_IID) + + /** + * The nsIDOMNode interface is the primary datatype for the entire + * Document Object Model. + * It represents a single node in the document tree. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + enum { ELEMENT_NODE = 1U }; + + enum { ATTRIBUTE_NODE = 2U }; + + enum { TEXT_NODE = 3U }; + + enum { CDATA_SECTION_NODE = 4U }; + + enum { ENTITY_REFERENCE_NODE = 5U }; + + enum { ENTITY_NODE = 6U }; + + enum { PROCESSING_INSTRUCTION_NODE = 7U }; + + enum { COMMENT_NODE = 8U }; + + enum { DOCUMENT_NODE = 9U }; + + enum { DOCUMENT_TYPE_NODE = 10U }; + + enum { DOCUMENT_FRAGMENT_NODE = 11U }; + + enum { NOTATION_NODE = 12U }; + + /* readonly attribute DOMString nodeName; */ + NS_IMETHOD GetNodeName(nsAString & aNodeName) = 0; + + /* attribute DOMString nodeValue; */ + NS_IMETHOD GetNodeValue(nsAString & aNodeValue) = 0; + NS_IMETHOD SetNodeValue(const nsAString & aNodeValue) = 0; + + /* readonly attribute unsigned short nodeType; */ + NS_IMETHOD GetNodeType(PRUint16 *aNodeType) = 0; + + /* readonly attribute nsIDOMNode parentNode; */ + NS_IMETHOD GetParentNode(nsIDOMNode * *aParentNode) = 0; + + /* readonly attribute nsIDOMNodeList childNodes; */ + NS_IMETHOD GetChildNodes(nsIDOMNodeList * *aChildNodes) = 0; + + /* readonly attribute nsIDOMNode firstChild; */ + NS_IMETHOD GetFirstChild(nsIDOMNode * *aFirstChild) = 0; + + /* readonly attribute nsIDOMNode lastChild; */ + NS_IMETHOD GetLastChild(nsIDOMNode * *aLastChild) = 0; + + /* readonly attribute nsIDOMNode previousSibling; */ + NS_IMETHOD GetPreviousSibling(nsIDOMNode * *aPreviousSibling) = 0; + + /* readonly attribute nsIDOMNode nextSibling; */ + NS_IMETHOD GetNextSibling(nsIDOMNode * *aNextSibling) = 0; + + /* readonly attribute nsIDOMNamedNodeMap attributes; */ + NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap * *aAttributes) = 0; + + /* readonly attribute nsIDOMDocument ownerDocument; */ + NS_IMETHOD GetOwnerDocument(nsIDOMDocument * *aOwnerDocument) = 0; + + /* nsIDOMNode insertBefore (in nsIDOMNode newChild, in nsIDOMNode refChild) raises (DOMException); */ + NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode replaceChild (in nsIDOMNode newChild, in nsIDOMNode oldChild) raises (DOMException); */ + NS_IMETHOD ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode removeChild (in nsIDOMNode oldChild) raises (DOMException); */ + NS_IMETHOD RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval) = 0; + + /* nsIDOMNode appendChild (in nsIDOMNode newChild) raises (DOMException); */ + NS_IMETHOD AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval) = 0; + + /* boolean hasChildNodes (); */ + NS_IMETHOD HasChildNodes(PRBool *_retval) = 0; + + /* nsIDOMNode cloneNode (in boolean deep); */ + NS_IMETHOD CloneNode(PRBool deep, nsIDOMNode **_retval) = 0; + + /* void normalize (); */ + NS_IMETHOD Normalize(void) = 0; + + /* boolean isSupported (in DOMString feature, in DOMString version); */ + NS_IMETHOD IsSupported(const nsAString & feature, const nsAString & version, PRBool *_retval) = 0; + + /* readonly attribute DOMString namespaceURI; */ + NS_IMETHOD GetNamespaceURI(nsAString & aNamespaceURI) = 0; + + /* attribute DOMString prefix; */ + NS_IMETHOD GetPrefix(nsAString & aPrefix) = 0; + NS_IMETHOD SetPrefix(const nsAString & aPrefix) = 0; + + /* readonly attribute DOMString localName; */ + NS_IMETHOD GetLocalName(nsAString & aLocalName) = 0; + + /* boolean hasAttributes (); */ + NS_IMETHOD HasAttributes(PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMNODE \ + NS_IMETHOD GetNodeName(nsAString & aNodeName); \ + NS_IMETHOD GetNodeValue(nsAString & aNodeValue); \ + NS_IMETHOD SetNodeValue(const nsAString & aNodeValue); \ + NS_IMETHOD GetNodeType(PRUint16 *aNodeType); \ + NS_IMETHOD GetParentNode(nsIDOMNode * *aParentNode); \ + NS_IMETHOD GetChildNodes(nsIDOMNodeList * *aChildNodes); \ + NS_IMETHOD GetFirstChild(nsIDOMNode * *aFirstChild); \ + NS_IMETHOD GetLastChild(nsIDOMNode * *aLastChild); \ + NS_IMETHOD GetPreviousSibling(nsIDOMNode * *aPreviousSibling); \ + NS_IMETHOD GetNextSibling(nsIDOMNode * *aNextSibling); \ + NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap * *aAttributes); \ + NS_IMETHOD GetOwnerDocument(nsIDOMDocument * *aOwnerDocument); \ + NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval); \ + NS_IMETHOD ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval); \ + NS_IMETHOD RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval); \ + NS_IMETHOD AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval); \ + NS_IMETHOD HasChildNodes(PRBool *_retval); \ + NS_IMETHOD CloneNode(PRBool deep, nsIDOMNode **_retval); \ + NS_IMETHOD Normalize(void); \ + NS_IMETHOD IsSupported(const nsAString & feature, const nsAString & version, PRBool *_retval); \ + NS_IMETHOD GetNamespaceURI(nsAString & aNamespaceURI); \ + NS_IMETHOD GetPrefix(nsAString & aPrefix); \ + NS_IMETHOD SetPrefix(const nsAString & aPrefix); \ + NS_IMETHOD GetLocalName(nsAString & aLocalName); \ + NS_IMETHOD HasAttributes(PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMNODE(_to) \ + NS_IMETHOD GetNodeName(nsAString & aNodeName) { return _to GetNodeName(aNodeName); } \ + NS_IMETHOD GetNodeValue(nsAString & aNodeValue) { return _to GetNodeValue(aNodeValue); } \ + NS_IMETHOD SetNodeValue(const nsAString & aNodeValue) { return _to SetNodeValue(aNodeValue); } \ + NS_IMETHOD GetNodeType(PRUint16 *aNodeType) { return _to GetNodeType(aNodeType); } \ + NS_IMETHOD GetParentNode(nsIDOMNode * *aParentNode) { return _to GetParentNode(aParentNode); } \ + NS_IMETHOD GetChildNodes(nsIDOMNodeList * *aChildNodes) { return _to GetChildNodes(aChildNodes); } \ + NS_IMETHOD GetFirstChild(nsIDOMNode * *aFirstChild) { return _to GetFirstChild(aFirstChild); } \ + NS_IMETHOD GetLastChild(nsIDOMNode * *aLastChild) { return _to GetLastChild(aLastChild); } \ + NS_IMETHOD GetPreviousSibling(nsIDOMNode * *aPreviousSibling) { return _to GetPreviousSibling(aPreviousSibling); } \ + NS_IMETHOD GetNextSibling(nsIDOMNode * *aNextSibling) { return _to GetNextSibling(aNextSibling); } \ + NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap * *aAttributes) { return _to GetAttributes(aAttributes); } \ + NS_IMETHOD GetOwnerDocument(nsIDOMDocument * *aOwnerDocument) { return _to GetOwnerDocument(aOwnerDocument); } \ + NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval) { return _to InsertBefore(newChild, refChild, _retval); } \ + NS_IMETHOD ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval) { return _to ReplaceChild(newChild, oldChild, _retval); } \ + NS_IMETHOD RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval) { return _to RemoveChild(oldChild, _retval); } \ + NS_IMETHOD AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval) { return _to AppendChild(newChild, _retval); } \ + NS_IMETHOD HasChildNodes(PRBool *_retval) { return _to HasChildNodes(_retval); } \ + NS_IMETHOD CloneNode(PRBool deep, nsIDOMNode **_retval) { return _to CloneNode(deep, _retval); } \ + NS_IMETHOD Normalize(void) { return _to Normalize(); } \ + NS_IMETHOD IsSupported(const nsAString & feature, const nsAString & version, PRBool *_retval) { return _to IsSupported(feature, version, _retval); } \ + NS_IMETHOD GetNamespaceURI(nsAString & aNamespaceURI) { return _to GetNamespaceURI(aNamespaceURI); } \ + NS_IMETHOD GetPrefix(nsAString & aPrefix) { return _to GetPrefix(aPrefix); } \ + NS_IMETHOD SetPrefix(const nsAString & aPrefix) { return _to SetPrefix(aPrefix); } \ + NS_IMETHOD GetLocalName(nsAString & aLocalName) { return _to GetLocalName(aLocalName); } \ + NS_IMETHOD HasAttributes(PRBool *_retval) { return _to HasAttributes(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMNODE(_to) \ + NS_IMETHOD GetNodeName(nsAString & aNodeName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNodeName(aNodeName); } \ + NS_IMETHOD GetNodeValue(nsAString & aNodeValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNodeValue(aNodeValue); } \ + NS_IMETHOD SetNodeValue(const nsAString & aNodeValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNodeValue(aNodeValue); } \ + NS_IMETHOD GetNodeType(PRUint16 *aNodeType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNodeType(aNodeType); } \ + NS_IMETHOD GetParentNode(nsIDOMNode * *aParentNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentNode(aParentNode); } \ + NS_IMETHOD GetChildNodes(nsIDOMNodeList * *aChildNodes) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChildNodes(aChildNodes); } \ + NS_IMETHOD GetFirstChild(nsIDOMNode * *aFirstChild) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFirstChild(aFirstChild); } \ + NS_IMETHOD GetLastChild(nsIDOMNode * *aLastChild) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastChild(aLastChild); } \ + NS_IMETHOD GetPreviousSibling(nsIDOMNode * *aPreviousSibling) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreviousSibling(aPreviousSibling); } \ + NS_IMETHOD GetNextSibling(nsIDOMNode * *aNextSibling) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextSibling(aNextSibling); } \ + NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap * *aAttributes) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributes(aAttributes); } \ + NS_IMETHOD GetOwnerDocument(nsIDOMDocument * *aOwnerDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOwnerDocument(aOwnerDocument); } \ + NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertBefore(newChild, refChild, _retval); } \ + NS_IMETHOD ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReplaceChild(newChild, oldChild, _retval); } \ + NS_IMETHOD RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveChild(oldChild, _retval); } \ + NS_IMETHOD AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendChild(newChild, _retval); } \ + NS_IMETHOD HasChildNodes(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasChildNodes(_retval); } \ + NS_IMETHOD CloneNode(PRBool deep, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloneNode(deep, _retval); } \ + NS_IMETHOD Normalize(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Normalize(); } \ + NS_IMETHOD IsSupported(const nsAString & feature, const nsAString & version, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSupported(feature, version, _retval); } \ + NS_IMETHOD GetNamespaceURI(nsAString & aNamespaceURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNamespaceURI(aNamespaceURI); } \ + NS_IMETHOD GetPrefix(nsAString & aPrefix) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrefix(aPrefix); } \ + NS_IMETHOD SetPrefix(const nsAString & aPrefix) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrefix(aPrefix); } \ + NS_IMETHOD GetLocalName(nsAString & aLocalName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalName(aLocalName); } \ + NS_IMETHOD HasAttributes(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttributes(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMNode : public nsIDOMNode +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMNODE + + nsDOMNode(); + +private: + ~nsDOMNode(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMNode, nsIDOMNode) + +nsDOMNode::nsDOMNode() +{ + /* member initializers and constructor code */ +} + +nsDOMNode::~nsDOMNode() +{ + /* destructor code */ +} + +/* readonly attribute DOMString nodeName; */ +NS_IMETHODIMP nsDOMNode::GetNodeName(nsAString & aNodeName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString nodeValue; */ +NS_IMETHODIMP nsDOMNode::GetNodeValue(nsAString & aNodeValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMNode::SetNodeValue(const nsAString & aNodeValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned short nodeType; */ +NS_IMETHODIMP nsDOMNode::GetNodeType(PRUint16 *aNodeType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode parentNode; */ +NS_IMETHODIMP nsDOMNode::GetParentNode(nsIDOMNode * *aParentNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNodeList childNodes; */ +NS_IMETHODIMP nsDOMNode::GetChildNodes(nsIDOMNodeList * *aChildNodes) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode firstChild; */ +NS_IMETHODIMP nsDOMNode::GetFirstChild(nsIDOMNode * *aFirstChild) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode lastChild; */ +NS_IMETHODIMP nsDOMNode::GetLastChild(nsIDOMNode * *aLastChild) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode previousSibling; */ +NS_IMETHODIMP nsDOMNode::GetPreviousSibling(nsIDOMNode * *aPreviousSibling) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode nextSibling; */ +NS_IMETHODIMP nsDOMNode::GetNextSibling(nsIDOMNode * *aNextSibling) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNamedNodeMap attributes; */ +NS_IMETHODIMP nsDOMNode::GetAttributes(nsIDOMNamedNodeMap * *aAttributes) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMDocument ownerDocument; */ +NS_IMETHODIMP nsDOMNode::GetOwnerDocument(nsIDOMDocument * *aOwnerDocument) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode insertBefore (in nsIDOMNode newChild, in nsIDOMNode refChild) raises (DOMException); */ +NS_IMETHODIMP nsDOMNode::InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode replaceChild (in nsIDOMNode newChild, in nsIDOMNode oldChild) raises (DOMException); */ +NS_IMETHODIMP nsDOMNode::ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode removeChild (in nsIDOMNode oldChild) raises (DOMException); */ +NS_IMETHODIMP nsDOMNode::RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode appendChild (in nsIDOMNode newChild) raises (DOMException); */ +NS_IMETHODIMP nsDOMNode::AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean hasChildNodes (); */ +NS_IMETHODIMP nsDOMNode::HasChildNodes(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMNode cloneNode (in boolean deep); */ +NS_IMETHODIMP nsDOMNode::CloneNode(PRBool deep, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void normalize (); */ +NS_IMETHODIMP nsDOMNode::Normalize() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isSupported (in DOMString feature, in DOMString version); */ +NS_IMETHODIMP nsDOMNode::IsSupported(const nsAString & feature, const nsAString & version, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString namespaceURI; */ +NS_IMETHODIMP nsDOMNode::GetNamespaceURI(nsAString & aNamespaceURI) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString prefix; */ +NS_IMETHODIMP nsDOMNode::GetPrefix(nsAString & aPrefix) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMNode::SetPrefix(const nsAString & aPrefix) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString localName; */ +NS_IMETHODIMP nsDOMNode::GetLocalName(nsAString & aLocalName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean hasAttributes (); */ +NS_IMETHODIMP nsDOMNode::HasAttributes(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMNode_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNodeList.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNodeList.h new file mode 100644 index 00000000..784ce8bb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNodeList.h @@ -0,0 +1,112 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMNodeList.idl + */ + +#ifndef __gen_nsIDOMNodeList_h__ +#define __gen_nsIDOMNodeList_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMNodeList */ +#define NS_IDOMNODELIST_IID_STR "a6cf907d-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMNODELIST_IID \ + {0xa6cf907d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMNodeList : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMNODELIST_IID) + + /** + * The nsIDOMNodeList interface provides the abstraction of an ordered + * collection of nodes, without defining or constraining how this collection + * is implemented. + * The items in the list are accessible via an integral index, starting from 0. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* nsIDOMNode item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) = 0; + + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMNODELIST \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval); \ + NS_IMETHOD GetLength(PRUint32 *aLength); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMNODELIST(_to) \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return _to Item(index, _retval); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMNODELIST(_to) \ + NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMNodeList : public nsIDOMNodeList +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMNODELIST + + nsDOMNodeList(); + +private: + ~nsDOMNodeList(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMNodeList, nsIDOMNodeList) + +nsDOMNodeList::nsDOMNodeList() +{ + /* member initializers and constructor code */ +} + +nsDOMNodeList::~nsDOMNodeList() +{ + /* destructor code */ +} + +/* nsIDOMNode item (in unsigned long index); */ +NS_IMETHODIMP nsDOMNodeList::Item(PRUint32 index, nsIDOMNode **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMNodeList::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMNodeList_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNotation.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNotation.h new file mode 100644 index 00000000..5b700e9d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMNotation.h @@ -0,0 +1,111 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMNotation.idl + */ + +#ifndef __gen_nsIDOMNotation_h__ +#define __gen_nsIDOMNotation_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMNotation */ +#define NS_IDOMNOTATION_IID_STR "a6cf907e-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMNOTATION_IID \ + {0xa6cf907e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMNotation : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMNOTATION_IID) + + /** + * The nsIDOMNotation interface represents a notation declared in the DTD. + * A notation either declares, by name, the format of an unparsed entity, + * or is used for formal declaration of processing instruction targets. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* readonly attribute DOMString publicId; */ + NS_IMETHOD GetPublicId(nsAString & aPublicId) = 0; + + /* readonly attribute DOMString systemId; */ + NS_IMETHOD GetSystemId(nsAString & aSystemId) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMNOTATION \ + NS_IMETHOD GetPublicId(nsAString & aPublicId); \ + NS_IMETHOD GetSystemId(nsAString & aSystemId); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMNOTATION(_to) \ + NS_IMETHOD GetPublicId(nsAString & aPublicId) { return _to GetPublicId(aPublicId); } \ + NS_IMETHOD GetSystemId(nsAString & aSystemId) { return _to GetSystemId(aSystemId); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMNOTATION(_to) \ + NS_IMETHOD GetPublicId(nsAString & aPublicId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPublicId(aPublicId); } \ + NS_IMETHOD GetSystemId(nsAString & aSystemId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSystemId(aSystemId); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMNotation : public nsIDOMNotation +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMNOTATION + + nsDOMNotation(); + +private: + ~nsDOMNotation(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMNotation, nsIDOMNotation) + +nsDOMNotation::nsDOMNotation() +{ + /* member initializers and constructor code */ +} + +nsDOMNotation::~nsDOMNotation() +{ + /* destructor code */ +} + +/* readonly attribute DOMString publicId; */ +NS_IMETHODIMP nsDOMNotation::GetPublicId(nsAString & aPublicId) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString systemId; */ +NS_IMETHODIMP nsDOMNotation::GetSystemId(nsAString & aSystemId) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMNotation_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMProcessingInstruction.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMProcessingInstruction.h new file mode 100644 index 00000000..56bb8242 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMProcessingInstruction.h @@ -0,0 +1,119 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMProcessingInstruction.idl + */ + +#ifndef __gen_nsIDOMProcessingInstruction_h__ +#define __gen_nsIDOMProcessingInstruction_h__ + + +#ifndef __gen_nsIDOMNode_h__ +#include "nsIDOMNode.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMProcessingInstruction */ +#define NS_IDOMPROCESSINGINSTRUCTION_IID_STR "a6cf907f-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMPROCESSINGINSTRUCTION_IID \ + {0xa6cf907f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMProcessingInstruction : public nsIDOMNode { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMPROCESSINGINSTRUCTION_IID) + + /** + * The nsIDOMProcessingInstruction interface represents a + * "processing instruction", used in XML as a way to keep processor-specific + * information in the text of the document. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* readonly attribute DOMString target; */ + NS_IMETHOD GetTarget(nsAString & aTarget) = 0; + + /* attribute DOMString data; */ + NS_IMETHOD GetData(nsAString & aData) = 0; + NS_IMETHOD SetData(const nsAString & aData) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMPROCESSINGINSTRUCTION \ + NS_IMETHOD GetTarget(nsAString & aTarget); \ + NS_IMETHOD GetData(nsAString & aData); \ + NS_IMETHOD SetData(const nsAString & aData); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMPROCESSINGINSTRUCTION(_to) \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return _to GetTarget(aTarget); } \ + NS_IMETHOD GetData(nsAString & aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(const nsAString & aData) { return _to SetData(aData); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMPROCESSINGINSTRUCTION(_to) \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \ + NS_IMETHOD GetData(nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMProcessingInstruction : public nsIDOMProcessingInstruction +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMPROCESSINGINSTRUCTION + + nsDOMProcessingInstruction(); + +private: + ~nsDOMProcessingInstruction(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMProcessingInstruction, nsIDOMProcessingInstruction) + +nsDOMProcessingInstruction::nsDOMProcessingInstruction() +{ + /* member initializers and constructor code */ +} + +nsDOMProcessingInstruction::~nsDOMProcessingInstruction() +{ + /* destructor code */ +} + +/* readonly attribute DOMString target; */ +NS_IMETHODIMP nsDOMProcessingInstruction::GetTarget(nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString data; */ +NS_IMETHODIMP nsDOMProcessingInstruction::GetData(nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMProcessingInstruction::SetData(const nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMProcessingInstruction_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMRange.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMRange.h new file mode 100644 index 00000000..eee48417 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMRange.h @@ -0,0 +1,381 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/range/nsIDOMRange.idl + */ + +#ifndef __gen_nsIDOMRange_h__ +#define __gen_nsIDOMRange_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMRange */ +#define NS_IDOMRANGE_IID_STR "a6cf90ce-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMRANGE_IID \ + {0xa6cf90ce, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMRange : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMRANGE_IID) + + /** + * The nsIDOMRange interface is an interface to a DOM range object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ + * + * @status FROZEN + */ + /* readonly attribute nsIDOMNode startContainer; */ + NS_IMETHOD GetStartContainer(nsIDOMNode * *aStartContainer) = 0; + + /* readonly attribute long startOffset; */ + NS_IMETHOD GetStartOffset(PRInt32 *aStartOffset) = 0; + + /* readonly attribute nsIDOMNode endContainer; */ + NS_IMETHOD GetEndContainer(nsIDOMNode * *aEndContainer) = 0; + + /* readonly attribute long endOffset; */ + NS_IMETHOD GetEndOffset(PRInt32 *aEndOffset) = 0; + + /* readonly attribute boolean collapsed; */ + NS_IMETHOD GetCollapsed(PRBool *aCollapsed) = 0; + + /* readonly attribute nsIDOMNode commonAncestorContainer; */ + NS_IMETHOD GetCommonAncestorContainer(nsIDOMNode * *aCommonAncestorContainer) = 0; + + /* void setStart (in nsIDOMNode refNode, in long offset) raises (RangeException, DOMException); */ + NS_IMETHOD SetStart(nsIDOMNode *refNode, PRInt32 offset) = 0; + + /* void setEnd (in nsIDOMNode refNode, in long offset) raises (RangeException, DOMException); */ + NS_IMETHOD SetEnd(nsIDOMNode *refNode, PRInt32 offset) = 0; + + /* void setStartBefore (in nsIDOMNode refNode) raises (RangeException, DOMException); */ + NS_IMETHOD SetStartBefore(nsIDOMNode *refNode) = 0; + + /* void setStartAfter (in nsIDOMNode refNode) raises (RangeException, DOMException); */ + NS_IMETHOD SetStartAfter(nsIDOMNode *refNode) = 0; + + /* void setEndBefore (in nsIDOMNode refNode) raises (RangeException, DOMException); */ + NS_IMETHOD SetEndBefore(nsIDOMNode *refNode) = 0; + + /* void setEndAfter (in nsIDOMNode refNode) raises (RangeException, DOMException); */ + NS_IMETHOD SetEndAfter(nsIDOMNode *refNode) = 0; + + /* void collapse (in boolean toStart) raises (DOMException); */ + NS_IMETHOD Collapse(PRBool toStart) = 0; + + /* void selectNode (in nsIDOMNode refNode) raises (RangeException, DOMException); */ + NS_IMETHOD SelectNode(nsIDOMNode *refNode) = 0; + + /* void selectNodeContents (in nsIDOMNode refNode) raises (RangeException, DOMException); */ + NS_IMETHOD SelectNodeContents(nsIDOMNode *refNode) = 0; + + enum { START_TO_START = 0U }; + + enum { START_TO_END = 1U }; + + enum { END_TO_END = 2U }; + + enum { END_TO_START = 3U }; + + /* short compareBoundaryPoints (in unsigned short how, in nsIDOMRange sourceRange) raises (DOMException); */ + NS_IMETHOD CompareBoundaryPoints(PRUint16 how, nsIDOMRange *sourceRange, PRInt16 *_retval) = 0; + + /* void deleteContents () raises (DOMException); */ + NS_IMETHOD DeleteContents(void) = 0; + + /* nsIDOMDocumentFragment extractContents () raises (DOMException); */ + NS_IMETHOD ExtractContents(nsIDOMDocumentFragment **_retval) = 0; + + /* nsIDOMDocumentFragment cloneContents () raises (DOMException); */ + NS_IMETHOD CloneContents(nsIDOMDocumentFragment **_retval) = 0; + + /* void insertNode (in nsIDOMNode newNode) raises (DOMException, RangeException); */ + NS_IMETHOD InsertNode(nsIDOMNode *newNode) = 0; + + /* void surroundContents (in nsIDOMNode newParent) raises (DOMException, RangeException); */ + NS_IMETHOD SurroundContents(nsIDOMNode *newParent) = 0; + + /* nsIDOMRange cloneRange () raises (DOMException); */ + NS_IMETHOD CloneRange(nsIDOMRange **_retval) = 0; + + /* DOMString toString () raises (DOMException); */ + NS_IMETHOD ToString(nsAString & _retval) = 0; + + /* void detach () raises (DOMException); */ + NS_IMETHOD Detach(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMRANGE \ + NS_IMETHOD GetStartContainer(nsIDOMNode * *aStartContainer); \ + NS_IMETHOD GetStartOffset(PRInt32 *aStartOffset); \ + NS_IMETHOD GetEndContainer(nsIDOMNode * *aEndContainer); \ + NS_IMETHOD GetEndOffset(PRInt32 *aEndOffset); \ + NS_IMETHOD GetCollapsed(PRBool *aCollapsed); \ + NS_IMETHOD GetCommonAncestorContainer(nsIDOMNode * *aCommonAncestorContainer); \ + NS_IMETHOD SetStart(nsIDOMNode *refNode, PRInt32 offset); \ + NS_IMETHOD SetEnd(nsIDOMNode *refNode, PRInt32 offset); \ + NS_IMETHOD SetStartBefore(nsIDOMNode *refNode); \ + NS_IMETHOD SetStartAfter(nsIDOMNode *refNode); \ + NS_IMETHOD SetEndBefore(nsIDOMNode *refNode); \ + NS_IMETHOD SetEndAfter(nsIDOMNode *refNode); \ + NS_IMETHOD Collapse(PRBool toStart); \ + NS_IMETHOD SelectNode(nsIDOMNode *refNode); \ + NS_IMETHOD SelectNodeContents(nsIDOMNode *refNode); \ + NS_IMETHOD CompareBoundaryPoints(PRUint16 how, nsIDOMRange *sourceRange, PRInt16 *_retval); \ + NS_IMETHOD DeleteContents(void); \ + NS_IMETHOD ExtractContents(nsIDOMDocumentFragment **_retval); \ + NS_IMETHOD CloneContents(nsIDOMDocumentFragment **_retval); \ + NS_IMETHOD InsertNode(nsIDOMNode *newNode); \ + NS_IMETHOD SurroundContents(nsIDOMNode *newParent); \ + NS_IMETHOD CloneRange(nsIDOMRange **_retval); \ + NS_IMETHOD ToString(nsAString & _retval); \ + NS_IMETHOD Detach(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMRANGE(_to) \ + NS_IMETHOD GetStartContainer(nsIDOMNode * *aStartContainer) { return _to GetStartContainer(aStartContainer); } \ + NS_IMETHOD GetStartOffset(PRInt32 *aStartOffset) { return _to GetStartOffset(aStartOffset); } \ + NS_IMETHOD GetEndContainer(nsIDOMNode * *aEndContainer) { return _to GetEndContainer(aEndContainer); } \ + NS_IMETHOD GetEndOffset(PRInt32 *aEndOffset) { return _to GetEndOffset(aEndOffset); } \ + NS_IMETHOD GetCollapsed(PRBool *aCollapsed) { return _to GetCollapsed(aCollapsed); } \ + NS_IMETHOD GetCommonAncestorContainer(nsIDOMNode * *aCommonAncestorContainer) { return _to GetCommonAncestorContainer(aCommonAncestorContainer); } \ + NS_IMETHOD SetStart(nsIDOMNode *refNode, PRInt32 offset) { return _to SetStart(refNode, offset); } \ + NS_IMETHOD SetEnd(nsIDOMNode *refNode, PRInt32 offset) { return _to SetEnd(refNode, offset); } \ + NS_IMETHOD SetStartBefore(nsIDOMNode *refNode) { return _to SetStartBefore(refNode); } \ + NS_IMETHOD SetStartAfter(nsIDOMNode *refNode) { return _to SetStartAfter(refNode); } \ + NS_IMETHOD SetEndBefore(nsIDOMNode *refNode) { return _to SetEndBefore(refNode); } \ + NS_IMETHOD SetEndAfter(nsIDOMNode *refNode) { return _to SetEndAfter(refNode); } \ + NS_IMETHOD Collapse(PRBool toStart) { return _to Collapse(toStart); } \ + NS_IMETHOD SelectNode(nsIDOMNode *refNode) { return _to SelectNode(refNode); } \ + NS_IMETHOD SelectNodeContents(nsIDOMNode *refNode) { return _to SelectNodeContents(refNode); } \ + NS_IMETHOD CompareBoundaryPoints(PRUint16 how, nsIDOMRange *sourceRange, PRInt16 *_retval) { return _to CompareBoundaryPoints(how, sourceRange, _retval); } \ + NS_IMETHOD DeleteContents(void) { return _to DeleteContents(); } \ + NS_IMETHOD ExtractContents(nsIDOMDocumentFragment **_retval) { return _to ExtractContents(_retval); } \ + NS_IMETHOD CloneContents(nsIDOMDocumentFragment **_retval) { return _to CloneContents(_retval); } \ + NS_IMETHOD InsertNode(nsIDOMNode *newNode) { return _to InsertNode(newNode); } \ + NS_IMETHOD SurroundContents(nsIDOMNode *newParent) { return _to SurroundContents(newParent); } \ + NS_IMETHOD CloneRange(nsIDOMRange **_retval) { return _to CloneRange(_retval); } \ + NS_IMETHOD ToString(nsAString & _retval) { return _to ToString(_retval); } \ + NS_IMETHOD Detach(void) { return _to Detach(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMRANGE(_to) \ + NS_IMETHOD GetStartContainer(nsIDOMNode * *aStartContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartContainer(aStartContainer); } \ + NS_IMETHOD GetStartOffset(PRInt32 *aStartOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartOffset(aStartOffset); } \ + NS_IMETHOD GetEndContainer(nsIDOMNode * *aEndContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEndContainer(aEndContainer); } \ + NS_IMETHOD GetEndOffset(PRInt32 *aEndOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEndOffset(aEndOffset); } \ + NS_IMETHOD GetCollapsed(PRBool *aCollapsed) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCollapsed(aCollapsed); } \ + NS_IMETHOD GetCommonAncestorContainer(nsIDOMNode * *aCommonAncestorContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommonAncestorContainer(aCommonAncestorContainer); } \ + NS_IMETHOD SetStart(nsIDOMNode *refNode, PRInt32 offset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStart(refNode, offset); } \ + NS_IMETHOD SetEnd(nsIDOMNode *refNode, PRInt32 offset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEnd(refNode, offset); } \ + NS_IMETHOD SetStartBefore(nsIDOMNode *refNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStartBefore(refNode); } \ + NS_IMETHOD SetStartAfter(nsIDOMNode *refNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStartAfter(refNode); } \ + NS_IMETHOD SetEndBefore(nsIDOMNode *refNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEndBefore(refNode); } \ + NS_IMETHOD SetEndAfter(nsIDOMNode *refNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEndAfter(refNode); } \ + NS_IMETHOD Collapse(PRBool toStart) { return !_to ? NS_ERROR_NULL_POINTER : _to->Collapse(toStart); } \ + NS_IMETHOD SelectNode(nsIDOMNode *refNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectNode(refNode); } \ + NS_IMETHOD SelectNodeContents(nsIDOMNode *refNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectNodeContents(refNode); } \ + NS_IMETHOD CompareBoundaryPoints(PRUint16 how, nsIDOMRange *sourceRange, PRInt16 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareBoundaryPoints(how, sourceRange, _retval); } \ + NS_IMETHOD DeleteContents(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteContents(); } \ + NS_IMETHOD ExtractContents(nsIDOMDocumentFragment **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtractContents(_retval); } \ + NS_IMETHOD CloneContents(nsIDOMDocumentFragment **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloneContents(_retval); } \ + NS_IMETHOD InsertNode(nsIDOMNode *newNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertNode(newNode); } \ + NS_IMETHOD SurroundContents(nsIDOMNode *newParent) { return !_to ? NS_ERROR_NULL_POINTER : _to->SurroundContents(newParent); } \ + NS_IMETHOD CloneRange(nsIDOMRange **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloneRange(_retval); } \ + NS_IMETHOD ToString(nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } \ + NS_IMETHOD Detach(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Detach(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMRange : public nsIDOMRange +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMRANGE + + nsDOMRange(); + +private: + ~nsDOMRange(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMRange, nsIDOMRange) + +nsDOMRange::nsDOMRange() +{ + /* member initializers and constructor code */ +} + +nsDOMRange::~nsDOMRange() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMNode startContainer; */ +NS_IMETHODIMP nsDOMRange::GetStartContainer(nsIDOMNode * *aStartContainer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long startOffset; */ +NS_IMETHODIMP nsDOMRange::GetStartOffset(PRInt32 *aStartOffset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode endContainer; */ +NS_IMETHODIMP nsDOMRange::GetEndContainer(nsIDOMNode * *aEndContainer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long endOffset; */ +NS_IMETHODIMP nsDOMRange::GetEndOffset(PRInt32 *aEndOffset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean collapsed; */ +NS_IMETHODIMP nsDOMRange::GetCollapsed(PRBool *aCollapsed) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode commonAncestorContainer; */ +NS_IMETHODIMP nsDOMRange::GetCommonAncestorContainer(nsIDOMNode * *aCommonAncestorContainer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setStart (in nsIDOMNode refNode, in long offset) raises (RangeException, DOMException); */ +NS_IMETHODIMP nsDOMRange::SetStart(nsIDOMNode *refNode, PRInt32 offset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setEnd (in nsIDOMNode refNode, in long offset) raises (RangeException, DOMException); */ +NS_IMETHODIMP nsDOMRange::SetEnd(nsIDOMNode *refNode, PRInt32 offset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setStartBefore (in nsIDOMNode refNode) raises (RangeException, DOMException); */ +NS_IMETHODIMP nsDOMRange::SetStartBefore(nsIDOMNode *refNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setStartAfter (in nsIDOMNode refNode) raises (RangeException, DOMException); */ +NS_IMETHODIMP nsDOMRange::SetStartAfter(nsIDOMNode *refNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setEndBefore (in nsIDOMNode refNode) raises (RangeException, DOMException); */ +NS_IMETHODIMP nsDOMRange::SetEndBefore(nsIDOMNode *refNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setEndAfter (in nsIDOMNode refNode) raises (RangeException, DOMException); */ +NS_IMETHODIMP nsDOMRange::SetEndAfter(nsIDOMNode *refNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void collapse (in boolean toStart) raises (DOMException); */ +NS_IMETHODIMP nsDOMRange::Collapse(PRBool toStart) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void selectNode (in nsIDOMNode refNode) raises (RangeException, DOMException); */ +NS_IMETHODIMP nsDOMRange::SelectNode(nsIDOMNode *refNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void selectNodeContents (in nsIDOMNode refNode) raises (RangeException, DOMException); */ +NS_IMETHODIMP nsDOMRange::SelectNodeContents(nsIDOMNode *refNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* short compareBoundaryPoints (in unsigned short how, in nsIDOMRange sourceRange) raises (DOMException); */ +NS_IMETHODIMP nsDOMRange::CompareBoundaryPoints(PRUint16 how, nsIDOMRange *sourceRange, PRInt16 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteContents () raises (DOMException); */ +NS_IMETHODIMP nsDOMRange::DeleteContents() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMDocumentFragment extractContents () raises (DOMException); */ +NS_IMETHODIMP nsDOMRange::ExtractContents(nsIDOMDocumentFragment **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMDocumentFragment cloneContents () raises (DOMException); */ +NS_IMETHODIMP nsDOMRange::CloneContents(nsIDOMDocumentFragment **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void insertNode (in nsIDOMNode newNode) raises (DOMException, RangeException); */ +NS_IMETHODIMP nsDOMRange::InsertNode(nsIDOMNode *newNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void surroundContents (in nsIDOMNode newParent) raises (DOMException, RangeException); */ +NS_IMETHODIMP nsDOMRange::SurroundContents(nsIDOMNode *newParent) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMRange cloneRange () raises (DOMException); */ +NS_IMETHODIMP nsDOMRange::CloneRange(nsIDOMRange **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* DOMString toString () raises (DOMException); */ +NS_IMETHODIMP nsDOMRange::ToString(nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void detach () raises (DOMException); */ +NS_IMETHODIMP nsDOMRange::Detach() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMRange_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMStyleSheet.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMStyleSheet.h new file mode 100644 index 00000000..50969a66 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMStyleSheet.h @@ -0,0 +1,178 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/stylesheets/nsIDOMStyleSheet.idl + */ + +#ifndef __gen_nsIDOMStyleSheet_h__ +#define __gen_nsIDOMStyleSheet_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMStyleSheet */ +#define NS_IDOMSTYLESHEET_IID_STR "a6cf9080-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMSTYLESHEET_IID \ + {0xa6cf9080, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMStyleSheet : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMSTYLESHEET_IID) + + /** + * The nsIDOMStyleSheet interface is a datatype for a style sheet in + * the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + /* readonly attribute DOMString type; */ + NS_IMETHOD GetType(nsAString & aType) = 0; + + /* attribute boolean disabled; */ + NS_IMETHOD GetDisabled(PRBool *aDisabled) = 0; + NS_IMETHOD SetDisabled(PRBool aDisabled) = 0; + + /* readonly attribute nsIDOMNode ownerNode; */ + NS_IMETHOD GetOwnerNode(nsIDOMNode * *aOwnerNode) = 0; + + /* readonly attribute nsIDOMStyleSheet parentStyleSheet; */ + NS_IMETHOD GetParentStyleSheet(nsIDOMStyleSheet * *aParentStyleSheet) = 0; + + /* readonly attribute DOMString href; */ + NS_IMETHOD GetHref(nsAString & aHref) = 0; + + /* readonly attribute DOMString title; */ + NS_IMETHOD GetTitle(nsAString & aTitle) = 0; + + /* readonly attribute nsIDOMMediaList media; */ + NS_IMETHOD GetMedia(nsIDOMMediaList * *aMedia) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMSTYLESHEET \ + NS_IMETHOD GetType(nsAString & aType); \ + NS_IMETHOD GetDisabled(PRBool *aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetOwnerNode(nsIDOMNode * *aOwnerNode); \ + NS_IMETHOD GetParentStyleSheet(nsIDOMStyleSheet * *aParentStyleSheet); \ + NS_IMETHOD GetHref(nsAString & aHref); \ + NS_IMETHOD GetTitle(nsAString & aTitle); \ + NS_IMETHOD GetMedia(nsIDOMMediaList * *aMedia); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMSTYLESHEET(_to) \ + NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return _to GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to SetDisabled(aDisabled); } \ + NS_IMETHOD GetOwnerNode(nsIDOMNode * *aOwnerNode) { return _to GetOwnerNode(aOwnerNode); } \ + NS_IMETHOD GetParentStyleSheet(nsIDOMStyleSheet * *aParentStyleSheet) { return _to GetParentStyleSheet(aParentStyleSheet); } \ + NS_IMETHOD GetHref(nsAString & aHref) { return _to GetHref(aHref); } \ + NS_IMETHOD GetTitle(nsAString & aTitle) { return _to GetTitle(aTitle); } \ + NS_IMETHOD GetMedia(nsIDOMMediaList * *aMedia) { return _to GetMedia(aMedia); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMSTYLESHEET(_to) \ + NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD GetDisabled(PRBool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } \ + NS_IMETHOD GetOwnerNode(nsIDOMNode * *aOwnerNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOwnerNode(aOwnerNode); } \ + NS_IMETHOD GetParentStyleSheet(nsIDOMStyleSheet * *aParentStyleSheet) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentStyleSheet(aParentStyleSheet); } \ + NS_IMETHOD GetHref(nsAString & aHref) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHref(aHref); } \ + NS_IMETHOD GetTitle(nsAString & aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \ + NS_IMETHOD GetMedia(nsIDOMMediaList * *aMedia) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMedia(aMedia); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMStyleSheet : public nsIDOMStyleSheet +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMSTYLESHEET + + nsDOMStyleSheet(); + +private: + ~nsDOMStyleSheet(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMStyleSheet, nsIDOMStyleSheet) + +nsDOMStyleSheet::nsDOMStyleSheet() +{ + /* member initializers and constructor code */ +} + +nsDOMStyleSheet::~nsDOMStyleSheet() +{ + /* destructor code */ +} + +/* readonly attribute DOMString type; */ +NS_IMETHODIMP nsDOMStyleSheet::GetType(nsAString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean disabled; */ +NS_IMETHODIMP nsDOMStyleSheet::GetDisabled(PRBool *aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMStyleSheet::SetDisabled(PRBool aDisabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode ownerNode; */ +NS_IMETHODIMP nsDOMStyleSheet::GetOwnerNode(nsIDOMNode * *aOwnerNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMStyleSheet parentStyleSheet; */ +NS_IMETHODIMP nsDOMStyleSheet::GetParentStyleSheet(nsIDOMStyleSheet * *aParentStyleSheet) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString href; */ +NS_IMETHODIMP nsDOMStyleSheet::GetHref(nsAString & aHref) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute DOMString title; */ +NS_IMETHODIMP nsDOMStyleSheet::GetTitle(nsAString & aTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMMediaList media; */ +NS_IMETHODIMP nsDOMStyleSheet::GetMedia(nsIDOMMediaList * *aMedia) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMStyleSheet_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMStyleSheetList.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMStyleSheetList.h new file mode 100644 index 00000000..e1a1fa35 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMStyleSheetList.h @@ -0,0 +1,110 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/stylesheets/nsIDOMStyleSheetList.idl + */ + +#ifndef __gen_nsIDOMStyleSheetList_h__ +#define __gen_nsIDOMStyleSheetList_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMStyleSheetList */ +#define NS_IDOMSTYLESHEETLIST_IID_STR "a6cf9081-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMSTYLESHEETLIST_IID \ + {0xa6cf9081, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMStyleSheetList : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMSTYLESHEETLIST_IID) + + /** + * The nsIDOMStyleSheetList interface is a datatype for a style sheet + * list in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* nsIDOMStyleSheet item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsIDOMStyleSheet **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMSTYLESHEETLIST \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD Item(PRUint32 index, nsIDOMStyleSheet **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMSTYLESHEETLIST(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMStyleSheet **_retval) { return _to Item(index, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMSTYLESHEETLIST(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMStyleSheet **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMStyleSheetList : public nsIDOMStyleSheetList +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMSTYLESHEETLIST + + nsDOMStyleSheetList(); + +private: + ~nsDOMStyleSheetList(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMStyleSheetList, nsIDOMStyleSheetList) + +nsDOMStyleSheetList::nsDOMStyleSheetList() +{ + /* member initializers and constructor code */ +} + +nsDOMStyleSheetList::~nsDOMStyleSheetList() +{ + /* destructor code */ +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMStyleSheetList::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMStyleSheet item (in unsigned long index); */ +NS_IMETHODIMP nsDOMStyleSheetList::Item(PRUint32 index, nsIDOMStyleSheet **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMStyleSheetList_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMText.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMText.h new file mode 100644 index 00000000..ae11a3b9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMText.h @@ -0,0 +1,98 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMText.idl + */ + +#ifndef __gen_nsIDOMText_h__ +#define __gen_nsIDOMText_h__ + + +#ifndef __gen_nsIDOMCharacterData_h__ +#include "nsIDOMCharacterData.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMText */ +#define NS_IDOMTEXT_IID_STR "a6cf9082-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMTEXT_IID \ + {0xa6cf9082, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMText : public nsIDOMCharacterData { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMTEXT_IID) + + /** + * The nsIDOMText interface inherits from nsIDOMCharacterData and represents + * the textual content (termed character data in XML) of an Element or Attr. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Core/ + * + * @status FROZEN + */ + /* nsIDOMText splitText (in unsigned long offset) raises (DOMException); */ + NS_IMETHOD SplitText(PRUint32 offset, nsIDOMText **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMTEXT \ + NS_IMETHOD SplitText(PRUint32 offset, nsIDOMText **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMTEXT(_to) \ + NS_IMETHOD SplitText(PRUint32 offset, nsIDOMText **_retval) { return _to SplitText(offset, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMTEXT(_to) \ + NS_IMETHOD SplitText(PRUint32 offset, nsIDOMText **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SplitText(offset, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMText : public nsIDOMText +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMTEXT + + nsDOMText(); + +private: + ~nsDOMText(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMText, nsIDOMText) + +nsDOMText::nsDOMText() +{ + /* member initializers and constructor code */ +} + +nsDOMText::~nsDOMText() +{ + /* destructor code */ +} + +/* nsIDOMText splitText (in unsigned long offset) raises (DOMException); */ +NS_IMETHODIMP nsDOMText::SplitText(PRUint32 offset, nsIDOMText **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMText_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMUIEvent.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMUIEvent.h new file mode 100644 index 00000000..1f49ee9e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMUIEvent.h @@ -0,0 +1,122 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/events/nsIDOMUIEvent.idl + */ + +#ifndef __gen_nsIDOMUIEvent_h__ +#define __gen_nsIDOMUIEvent_h__ + + +#ifndef __gen_nsIDOMEvent_h__ +#include "nsIDOMEvent.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMUIEvent */ +#define NS_IDOMUIEVENT_IID_STR "a6cf90c3-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMUIEVENT_IID \ + {0xa6cf90c3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +/** + * The nsIDOMUIEvent interface is the datatype for all UI events in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDOMUIEvent : public nsIDOMEvent { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMUIEVENT_IID) + + /* readonly attribute nsIDOMAbstractView view; */ + NS_IMETHOD GetView(nsIDOMAbstractView * *aView) = 0; + + /* readonly attribute long detail; */ + NS_IMETHOD GetDetail(PRInt32 *aDetail) = 0; + + /* void initUIEvent (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg); */ + NS_IMETHOD InitUIEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMUIEVENT \ + NS_IMETHOD GetView(nsIDOMAbstractView * *aView); \ + NS_IMETHOD GetDetail(PRInt32 *aDetail); \ + NS_IMETHOD InitUIEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMUIEVENT(_to) \ + NS_IMETHOD GetView(nsIDOMAbstractView * *aView) { return _to GetView(aView); } \ + NS_IMETHOD GetDetail(PRInt32 *aDetail) { return _to GetDetail(aDetail); } \ + NS_IMETHOD InitUIEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg) { return _to InitUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMUIEVENT(_to) \ + NS_IMETHOD GetView(nsIDOMAbstractView * *aView) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetView(aView); } \ + NS_IMETHOD GetDetail(PRInt32 *aDetail) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDetail(aDetail); } \ + NS_IMETHOD InitUIEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMUIEvent : public nsIDOMUIEvent +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMUIEVENT + + nsDOMUIEvent(); + +private: + ~nsDOMUIEvent(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMUIEvent, nsIDOMUIEvent) + +nsDOMUIEvent::nsDOMUIEvent() +{ + /* member initializers and constructor code */ +} + +nsDOMUIEvent::~nsDOMUIEvent() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMAbstractView view; */ +NS_IMETHODIMP nsDOMUIEvent::GetView(nsIDOMAbstractView * *aView) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long detail; */ +NS_IMETHODIMP nsDOMUIEvent::GetDetail(PRInt32 *aDetail) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void initUIEvent (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg); */ +NS_IMETHODIMP nsDOMUIEvent::InitUIEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMUIEvent_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindow.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindow.h new file mode 100644 index 00000000..71fcde77 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindow.h @@ -0,0 +1,354 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/base/nsIDOMWindow.idl + */ + +#ifndef __gen_nsIDOMWindow_h__ +#define __gen_nsIDOMWindow_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsISelection; /* forward declaration */ + + +/* starting interface: nsIDOMWindow */ +#define NS_IDOMWINDOW_IID_STR "a6cf906b-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMWINDOW_IID \ + {0xa6cf906b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMWindow : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMWINDOW_IID) + + /** + * The nsIDOMWindow interface is the primary interface for a DOM + * window object. It represents a single window object that may + * contain child windows if the document in the window contains a + * HTML frameset document or if the document contains iframe elements. + * + * This interface is not officially defined by any standard bodies, it + * originates from the defacto DOM Level 0 standard. + * + * @status FROZEN + */ +/** + * Accessor for the document in this window. + */ + /* readonly attribute nsIDOMDocument document; */ + NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) = 0; + + /** + * Accessor for this window's parent window, or the window itself if + * there is no parent, or if the parent is of different type + * (i.e. this does not cross chrome-content boundaries). + */ + /* readonly attribute nsIDOMWindow parent; */ + NS_IMETHOD GetParent(nsIDOMWindow * *aParent) = 0; + + /** + * Accessor for the root of this hierarchy of windows. This root may + * be the window itself if there is no parent, or if the parent is + * of different type (i.e. this does not cross chrome-content + * boundaries). + * + * This property is "replaceable" in JavaScript */ + /* readonly attribute nsIDOMWindow top; */ + NS_IMETHOD GetTop(nsIDOMWindow * *aTop) = 0; + + /** + * Accessor for the object that controls whether or not scrollbars + * are shown in this window. + * + * This attribute is "replaceable" in JavaScript + */ + /* readonly attribute nsIDOMBarProp scrollbars; */ + NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) = 0; + + /** + * Accessor for the child windows in this window. + */ + /* [noscript] readonly attribute nsIDOMWindowCollection frames; */ + NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) = 0; + + /** + * Set/Get the name of this window. + * + * This attribute is "replaceable" in JavaScript + */ + /* attribute DOMString name; */ + NS_IMETHOD GetName(nsAString & aName) = 0; + NS_IMETHOD SetName(const nsAString & aName) = 0; + + /** + * Set/Get the document scale factor as a multiplier on the default + * size. When setting this attribute, a NS_ERROR_NOT_IMPLEMENTED + * error may be returned by implementations not supporting + * zoom. Implementations not supporting zoom should return 1.0 all + * the time for the Get operation. 1.0 is equals normal size, + * i.e. no zoom. + */ + /* [noscript] attribute float textZoom; */ + NS_IMETHOD GetTextZoom(float *aTextZoom) = 0; + NS_IMETHOD SetTextZoom(float aTextZoom) = 0; + + /** + * Accessor for the current x scroll position in this window in + * pixels. + * + * This attribute is "replaceable" in JavaScript + */ + /* readonly attribute long scrollX; */ + NS_IMETHOD GetScrollX(PRInt32 *aScrollX) = 0; + + /** + * Accessor for the current y scroll position in this window in + * pixels. + * + * This attribute is "replaceable" in JavaScript + */ + /* readonly attribute long scrollY; */ + NS_IMETHOD GetScrollY(PRInt32 *aScrollY) = 0; + + /** + * Method for scrolling this window to an absolute pixel offset. + */ + /* void scrollTo (in long xScroll, in long yScroll); */ + NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) = 0; + + /** + * Method for scrolling this window to a pixel offset relative to + * the current scroll position. + */ + /* void scrollBy (in long xScrollDif, in long yScrollDif); */ + NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) = 0; + + /** + * Method for accessing this window's selection object. + */ + /* nsISelection getSelection (); */ + NS_IMETHOD GetSelection(nsISelection **_retval) = 0; + + /** + * Method for scrolling this window by a number of lines. + */ + /* void scrollByLines (in long numLines); */ + NS_IMETHOD ScrollByLines(PRInt32 numLines) = 0; + + /** + * Method for scrolling this window by a number of pages. + */ + /* void scrollByPages (in long numPages); */ + NS_IMETHOD ScrollByPages(PRInt32 numPages) = 0; + + /** + * Method for sizing this window to the content in the window. + */ + /* void sizeToContent (); */ + NS_IMETHOD SizeToContent(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMWINDOW \ + NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument); \ + NS_IMETHOD GetParent(nsIDOMWindow * *aParent); \ + NS_IMETHOD GetTop(nsIDOMWindow * *aTop); \ + NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars); \ + NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames); \ + NS_IMETHOD GetName(nsAString & aName); \ + NS_IMETHOD SetName(const nsAString & aName); \ + NS_IMETHOD GetTextZoom(float *aTextZoom); \ + NS_IMETHOD SetTextZoom(float aTextZoom); \ + NS_IMETHOD GetScrollX(PRInt32 *aScrollX); \ + NS_IMETHOD GetScrollY(PRInt32 *aScrollY); \ + NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll); \ + NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif); \ + NS_IMETHOD GetSelection(nsISelection **_retval); \ + NS_IMETHOD ScrollByLines(PRInt32 numLines); \ + NS_IMETHOD ScrollByPages(PRInt32 numPages); \ + NS_IMETHOD SizeToContent(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMWINDOW(_to) \ + NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return _to GetDocument(aDocument); } \ + NS_IMETHOD GetParent(nsIDOMWindow * *aParent) { return _to GetParent(aParent); } \ + NS_IMETHOD GetTop(nsIDOMWindow * *aTop) { return _to GetTop(aTop); } \ + NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) { return _to GetScrollbars(aScrollbars); } \ + NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) { return _to GetFrames(aFrames); } \ + NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \ + NS_IMETHOD GetTextZoom(float *aTextZoom) { return _to GetTextZoom(aTextZoom); } \ + NS_IMETHOD SetTextZoom(float aTextZoom) { return _to SetTextZoom(aTextZoom); } \ + NS_IMETHOD GetScrollX(PRInt32 *aScrollX) { return _to GetScrollX(aScrollX); } \ + NS_IMETHOD GetScrollY(PRInt32 *aScrollY) { return _to GetScrollY(aScrollY); } \ + NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) { return _to ScrollTo(xScroll, yScroll); } \ + NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) { return _to ScrollBy(xScrollDif, yScrollDif); } \ + NS_IMETHOD GetSelection(nsISelection **_retval) { return _to GetSelection(_retval); } \ + NS_IMETHOD ScrollByLines(PRInt32 numLines) { return _to ScrollByLines(numLines); } \ + NS_IMETHOD ScrollByPages(PRInt32 numPages) { return _to ScrollByPages(numPages); } \ + NS_IMETHOD SizeToContent(void) { return _to SizeToContent(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMWINDOW(_to) \ + NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \ + NS_IMETHOD GetParent(nsIDOMWindow * *aParent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParent(aParent); } \ + NS_IMETHOD GetTop(nsIDOMWindow * *aTop) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTop(aTop); } \ + NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollbars(aScrollbars); } \ + NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrames(aFrames); } \ + NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ + NS_IMETHOD GetTextZoom(float *aTextZoom) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTextZoom(aTextZoom); } \ + NS_IMETHOD SetTextZoom(float aTextZoom) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTextZoom(aTextZoom); } \ + NS_IMETHOD GetScrollX(PRInt32 *aScrollX) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollX(aScrollX); } \ + NS_IMETHOD GetScrollY(PRInt32 *aScrollY) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollY(aScrollY); } \ + NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollTo(xScroll, yScroll); } \ + NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollBy(xScrollDif, yScrollDif); } \ + NS_IMETHOD GetSelection(nsISelection **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelection(_retval); } \ + NS_IMETHOD ScrollByLines(PRInt32 numLines) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollByLines(numLines); } \ + NS_IMETHOD ScrollByPages(PRInt32 numPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollByPages(numPages); } \ + NS_IMETHOD SizeToContent(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeToContent(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMWindow : public nsIDOMWindow +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMWINDOW + + nsDOMWindow(); + +private: + ~nsDOMWindow(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMWindow, nsIDOMWindow) + +nsDOMWindow::nsDOMWindow() +{ + /* member initializers and constructor code */ +} + +nsDOMWindow::~nsDOMWindow() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMDocument document; */ +NS_IMETHODIMP nsDOMWindow::GetDocument(nsIDOMDocument * *aDocument) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMWindow parent; */ +NS_IMETHODIMP nsDOMWindow::GetParent(nsIDOMWindow * *aParent) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMWindow top; */ +NS_IMETHODIMP nsDOMWindow::GetTop(nsIDOMWindow * *aTop) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMBarProp scrollbars; */ +NS_IMETHODIMP nsDOMWindow::GetScrollbars(nsIDOMBarProp * *aScrollbars) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] readonly attribute nsIDOMWindowCollection frames; */ +NS_IMETHODIMP nsDOMWindow::GetFrames(nsIDOMWindowCollection * *aFrames) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute DOMString name; */ +NS_IMETHODIMP nsDOMWindow::GetName(nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMWindow::SetName(const nsAString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] attribute float textZoom; */ +NS_IMETHODIMP nsDOMWindow::GetTextZoom(float *aTextZoom) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMWindow::SetTextZoom(float aTextZoom) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long scrollX; */ +NS_IMETHODIMP nsDOMWindow::GetScrollX(PRInt32 *aScrollX) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long scrollY; */ +NS_IMETHODIMP nsDOMWindow::GetScrollY(PRInt32 *aScrollY) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void scrollTo (in long xScroll, in long yScroll); */ +NS_IMETHODIMP nsDOMWindow::ScrollTo(PRInt32 xScroll, PRInt32 yScroll) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void scrollBy (in long xScrollDif, in long yScrollDif); */ +NS_IMETHODIMP nsDOMWindow::ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISelection getSelection (); */ +NS_IMETHODIMP nsDOMWindow::GetSelection(nsISelection **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void scrollByLines (in long numLines); */ +NS_IMETHODIMP nsDOMWindow::ScrollByLines(PRInt32 numLines) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void scrollByPages (in long numPages); */ +NS_IMETHODIMP nsDOMWindow::ScrollByPages(PRInt32 numPages) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void sizeToContent (); */ +NS_IMETHODIMP nsDOMWindow::SizeToContent() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMWindow_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindow2.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindow2.h new file mode 100644 index 00000000..bdde4406 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindow2.h @@ -0,0 +1,94 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/base/nsIDOMWindow2.idl + */ + +#ifndef __gen_nsIDOMWindow2_h__ +#define __gen_nsIDOMWindow2_h__ + + +#ifndef __gen_nsIDOMWindow_h__ +#include "nsIDOMWindow.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMWindow2 */ +#define NS_IDOMWINDOW2_IID_STR "65455132-b96a-40ec-adea-52fa22b1028c" + +#define NS_IDOMWINDOW2_IID \ + {0x65455132, 0xb96a, 0x40ec, \ + { 0xad, 0xea, 0x52, 0xfa, 0x22, 0xb1, 0x02, 0x8c }} + +class NS_NO_VTABLE nsIDOMWindow2 : public nsIDOMWindow { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMWINDOW2_IID) + + /** + * Get the window root for this window. This is useful for hooking + * up event listeners to this window and every other window nested + * in the window root. + */ + /* [noscript] readonly attribute nsIDOMEventTarget windowRoot; */ + NS_IMETHOD GetWindowRoot(nsIDOMEventTarget * *aWindowRoot) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMWINDOW2 \ + NS_IMETHOD GetWindowRoot(nsIDOMEventTarget * *aWindowRoot); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMWINDOW2(_to) \ + NS_IMETHOD GetWindowRoot(nsIDOMEventTarget * *aWindowRoot) { return _to GetWindowRoot(aWindowRoot); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMWINDOW2(_to) \ + NS_IMETHOD GetWindowRoot(nsIDOMEventTarget * *aWindowRoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowRoot(aWindowRoot); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMWindow2 : public nsIDOMWindow2 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMWINDOW2 + + nsDOMWindow2(); + +private: + ~nsDOMWindow2(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMWindow2, nsIDOMWindow2) + +nsDOMWindow2::nsDOMWindow2() +{ + /* member initializers and constructor code */ +} + +nsDOMWindow2::~nsDOMWindow2() +{ + /* destructor code */ +} + +/* [noscript] readonly attribute nsIDOMEventTarget windowRoot; */ +NS_IMETHODIMP nsDOMWindow2::GetWindowRoot(nsIDOMEventTarget * *aWindowRoot) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMWindow2_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindowCollection.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindowCollection.h new file mode 100644 index 00000000..fca08e09 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindowCollection.h @@ -0,0 +1,128 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/base/nsIDOMWindowCollection.idl + */ + +#ifndef __gen_nsIDOMWindowCollection_h__ +#define __gen_nsIDOMWindowCollection_h__ + + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMWindowCollection */ +#define NS_IDOMWINDOWCOLLECTION_IID_STR "a6cf906f-15b3-11d2-932e-00805f8add32" + +#define NS_IDOMWINDOWCOLLECTION_IID \ + {0xa6cf906f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }} + +class NS_NO_VTABLE nsIDOMWindowCollection : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMWINDOWCOLLECTION_IID) + + /** + * The nsIDOMWindowCollection interface is an interface for a + * collection of DOM window objects. + * + * @status FROZEN + */ +/** + * Accessor for the number of windows in this collection. + */ + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /** + * Method for accessing an item in this collection by index. + */ + /* nsIDOMWindow item (in unsigned long index); */ + NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval) = 0; + + /** + * Method for accessing an item in this collection by window name. + */ + /* nsIDOMWindow namedItem (in DOMString name); */ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMWINDOWCOLLECTION \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval); \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMWINDOWCOLLECTION(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval) { return _to Item(index, _retval); } \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) { return _to NamedItem(name, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMWINDOWCOLLECTION(_to) \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \ + NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NamedItem(name, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMWindowCollection : public nsIDOMWindowCollection +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMWINDOWCOLLECTION + + nsDOMWindowCollection(); + +private: + ~nsDOMWindowCollection(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMWindowCollection, nsIDOMWindowCollection) + +nsDOMWindowCollection::nsDOMWindowCollection() +{ + /* member initializers and constructor code */ +} + +nsDOMWindowCollection::~nsDOMWindowCollection() +{ + /* destructor code */ +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsDOMWindowCollection::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMWindow item (in unsigned long index); */ +NS_IMETHODIMP nsDOMWindowCollection::Item(PRUint32 index, nsIDOMWindow **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMWindow namedItem (in DOMString name); */ +NS_IMETHODIMP nsDOMWindowCollection::NamedItem(const nsAString & name, nsIDOMWindow **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMWindowCollection_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindowUtils.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindowUtils.h new file mode 100644 index 00000000..8c28e0cb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDOMWindowUtils.h @@ -0,0 +1,136 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/base/nsIDOMWindowUtils.idl + */ + +#ifndef __gen_nsIDOMWindowUtils_h__ +#define __gen_nsIDOMWindowUtils_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDOMWindowUtils */ +#define NS_IDOMWINDOWUTILS_IID_STR "8a157a4f-a81e-489f-baf2-bc8970d60472" + +#define NS_IDOMWINDOWUTILS_IID \ + {0x8a157a4f, 0xa81e, 0x489f, \ + { 0xba, 0xf2, 0xbc, 0x89, 0x70, 0xd6, 0x04, 0x72 }} + +/** + * nsIDOMWindowUtils is intended for giving privileged script access to + * additional properties and methods of nsIDOMWindow unavailable to + * content script. Access this interface by calling getInterface on a DOMWindow. + */ +class NS_NO_VTABLE nsIDOMWindowUtils : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMWINDOWUTILS_IID) + + /** + * Image animation mode of the window. When this attribute's value + * is changed, the implementation should set all images in the window + * to the given value. That is, when set to kDontAnimMode, all images + * will stop animating. The attribute's value must be one of the + * animationMode values from imgIContainer. + * @note Images may individually override the window's setting after + * the window's mode is set. Therefore images given different modes + * since the last setting of the window's mode may behave + * out of line with the window's overall mode. + * @note The attribute's value is the window's overall mode. It may + * for example continue to report kDontAnimMode after all images + * have subsequently been individually animated. + * @note Only images immediately in this window are affected; + * this is not recursive to subwindows. + * @see imgIContainer + */ + /* attribute unsigned short imageAnimationMode; */ + NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) = 0; + NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) = 0; + + /** + * Function to get metadata associated with the window's current document + * @param aName the name of the metadata. This should be all lowercase. + * @return the value of the metadata, or the empty string if it's not set + */ + /* AString getDocumentMetadata (in AString aName); */ + NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDOMWINDOWUTILS \ + NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode); \ + NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode); \ + NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDOMWINDOWUTILS(_to) \ + NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) { return _to GetImageAnimationMode(aImageAnimationMode); } \ + NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) { return _to SetImageAnimationMode(aImageAnimationMode); } \ + NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) { return _to GetDocumentMetadata(aName, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDOMWINDOWUTILS(_to) \ + NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageAnimationMode(aImageAnimationMode); } \ + NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetImageAnimationMode(aImageAnimationMode); } \ + NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentMetadata(aName, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDOMWindowUtils : public nsIDOMWindowUtils +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMWINDOWUTILS + + nsDOMWindowUtils(); + +private: + ~nsDOMWindowUtils(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDOMWindowUtils, nsIDOMWindowUtils) + +nsDOMWindowUtils::nsDOMWindowUtils() +{ + /* member initializers and constructor code */ +} + +nsDOMWindowUtils::~nsDOMWindowUtils() +{ + /* destructor code */ +} + +/* attribute unsigned short imageAnimationMode; */ +NS_IMETHODIMP nsDOMWindowUtils::GetImageAnimationMode(PRUint16 *aImageAnimationMode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsDOMWindowUtils::SetImageAnimationMode(PRUint16 aImageAnimationMode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* AString getDocumentMetadata (in AString aName); */ +NS_IMETHODIMP nsDOMWindowUtils::GetDocumentMetadata(const nsAString & aName, nsAString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDOMWindowUtils_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDebug.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDebug.h new file mode 100644 index 00000000..01a093dd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDebug.h @@ -0,0 +1,133 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsIDebug.idl + */ + +#ifndef __gen_nsIDebug_h__ +#define __gen_nsIDebug_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDebug */ +#define NS_IDEBUG_IID_STR "3bf0c3d7-3bd9-4cf2-a971-33572c503e1e" + +#define NS_IDEBUG_IID \ + {0x3bf0c3d7, 0x3bd9, 0x4cf2, \ + { 0xa9, 0x71, 0x33, 0x57, 0x2c, 0x50, 0x3e, 0x1e }} + +/** + * nsIDebug is an interface between XPCOM Glue and XPCOM. Users should access + * the nsIDebug interface through the static class nsDebug. + * @see nsDebug.h + * + * @status UNDER_REVIEW + * + */ +class NS_NO_VTABLE nsIDebug : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEBUG_IID) + + /* void assertion (in string aStr, in string aExpr, in string aFile, in long aLine); */ + NS_IMETHOD Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine) = 0; + + /* void warning (in string aStr, in string aFile, in long aLine); */ + NS_IMETHOD Warning(const char *aStr, const char *aFile, PRInt32 aLine) = 0; + + /* void break (in string aFile, in long aLine); */ + NS_IMETHOD Break(const char *aFile, PRInt32 aLine) = 0; + + /* void abort (in string aFile, in long aLine); */ + NS_IMETHOD Abort(const char *aFile, PRInt32 aLine) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDEBUG \ + NS_IMETHOD Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine); \ + NS_IMETHOD Warning(const char *aStr, const char *aFile, PRInt32 aLine); \ + NS_IMETHOD Break(const char *aFile, PRInt32 aLine); \ + NS_IMETHOD Abort(const char *aFile, PRInt32 aLine); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDEBUG(_to) \ + NS_IMETHOD Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine) { return _to Assertion(aStr, aExpr, aFile, aLine); } \ + NS_IMETHOD Warning(const char *aStr, const char *aFile, PRInt32 aLine) { return _to Warning(aStr, aFile, aLine); } \ + NS_IMETHOD Break(const char *aFile, PRInt32 aLine) { return _to Break(aFile, aLine); } \ + NS_IMETHOD Abort(const char *aFile, PRInt32 aLine) { return _to Abort(aFile, aLine); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDEBUG(_to) \ + NS_IMETHOD Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->Assertion(aStr, aExpr, aFile, aLine); } \ + NS_IMETHOD Warning(const char *aStr, const char *aFile, PRInt32 aLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->Warning(aStr, aFile, aLine); } \ + NS_IMETHOD Break(const char *aFile, PRInt32 aLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->Break(aFile, aLine); } \ + NS_IMETHOD Abort(const char *aFile, PRInt32 aLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->Abort(aFile, aLine); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDebug : public nsIDebug +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDEBUG + + nsDebug(); + +private: + ~nsDebug(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDebug, nsIDebug) + +nsDebug::nsDebug() +{ + /* member initializers and constructor code */ +} + +nsDebug::~nsDebug() +{ + /* destructor code */ +} + +/* void assertion (in string aStr, in string aExpr, in string aFile, in long aLine); */ +NS_IMETHODIMP nsDebug::Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void warning (in string aStr, in string aFile, in long aLine); */ +NS_IMETHODIMP nsDebug::Warning(const char *aStr, const char *aFile, PRInt32 aLine) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void break (in string aFile, in long aLine); */ +NS_IMETHODIMP nsDebug::Break(const char *aFile, PRInt32 aLine) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void abort (in string aFile, in long aLine); */ +NS_IMETHODIMP nsDebug::Abort(const char *aFile, PRInt32 aLine) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDebug_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIDirectoryService.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIDirectoryService.h new file mode 100644 index 00000000..5c374f81 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIDirectoryService.h @@ -0,0 +1,332 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/io/nsIDirectoryService.idl + */ + +#ifndef __gen_nsIDirectoryService_h__ +#define __gen_nsIDirectoryService_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsIFile_h__ +#include "nsIFile.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIDirectoryServiceProvider */ +#define NS_IDIRECTORYSERVICEPROVIDER_IID_STR "bbf8cab0-d43a-11d3-8cc2-00609792278c" + +#define NS_IDIRECTORYSERVICEPROVIDER_IID \ + {0xbbf8cab0, 0xd43a, 0x11d3, \ + { 0x8c, 0xc2, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c }} + +/** + * nsIDirectoryServiceProvider + * + * Used by Directory Service to get file locations. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDirectoryServiceProvider : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDIRECTORYSERVICEPROVIDER_IID) + + /** + * getFile + * + * Directory Service calls this when it gets the first request for + * a prop or on every request if the prop is not persistent. + * + * @param prop The symbolic name of the file. + * @param persistent TRUE - The returned file will be cached by Directory + * Service. Subsequent requests for this prop will + * bypass the provider and use the cache. + * FALSE - The provider will be asked for this prop + * each time it is requested. + * + * @return The file represented by the property. + * + */ + /* nsIFile getFile (in string prop, out PRBool persistent); */ + NS_IMETHOD GetFile(const char *prop, PRBool *persistent, nsIFile **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDIRECTORYSERVICEPROVIDER \ + NS_IMETHOD GetFile(const char *prop, PRBool *persistent, nsIFile **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDIRECTORYSERVICEPROVIDER(_to) \ + NS_IMETHOD GetFile(const char *prop, PRBool *persistent, nsIFile **_retval) { return _to GetFile(prop, persistent, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDIRECTORYSERVICEPROVIDER(_to) \ + NS_IMETHOD GetFile(const char *prop, PRBool *persistent, nsIFile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(prop, persistent, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDirectoryServiceProvider : public nsIDirectoryServiceProvider +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDIRECTORYSERVICEPROVIDER + + nsDirectoryServiceProvider(); + +private: + ~nsDirectoryServiceProvider(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDirectoryServiceProvider, nsIDirectoryServiceProvider) + +nsDirectoryServiceProvider::nsDirectoryServiceProvider() +{ + /* member initializers and constructor code */ +} + +nsDirectoryServiceProvider::~nsDirectoryServiceProvider() +{ + /* destructor code */ +} + +/* nsIFile getFile (in string prop, out PRBool persistent); */ +NS_IMETHODIMP nsDirectoryServiceProvider::GetFile(const char *prop, PRBool *persistent, nsIFile **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsIDirectoryServiceProvider2 */ +#define NS_IDIRECTORYSERVICEPROVIDER2_IID_STR "2f977d4b-5485-11d4-87e2-0010a4e75ef2" + +#define NS_IDIRECTORYSERVICEPROVIDER2_IID \ + {0x2f977d4b, 0x5485, 0x11d4, \ + { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 }} + +/** + * nsIDirectoryServiceProvider2 + * + * An extension of nsIDirectoryServiceProvider which allows + * multiple files to be returned for the given key. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDirectoryServiceProvider2 : public nsIDirectoryServiceProvider { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDIRECTORYSERVICEPROVIDER2_IID) + + /** + * getFiles + * + * Directory Service calls this when it gets a request for + * a prop and the requested type is nsISimpleEnumerator. + * + * @param prop The symbolic name of the file list. + * + * @return An enumerator for a list of file locations. + * The elements in the enumeration are nsIFile + * @returnCode NS_SUCCESS_AGGREGATE_RESULT if this result should be + * aggregated with other "lower" providers. + */ + /* nsISimpleEnumerator getFiles (in string prop); */ + NS_IMETHOD GetFiles(const char *prop, nsISimpleEnumerator **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 \ + NS_IMETHOD GetFiles(const char *prop, nsISimpleEnumerator **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDIRECTORYSERVICEPROVIDER2(_to) \ + NS_IMETHOD GetFiles(const char *prop, nsISimpleEnumerator **_retval) { return _to GetFiles(prop, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDIRECTORYSERVICEPROVIDER2(_to) \ + NS_IMETHOD GetFiles(const char *prop, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFiles(prop, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDirectoryServiceProvider2 : public nsIDirectoryServiceProvider2 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 + + nsDirectoryServiceProvider2(); + +private: + ~nsDirectoryServiceProvider2(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDirectoryServiceProvider2, nsIDirectoryServiceProvider2) + +nsDirectoryServiceProvider2::nsDirectoryServiceProvider2() +{ + /* member initializers and constructor code */ +} + +nsDirectoryServiceProvider2::~nsDirectoryServiceProvider2() +{ + /* destructor code */ +} + +/* nsISimpleEnumerator getFiles (in string prop); */ +NS_IMETHODIMP nsDirectoryServiceProvider2::GetFiles(const char *prop, nsISimpleEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsIDirectoryService */ +#define NS_IDIRECTORYSERVICE_IID_STR "57a66a60-d43a-11d3-8cc2-00609792278c" + +#define NS_IDIRECTORYSERVICE_IID \ + {0x57a66a60, 0xd43a, 0x11d3, \ + { 0x8c, 0xc2, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c }} + +/** + * nsIDirectoryService + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIDirectoryService : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDIRECTORYSERVICE_IID) + + /** + * init + * + * Must be called. Used internally by XPCOM initialization. + * + */ + /* void init (); */ + NS_IMETHOD Init(void) = 0; + + /** + * registerProvider + * + * Register a provider with the service. + * + * @param prov The service will keep a strong reference + * to this object. It will be released when + * the service is released. + * + */ + /* void registerProvider (in nsIDirectoryServiceProvider prov); */ + NS_IMETHOD RegisterProvider(nsIDirectoryServiceProvider *prov) = 0; + + /** + * unregisterProvider + * + * Unregister a provider with the service. + * + * @param prov + * + */ + /* void unregisterProvider (in nsIDirectoryServiceProvider prov); */ + NS_IMETHOD UnregisterProvider(nsIDirectoryServiceProvider *prov) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIDIRECTORYSERVICE \ + NS_IMETHOD Init(void); \ + NS_IMETHOD RegisterProvider(nsIDirectoryServiceProvider *prov); \ + NS_IMETHOD UnregisterProvider(nsIDirectoryServiceProvider *prov); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIDIRECTORYSERVICE(_to) \ + NS_IMETHOD Init(void) { return _to Init(); } \ + NS_IMETHOD RegisterProvider(nsIDirectoryServiceProvider *prov) { return _to RegisterProvider(prov); } \ + NS_IMETHOD UnregisterProvider(nsIDirectoryServiceProvider *prov) { return _to UnregisterProvider(prov); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIDIRECTORYSERVICE(_to) \ + NS_IMETHOD Init(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(); } \ + NS_IMETHOD RegisterProvider(nsIDirectoryServiceProvider *prov) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterProvider(prov); } \ + NS_IMETHOD UnregisterProvider(nsIDirectoryServiceProvider *prov) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterProvider(prov); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsDirectoryService : public nsIDirectoryService +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDIRECTORYSERVICE + + nsDirectoryService(); + +private: + ~nsDirectoryService(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsDirectoryService, nsIDirectoryService) + +nsDirectoryService::nsDirectoryService() +{ + /* member initializers and constructor code */ +} + +nsDirectoryService::~nsDirectoryService() +{ + /* destructor code */ +} + +/* void init (); */ +NS_IMETHODIMP nsDirectoryService::Init() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerProvider (in nsIDirectoryServiceProvider prov); */ +NS_IMETHODIMP nsDirectoryService::RegisterProvider(nsIDirectoryServiceProvider *prov) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterProvider (in nsIDirectoryServiceProvider prov); */ +NS_IMETHODIMP nsDirectoryService::UnregisterProvider(nsIDirectoryServiceProvider *prov) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIDirectoryService_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIEmbeddingSiteWindow.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIEmbeddingSiteWindow.h new file mode 100644 index 00000000..f70147eb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIEmbeddingSiteWindow.h @@ -0,0 +1,262 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIEmbeddingSiteWindow.idl + */ + +#ifndef __gen_nsIEmbeddingSiteWindow_h__ +#define __gen_nsIEmbeddingSiteWindow_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIEmbeddingSiteWindow */ +#define NS_IEMBEDDINGSITEWINDOW_IID_STR "3e5432cd-9568-4bd1-8cbe-d50aba110743" + +#define NS_IEMBEDDINGSITEWINDOW_IID \ + {0x3e5432cd, 0x9568, 0x4bd1, \ + { 0x8c, 0xbe, 0xd5, 0x0a, 0xba, 0x11, 0x07, 0x43 }} + +/** + * The nsIEmbeddingSiteWindow is implemented by the embedder to provide + * Gecko with the means to call up to the host to resize the window, + * hide or show it and set/get its title. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIEmbeddingSiteWindow : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IEMBEDDINGSITEWINDOW_IID) + + /** + * Flag indicates that position of the top left corner of the outer area + * is required/specified. + * + * @see setDimensions + * @see getDimensions + */ + enum { DIM_FLAGS_POSITION = 1U }; + + /** + * Flag indicates that the size of the inner area is required/specified. + * + * @note The inner and outer flags are mutually exclusive and it is + * invalid to combine them. + * + * @see setDimensions + * @see getDimensions + * @see DIM_FLAGS_SIZE_OUTER + */ + enum { DIM_FLAGS_SIZE_INNER = 2U }; + + /** + * Flag indicates that the size of the outer area is required/specified. + * + * @see setDimensions + * @see getDimensions + * @see DIM_FLAGS_SIZE_INNER + */ + enum { DIM_FLAGS_SIZE_OUTER = 4U }; + + /** + * Sets the dimensions for the window; the position & size. The + * flags to indicate what the caller wants to set and whether the size + * refers to the inner or outer area. The inner area refers to just + * the embedded area, wheras the outer area can also include any + * surrounding chrome, window frame, title bar, and so on. + * + * @param flags Combination of position, inner and outer size flags. + * @param x Left hand corner of the outer area. + * @param y Top corner of the outer area. + * @param cx Width of the inner or outer area. + * @param cy Height of the inner or outer area. + * + * @return <code>NS_OK</code> if operation was performed correctly; + * <code>NS_ERROR_UNEXPECTED</code> if window could not be + * destroyed; + * <code>NS_ERROR_INVALID_ARG</code> for bad flag combination + * or illegal dimensions. + * + * @see getDimensions + * @see DIM_FLAGS_POSITION + * @see DIM_FLAGS_SIZE_OUTER + * @see DIM_FLAGS_SIZE_INNER + */ + /* void setDimensions (in unsigned long flags, in long x, in long y, in long cx, in long cy); */ + NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy) = 0; + + /** + * Gets the dimensions of the window. The caller may pass + * <CODE>nsnull</CODE> for any value it is uninterested in receiving. + * + * @param flags Combination of position, inner and outer size flag . + * @param x Left hand corner of the outer area; or <CODE>nsnull</CODE>. + * @param y Top corner of the outer area; or <CODE>nsnull</CODE>. + * @param cx Width of the inner or outer area; or <CODE>nsnull</CODE>. + * @param cy Height of the inner or outer area; or <CODE>nsnull</CODE>. + * + * @see setDimensions + * @see DIM_FLAGS_POSITION + * @see DIM_FLAGS_SIZE_OUTER + * @see DIM_FLAGS_SIZE_INNER + */ + /* void getDimensions (in unsigned long flags, out long x, out long y, out long cx, out long cy); */ + NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) = 0; + + /** + * Give the window focus. + */ + /* void setFocus (); */ + NS_IMETHOD SetFocus(void) = 0; + + /** + * Visibility of the window. + */ + /* attribute boolean visibility; */ + NS_IMETHOD GetVisibility(PRBool *aVisibility) = 0; + NS_IMETHOD SetVisibility(PRBool aVisibility) = 0; + + /** + * Title of the window. + */ + /* attribute wstring title; */ + NS_IMETHOD GetTitle(PRUnichar * *aTitle) = 0; + NS_IMETHOD SetTitle(const PRUnichar * aTitle) = 0; + + /** + * Native window for the site's window. The implementor should copy the + * native window object into the address supplied by the caller. The + * type of the native window that the address refers to is platform + * and OS specific as follows: + * + * <ul> + * <li>On Win32 it is an <CODE>HWND</CODE>.</li> + * <li>On MacOS this is a <CODE>WindowPtr</CODE>.</li> + * <li>On GTK this is a <CODE>GtkWidget*</CODE>.</li> + * </ul> + */ + /* [noscript] readonly attribute voidPtr siteWindow; */ + NS_IMETHOD GetSiteWindow(void * *aSiteWindow) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIEMBEDDINGSITEWINDOW \ + NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy); \ + NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy); \ + NS_IMETHOD SetFocus(void); \ + NS_IMETHOD GetVisibility(PRBool *aVisibility); \ + NS_IMETHOD SetVisibility(PRBool aVisibility); \ + NS_IMETHOD GetTitle(PRUnichar * *aTitle); \ + NS_IMETHOD SetTitle(const PRUnichar * aTitle); \ + NS_IMETHOD GetSiteWindow(void * *aSiteWindow); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIEMBEDDINGSITEWINDOW(_to) \ + NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy) { return _to SetDimensions(flags, x, y, cx, cy); } \ + NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) { return _to GetDimensions(flags, x, y, cx, cy); } \ + NS_IMETHOD SetFocus(void) { return _to SetFocus(); } \ + NS_IMETHOD GetVisibility(PRBool *aVisibility) { return _to GetVisibility(aVisibility); } \ + NS_IMETHOD SetVisibility(PRBool aVisibility) { return _to SetVisibility(aVisibility); } \ + NS_IMETHOD GetTitle(PRUnichar * *aTitle) { return _to GetTitle(aTitle); } \ + NS_IMETHOD SetTitle(const PRUnichar * aTitle) { return _to SetTitle(aTitle); } \ + NS_IMETHOD GetSiteWindow(void * *aSiteWindow) { return _to GetSiteWindow(aSiteWindow); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIEMBEDDINGSITEWINDOW(_to) \ + NS_IMETHOD SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDimensions(flags, x, y, cx, cy); } \ + NS_IMETHOD GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDimensions(flags, x, y, cx, cy); } \ + NS_IMETHOD SetFocus(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocus(); } \ + NS_IMETHOD GetVisibility(PRBool *aVisibility) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVisibility(aVisibility); } \ + NS_IMETHOD SetVisibility(PRBool aVisibility) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVisibility(aVisibility); } \ + NS_IMETHOD GetTitle(PRUnichar * *aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \ + NS_IMETHOD SetTitle(const PRUnichar * aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTitle(aTitle); } \ + NS_IMETHOD GetSiteWindow(void * *aSiteWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSiteWindow(aSiteWindow); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsEmbeddingSiteWindow : public nsIEmbeddingSiteWindow +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIEMBEDDINGSITEWINDOW + + nsEmbeddingSiteWindow(); + +private: + ~nsEmbeddingSiteWindow(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsEmbeddingSiteWindow, nsIEmbeddingSiteWindow) + +nsEmbeddingSiteWindow::nsEmbeddingSiteWindow() +{ + /* member initializers and constructor code */ +} + +nsEmbeddingSiteWindow::~nsEmbeddingSiteWindow() +{ + /* destructor code */ +} + +/* void setDimensions (in unsigned long flags, in long x, in long y, in long cx, in long cy); */ +NS_IMETHODIMP nsEmbeddingSiteWindow::SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getDimensions (in unsigned long flags, out long x, out long y, out long cx, out long cy); */ +NS_IMETHODIMP nsEmbeddingSiteWindow::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setFocus (); */ +NS_IMETHODIMP nsEmbeddingSiteWindow::SetFocus() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean visibility; */ +NS_IMETHODIMP nsEmbeddingSiteWindow::GetVisibility(PRBool *aVisibility) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsEmbeddingSiteWindow::SetVisibility(PRBool aVisibility) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute wstring title; */ +NS_IMETHODIMP nsEmbeddingSiteWindow::GetTitle(PRUnichar * *aTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsEmbeddingSiteWindow::SetTitle(const PRUnichar * aTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] readonly attribute voidPtr siteWindow; */ +NS_IMETHODIMP nsEmbeddingSiteWindow::GetSiteWindow(void * *aSiteWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIEmbeddingSiteWindow_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIFactory.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIFactory.h new file mode 100644 index 00000000..6c020c2f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIFactory.h @@ -0,0 +1,133 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsIFactory.idl + */ + +#ifndef __gen_nsIFactory_h__ +#define __gen_nsIFactory_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIFactory */ +#define NS_IFACTORY_IID_STR "00000001-0000-0000-c000-000000000046" + +#define NS_IFACTORY_IID \ + {0x00000001, 0x0000, 0x0000, \ + { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} + +/** + * A class factory allows the creation of nsISupports derived + * components without specifying a concrete base class. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIFactory : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFACTORY_IID) + + /** + * 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 CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) = 0; + + /** + * 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 LockFactory(PRBool lock) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIFACTORY \ + NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result); \ + NS_IMETHOD LockFactory(PRBool lock); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIFACTORY(_to) \ + NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) { return _to CreateInstance(aOuter, iid, result); } \ + NS_IMETHOD LockFactory(PRBool lock) { return _to LockFactory(lock); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIFACTORY(_to) \ + NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstance(aOuter, iid, result); } \ + NS_IMETHOD LockFactory(PRBool lock) { return !_to ? NS_ERROR_NULL_POINTER : _to->LockFactory(lock); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsFactory : public nsIFactory +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIFACTORY + + nsFactory(); + +private: + ~nsFactory(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsFactory, nsIFactory) + +nsFactory::nsFactory() +{ + /* member initializers and constructor code */ +} + +nsFactory::~nsFactory() +{ + /* destructor code */ +} + +/* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */ +NS_IMETHODIMP nsFactory::CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void lockFactory (in PRBool lock); */ +NS_IMETHODIMP nsFactory::LockFactory(PRBool lock) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIFactory_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIFile.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIFile.h new file mode 100644 index 00000000..9e772621 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIFile.h @@ -0,0 +1,826 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/io/nsIFile.idl + */ + +#ifndef __gen_nsIFile_h__ +#define __gen_nsIFile_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsISimpleEnumerator; /* forward declaration */ + + +/* starting interface: nsIFile */ +#define NS_IFILE_IID_STR "c8c0a080-0868-11d3-915f-d9d889d48e3c" + +#define NS_IFILE_IID \ + {0xc8c0a080, 0x0868, 0x11d3, \ + { 0x91, 0x5f, 0xd9, 0xd8, 0x89, 0xd4, 0x8e, 0x3c }} + +/** + * This is the only correct cross-platform way to specify a file. + * Strings are not such a way. If you grew up on windows or unix, you + * may think they are. Welcome to reality. + * + * All methods with string parameters have two forms. The preferred + * form operates on UCS-2 encoded characters strings. An alternate + * form operates on characters strings encoded in the "native" charset. + * + * A string containing characters encoded in the native charset cannot + * be safely passed to javascript via xpconnect. Therefore, the "native + * methods" are not scriptable. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIFile : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILE_IID) + + /** + * Create Types + * + * NORMAL_FILE_TYPE - A normal file. + * DIRECTORY_TYPE - A directory/folder. + */ + enum { NORMAL_FILE_TYPE = 0U }; + + enum { DIRECTORY_TYPE = 1U }; + + /** + * append[Native] + * + * This function is used for constructing a descendent of the + * current nsIFile. + * + * @param node + * A string which is intended to be a child node of the nsIFile. + * For the |appendNative| method, the node must be in the native + * filesystem charset. + */ + /* void append (in AString node); */ + NS_IMETHOD Append(const nsAString & node) = 0; + + /* [noscript] void appendNative (in ACString node); */ + NS_IMETHOD AppendNative(const nsACString & node) = 0; + + /** + * Normalize the pathName (e.g. removing .. and . components on Unix). + */ + /* void normalize (); */ + NS_IMETHOD Normalize(void) = 0; + + /** + * create + * + * This function will create a new file or directory in the + * file system. Any nodes that have not been created or + * resolved, will be. If the file or directory already + * exists create() will return NS_ERROR_FILE_ALREADY_EXISTS. + * + * @param type + * This specifies the type of file system object + * to be made. The only two types at this time + * are file and directory which are defined above. + * If the type is unrecongnized, we will return an + * error (NS_ERROR_FILE_UNKNOWN_TYPE). + * + * @param permissions + * The unix style octal permissions. This may + * be ignored on systems that do not need to do + * permissions. + */ + /* void create (in unsigned long type, in unsigned long permissions); */ + NS_IMETHOD Create(PRUint32 type, PRUint32 permissions) = 0; + + /** + * Accessor to the leaf name of the file itself. + * For the |nativeLeafName| method, the nativeLeafName must + * be in the native filesystem charset. + */ + /* attribute AString leafName; */ + NS_IMETHOD GetLeafName(nsAString & aLeafName) = 0; + NS_IMETHOD SetLeafName(const nsAString & aLeafName) = 0; + + /* [noscript] attribute ACString nativeLeafName; */ + NS_IMETHOD GetNativeLeafName(nsACString & aNativeLeafName) = 0; + NS_IMETHOD SetNativeLeafName(const nsACString & aNativeLeafName) = 0; + + /** + * copyTo[Native] + * + * This will copy this file to the specified newParentDir. + * If a newName is specified, the file will be renamed. + * If 'this' is not created we will return an error + * (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST). + * + * copyTo may fail if the file already exists in the destination + * directory. + * + * copyTo will NOT resolve aliases/shortcuts during the copy. + * + * @param newParentDir + * This param is the destination directory. If the + * newParentDir is null, copyTo() will use the parent + * directory of this file. If the newParentDir is not + * empty and is not a directory, an error will be + * returned (NS_ERROR_FILE_DESTINATION_NOT_DIR). For the + * |CopyToNative| method, the newName must be in the + * native filesystem charset. + * + * @param newName + * This param allows you to specify a new name for + * the file to be copied. This param may be empty, in + * which case the current leaf name will be used. + */ + /* void copyTo (in nsIFile newParentDir, in AString newName); */ + NS_IMETHOD CopyTo(nsIFile *newParentDir, const nsAString & newName) = 0; + + /* [noscript] void CopyToNative (in nsIFile newParentDir, in ACString newName); */ + NS_IMETHOD CopyToNative(nsIFile *newParentDir, const nsACString & newName) = 0; + + /** + * copyToFollowingLinks[Native] + * + * This function is identical to copyTo with the exception that, + * as the name implies, it follows symbolic links. The XP_UNIX + * implementation always follow symbolic links when copying. For + * the |CopyToFollowingLinks| method, the newName must be in the + * native filesystem charset. + */ + /* void copyToFollowingLinks (in nsIFile newParentDir, in AString newName); */ + NS_IMETHOD CopyToFollowingLinks(nsIFile *newParentDir, const nsAString & newName) = 0; + + /* [noscript] void copyToFollowingLinksNative (in nsIFile newParentDir, in ACString newName); */ + NS_IMETHOD CopyToFollowingLinksNative(nsIFile *newParentDir, const nsACString & newName) = 0; + + /** + * moveTo[Native] + * + * A method to move this file or directory to newParentDir. + * If a newName is specified, the file or directory will be renamed. + * If 'this' is not created we will return an error + * (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST). + * If 'this' is a file, and the destination file already exists, moveTo + * will replace the old file. + * + * moveTo will NOT resolve aliases/shortcuts during the copy. + * moveTo will do the right thing and allow copies across volumes. + * moveTo will return an error (NS_ERROR_FILE_DIR_NOT_EMPTY) if 'this' is + * a directory and the destination directory is not empty. + * moveTo will return an error (NS_ERROR_FILE_ACCESS_DENIED) if 'this' is + * a directory and the destination directory is not writable. + * + * @param newParentDir + * This param is the destination directory. If the + * newParentDir is empty, moveTo() will rename the file + * within its current directory. If the newParentDir is + * not empty and does not name a directory, an error will + * be returned (NS_ERROR_FILE_DESTINATION_NOT_DIR). For + * the |moveToNative| method, the newName must be in the + * native filesystem charset. + * + * @param newName + * This param allows you to specify a new name for + * the file to be moved. This param may be empty, in + * which case the current leaf name will be used. + */ + /* void moveTo (in nsIFile newParentDir, in AString newName); */ + NS_IMETHOD MoveTo(nsIFile *newParentDir, const nsAString & newName) = 0; + + /* [noscript] void moveToNative (in nsIFile newParentDir, in ACString newName); */ + NS_IMETHOD MoveToNative(nsIFile *newParentDir, const nsACString & newName) = 0; + + /** + * This will try to delete this file. The 'recursive' flag + * must be PR_TRUE to delete directories which are not empty. + * + * This will not resolve any symlinks. + */ + /* void remove (in boolean recursive); */ + NS_IMETHOD Remove(PRBool recursive) = 0; + + /** + * Attributes of nsIFile. + */ + /* attribute unsigned long permissions; */ + NS_IMETHOD GetPermissions(PRUint32 *aPermissions) = 0; + NS_IMETHOD SetPermissions(PRUint32 aPermissions) = 0; + + /* attribute unsigned long permissionsOfLink; */ + NS_IMETHOD GetPermissionsOfLink(PRUint32 *aPermissionsOfLink) = 0; + NS_IMETHOD SetPermissionsOfLink(PRUint32 aPermissionsOfLink) = 0; + + /** + * File Times are to be in milliseconds from + * midnight (00:00:00), January 1, 1970 Greenwich Mean + * Time (GMT). + */ + /* attribute PRInt64 lastModifiedTime; */ + NS_IMETHOD GetLastModifiedTime(PRInt64 *aLastModifiedTime) = 0; + NS_IMETHOD SetLastModifiedTime(PRInt64 aLastModifiedTime) = 0; + + /* attribute PRInt64 lastModifiedTimeOfLink; */ + NS_IMETHOD GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink) = 0; + NS_IMETHOD SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink) = 0; + + /** + * WARNING! On the Mac, getting/setting the file size with nsIFile + * only deals with the size of the data fork. If you need to + * know the size of the combined data and resource forks use the + * GetFileSizeWithResFork() method defined on nsILocalFileMac. + */ + /* attribute PRInt64 fileSize; */ + NS_IMETHOD GetFileSize(PRInt64 *aFileSize) = 0; + NS_IMETHOD SetFileSize(PRInt64 aFileSize) = 0; + + /* readonly attribute PRInt64 fileSizeOfLink; */ + NS_IMETHOD GetFileSizeOfLink(PRInt64 *aFileSizeOfLink) = 0; + + /** + * target & path + * + * Accessor to the string path. The native version of these + * strings are not guaranteed to be a usable path to pass to + * NSPR or the C stdlib. There are problems that affect + * platforms on which a path does not fully specify a file + * because two volumes can have the same name (e.g., XP_MAC). + * This is solved by holding "private", native data in the + * nsIFile implementation. This native data is lost when + * you convert to a string. + * + * DO NOT PASS TO USE WITH NSPR OR STDLIB! + * + * target + * Find out what the symlink points at. Will give error + * (NS_ERROR_FILE_INVALID_PATH) if not a symlink. + * + * path + * Find out what the nsIFile points at. + * + * Note that the ACString attributes are returned in the + * native filesystem charset. + * + */ + /* readonly attribute AString target; */ + NS_IMETHOD GetTarget(nsAString & aTarget) = 0; + + /* [noscript] readonly attribute ACString nativeTarget; */ + NS_IMETHOD GetNativeTarget(nsACString & aNativeTarget) = 0; + + /* readonly attribute AString path; */ + NS_IMETHOD GetPath(nsAString & aPath) = 0; + + /* [noscript] readonly attribute ACString nativePath; */ + NS_IMETHOD GetNativePath(nsACString & aNativePath) = 0; + + /* boolean exists (); */ + NS_IMETHOD Exists(PRBool *_retval) = 0; + + /* boolean isWritable (); */ + NS_IMETHOD IsWritable(PRBool *_retval) = 0; + + /* boolean isReadable (); */ + NS_IMETHOD IsReadable(PRBool *_retval) = 0; + + /* boolean isExecutable (); */ + NS_IMETHOD IsExecutable(PRBool *_retval) = 0; + + /* boolean isHidden (); */ + NS_IMETHOD IsHidden(PRBool *_retval) = 0; + + /* boolean isDirectory (); */ + NS_IMETHOD IsDirectory(PRBool *_retval) = 0; + + /* boolean isFile (); */ + NS_IMETHOD IsFile(PRBool *_retval) = 0; + + /* boolean isSymlink (); */ + NS_IMETHOD IsSymlink(PRBool *_retval) = 0; + + /** + * Not a regular file, not a directory, not a symlink. + */ + /* boolean isSpecial (); */ + NS_IMETHOD IsSpecial(PRBool *_retval) = 0; + + /** + * createUnique + * + * This function will create a new file or directory in the + * file system. Any nodes that have not been created or + * resolved, will be. If this file already exists, we try + * variations on the leaf name "suggestedName" until we find + * one that did not already exist. + * + * If the search for nonexistent files takes too long + * (thousands of the variants already exist), we give up and + * return NS_ERROR_FILE_TOO_BIG. + * + * @param type + * This specifies the type of file system object + * to be made. The only two types at this time + * are file and directory which are defined above. + * If the type is unrecongnized, we will return an + * error (NS_ERROR_FILE_UNKNOWN_TYPE). + * + * @param permissions + * The unix style octal permissions. This may + * be ignored on systems that do not need to do + * permissions. + */ + /* void createUnique (in unsigned long type, in unsigned long permissions); */ + NS_IMETHOD CreateUnique(PRUint32 type, PRUint32 permissions) = 0; + + /** + * clone() + * + * This function will allocate and initialize a nsIFile object to the + * exact location of the |this| nsIFile. + * + * @param file + * A nsIFile which this object will be initialize + * with. + * + */ + /* nsIFile clone (); */ + NS_IMETHOD Clone(nsIFile **_retval) = 0; + + /** + * Will determine if the inFile equals this. + */ + /* boolean equals (in nsIFile inFile); */ + NS_IMETHOD Equals(nsIFile *inFile, PRBool *_retval) = 0; + + /** + * Will determine if inFile is a descendant of this file + * If |recur| is true, look in subdirectories too + */ + /* boolean contains (in nsIFile inFile, in boolean recur); */ + NS_IMETHOD Contains(nsIFile *inFile, PRBool recur, PRBool *_retval) = 0; + + /** + * Parent will be null when this is at the top of the volume. + */ + /* readonly attribute nsIFile parent; */ + NS_IMETHOD GetParent(nsIFile * *aParent) = 0; + + /** + * Returns an enumeration of the elements in a directory. Each + * element in the enumeration is an nsIFile. + * + * @return NS_ERROR_FILE_NOT_DIRECTORY if the current nsIFile does + * not specify a directory. + */ + /* readonly attribute nsISimpleEnumerator directoryEntries; */ + NS_IMETHOD GetDirectoryEntries(nsISimpleEnumerator * *aDirectoryEntries) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIFILE \ + NS_IMETHOD Append(const nsAString & node); \ + NS_IMETHOD AppendNative(const nsACString & node); \ + NS_IMETHOD Normalize(void); \ + NS_IMETHOD Create(PRUint32 type, PRUint32 permissions); \ + NS_IMETHOD GetLeafName(nsAString & aLeafName); \ + NS_IMETHOD SetLeafName(const nsAString & aLeafName); \ + NS_IMETHOD GetNativeLeafName(nsACString & aNativeLeafName); \ + NS_IMETHOD SetNativeLeafName(const nsACString & aNativeLeafName); \ + NS_IMETHOD CopyTo(nsIFile *newParentDir, const nsAString & newName); \ + NS_IMETHOD CopyToNative(nsIFile *newParentDir, const nsACString & newName); \ + NS_IMETHOD CopyToFollowingLinks(nsIFile *newParentDir, const nsAString & newName); \ + NS_IMETHOD CopyToFollowingLinksNative(nsIFile *newParentDir, const nsACString & newName); \ + NS_IMETHOD MoveTo(nsIFile *newParentDir, const nsAString & newName); \ + NS_IMETHOD MoveToNative(nsIFile *newParentDir, const nsACString & newName); \ + NS_IMETHOD Remove(PRBool recursive); \ + NS_IMETHOD GetPermissions(PRUint32 *aPermissions); \ + NS_IMETHOD SetPermissions(PRUint32 aPermissions); \ + NS_IMETHOD GetPermissionsOfLink(PRUint32 *aPermissionsOfLink); \ + NS_IMETHOD SetPermissionsOfLink(PRUint32 aPermissionsOfLink); \ + NS_IMETHOD GetLastModifiedTime(PRInt64 *aLastModifiedTime); \ + NS_IMETHOD SetLastModifiedTime(PRInt64 aLastModifiedTime); \ + NS_IMETHOD GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink); \ + NS_IMETHOD SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink); \ + NS_IMETHOD GetFileSize(PRInt64 *aFileSize); \ + NS_IMETHOD SetFileSize(PRInt64 aFileSize); \ + NS_IMETHOD GetFileSizeOfLink(PRInt64 *aFileSizeOfLink); \ + NS_IMETHOD GetTarget(nsAString & aTarget); \ + NS_IMETHOD GetNativeTarget(nsACString & aNativeTarget); \ + NS_IMETHOD GetPath(nsAString & aPath); \ + NS_IMETHOD GetNativePath(nsACString & aNativePath); \ + NS_IMETHOD Exists(PRBool *_retval); \ + NS_IMETHOD IsWritable(PRBool *_retval); \ + NS_IMETHOD IsReadable(PRBool *_retval); \ + NS_IMETHOD IsExecutable(PRBool *_retval); \ + NS_IMETHOD IsHidden(PRBool *_retval); \ + NS_IMETHOD IsDirectory(PRBool *_retval); \ + NS_IMETHOD IsFile(PRBool *_retval); \ + NS_IMETHOD IsSymlink(PRBool *_retval); \ + NS_IMETHOD IsSpecial(PRBool *_retval); \ + NS_IMETHOD CreateUnique(PRUint32 type, PRUint32 permissions); \ + NS_IMETHOD Clone(nsIFile **_retval); \ + NS_IMETHOD Equals(nsIFile *inFile, PRBool *_retval); \ + NS_IMETHOD Contains(nsIFile *inFile, PRBool recur, PRBool *_retval); \ + NS_IMETHOD GetParent(nsIFile * *aParent); \ + NS_IMETHOD GetDirectoryEntries(nsISimpleEnumerator * *aDirectoryEntries); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIFILE(_to) \ + NS_IMETHOD Append(const nsAString & node) { return _to Append(node); } \ + NS_IMETHOD AppendNative(const nsACString & node) { return _to AppendNative(node); } \ + NS_IMETHOD Normalize(void) { return _to Normalize(); } \ + NS_IMETHOD Create(PRUint32 type, PRUint32 permissions) { return _to Create(type, permissions); } \ + NS_IMETHOD GetLeafName(nsAString & aLeafName) { return _to GetLeafName(aLeafName); } \ + NS_IMETHOD SetLeafName(const nsAString & aLeafName) { return _to SetLeafName(aLeafName); } \ + NS_IMETHOD GetNativeLeafName(nsACString & aNativeLeafName) { return _to GetNativeLeafName(aNativeLeafName); } \ + NS_IMETHOD SetNativeLeafName(const nsACString & aNativeLeafName) { return _to SetNativeLeafName(aNativeLeafName); } \ + NS_IMETHOD CopyTo(nsIFile *newParentDir, const nsAString & newName) { return _to CopyTo(newParentDir, newName); } \ + NS_IMETHOD CopyToNative(nsIFile *newParentDir, const nsACString & newName) { return _to CopyToNative(newParentDir, newName); } \ + NS_IMETHOD CopyToFollowingLinks(nsIFile *newParentDir, const nsAString & newName) { return _to CopyToFollowingLinks(newParentDir, newName); } \ + NS_IMETHOD CopyToFollowingLinksNative(nsIFile *newParentDir, const nsACString & newName) { return _to CopyToFollowingLinksNative(newParentDir, newName); } \ + NS_IMETHOD MoveTo(nsIFile *newParentDir, const nsAString & newName) { return _to MoveTo(newParentDir, newName); } \ + NS_IMETHOD MoveToNative(nsIFile *newParentDir, const nsACString & newName) { return _to MoveToNative(newParentDir, newName); } \ + NS_IMETHOD Remove(PRBool recursive) { return _to Remove(recursive); } \ + NS_IMETHOD GetPermissions(PRUint32 *aPermissions) { return _to GetPermissions(aPermissions); } \ + NS_IMETHOD SetPermissions(PRUint32 aPermissions) { return _to SetPermissions(aPermissions); } \ + NS_IMETHOD GetPermissionsOfLink(PRUint32 *aPermissionsOfLink) { return _to GetPermissionsOfLink(aPermissionsOfLink); } \ + NS_IMETHOD SetPermissionsOfLink(PRUint32 aPermissionsOfLink) { return _to SetPermissionsOfLink(aPermissionsOfLink); } \ + NS_IMETHOD GetLastModifiedTime(PRInt64 *aLastModifiedTime) { return _to GetLastModifiedTime(aLastModifiedTime); } \ + NS_IMETHOD SetLastModifiedTime(PRInt64 aLastModifiedTime) { return _to SetLastModifiedTime(aLastModifiedTime); } \ + NS_IMETHOD GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink) { return _to GetLastModifiedTimeOfLink(aLastModifiedTimeOfLink); } \ + NS_IMETHOD SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink) { return _to SetLastModifiedTimeOfLink(aLastModifiedTimeOfLink); } \ + NS_IMETHOD GetFileSize(PRInt64 *aFileSize) { return _to GetFileSize(aFileSize); } \ + NS_IMETHOD SetFileSize(PRInt64 aFileSize) { return _to SetFileSize(aFileSize); } \ + NS_IMETHOD GetFileSizeOfLink(PRInt64 *aFileSizeOfLink) { return _to GetFileSizeOfLink(aFileSizeOfLink); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return _to GetTarget(aTarget); } \ + NS_IMETHOD GetNativeTarget(nsACString & aNativeTarget) { return _to GetNativeTarget(aNativeTarget); } \ + NS_IMETHOD GetPath(nsAString & aPath) { return _to GetPath(aPath); } \ + NS_IMETHOD GetNativePath(nsACString & aNativePath) { return _to GetNativePath(aNativePath); } \ + NS_IMETHOD Exists(PRBool *_retval) { return _to Exists(_retval); } \ + NS_IMETHOD IsWritable(PRBool *_retval) { return _to IsWritable(_retval); } \ + NS_IMETHOD IsReadable(PRBool *_retval) { return _to IsReadable(_retval); } \ + NS_IMETHOD IsExecutable(PRBool *_retval) { return _to IsExecutable(_retval); } \ + NS_IMETHOD IsHidden(PRBool *_retval) { return _to IsHidden(_retval); } \ + NS_IMETHOD IsDirectory(PRBool *_retval) { return _to IsDirectory(_retval); } \ + NS_IMETHOD IsFile(PRBool *_retval) { return _to IsFile(_retval); } \ + NS_IMETHOD IsSymlink(PRBool *_retval) { return _to IsSymlink(_retval); } \ + NS_IMETHOD IsSpecial(PRBool *_retval) { return _to IsSpecial(_retval); } \ + NS_IMETHOD CreateUnique(PRUint32 type, PRUint32 permissions) { return _to CreateUnique(type, permissions); } \ + NS_IMETHOD Clone(nsIFile **_retval) { return _to Clone(_retval); } \ + NS_IMETHOD Equals(nsIFile *inFile, PRBool *_retval) { return _to Equals(inFile, _retval); } \ + NS_IMETHOD Contains(nsIFile *inFile, PRBool recur, PRBool *_retval) { return _to Contains(inFile, recur, _retval); } \ + NS_IMETHOD GetParent(nsIFile * *aParent) { return _to GetParent(aParent); } \ + NS_IMETHOD GetDirectoryEntries(nsISimpleEnumerator * *aDirectoryEntries) { return _to GetDirectoryEntries(aDirectoryEntries); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIFILE(_to) \ + NS_IMETHOD Append(const nsAString & node) { return !_to ? NS_ERROR_NULL_POINTER : _to->Append(node); } \ + NS_IMETHOD AppendNative(const nsACString & node) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendNative(node); } \ + NS_IMETHOD Normalize(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Normalize(); } \ + NS_IMETHOD Create(PRUint32 type, PRUint32 permissions) { return !_to ? NS_ERROR_NULL_POINTER : _to->Create(type, permissions); } \ + NS_IMETHOD GetLeafName(nsAString & aLeafName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLeafName(aLeafName); } \ + NS_IMETHOD SetLeafName(const nsAString & aLeafName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLeafName(aLeafName); } \ + NS_IMETHOD GetNativeLeafName(nsACString & aNativeLeafName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNativeLeafName(aNativeLeafName); } \ + NS_IMETHOD SetNativeLeafName(const nsACString & aNativeLeafName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNativeLeafName(aNativeLeafName); } \ + NS_IMETHOD CopyTo(nsIFile *newParentDir, const nsAString & newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyTo(newParentDir, newName); } \ + NS_IMETHOD CopyToNative(nsIFile *newParentDir, const nsACString & newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyToNative(newParentDir, newName); } \ + NS_IMETHOD CopyToFollowingLinks(nsIFile *newParentDir, const nsAString & newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyToFollowingLinks(newParentDir, newName); } \ + NS_IMETHOD CopyToFollowingLinksNative(nsIFile *newParentDir, const nsACString & newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyToFollowingLinksNative(newParentDir, newName); } \ + NS_IMETHOD MoveTo(nsIFile *newParentDir, const nsAString & newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->MoveTo(newParentDir, newName); } \ + NS_IMETHOD MoveToNative(nsIFile *newParentDir, const nsACString & newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->MoveToNative(newParentDir, newName); } \ + NS_IMETHOD Remove(PRBool recursive) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(recursive); } \ + NS_IMETHOD GetPermissions(PRUint32 *aPermissions) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPermissions(aPermissions); } \ + NS_IMETHOD SetPermissions(PRUint32 aPermissions) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPermissions(aPermissions); } \ + NS_IMETHOD GetPermissionsOfLink(PRUint32 *aPermissionsOfLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPermissionsOfLink(aPermissionsOfLink); } \ + NS_IMETHOD SetPermissionsOfLink(PRUint32 aPermissionsOfLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPermissionsOfLink(aPermissionsOfLink); } \ + NS_IMETHOD GetLastModifiedTime(PRInt64 *aLastModifiedTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastModifiedTime(aLastModifiedTime); } \ + NS_IMETHOD SetLastModifiedTime(PRInt64 aLastModifiedTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLastModifiedTime(aLastModifiedTime); } \ + NS_IMETHOD GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastModifiedTimeOfLink(aLastModifiedTimeOfLink); } \ + NS_IMETHOD SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLastModifiedTimeOfLink(aLastModifiedTimeOfLink); } \ + NS_IMETHOD GetFileSize(PRInt64 *aFileSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileSize(aFileSize); } \ + NS_IMETHOD SetFileSize(PRInt64 aFileSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFileSize(aFileSize); } \ + NS_IMETHOD GetFileSizeOfLink(PRInt64 *aFileSizeOfLink) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileSizeOfLink(aFileSizeOfLink); } \ + NS_IMETHOD GetTarget(nsAString & aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \ + NS_IMETHOD GetNativeTarget(nsACString & aNativeTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNativeTarget(aNativeTarget); } \ + NS_IMETHOD GetPath(nsAString & aPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPath(aPath); } \ + NS_IMETHOD GetNativePath(nsACString & aNativePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNativePath(aNativePath); } \ + NS_IMETHOD Exists(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Exists(_retval); } \ + NS_IMETHOD IsWritable(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsWritable(_retval); } \ + NS_IMETHOD IsReadable(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsReadable(_retval); } \ + NS_IMETHOD IsExecutable(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsExecutable(_retval); } \ + NS_IMETHOD IsHidden(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsHidden(_retval); } \ + NS_IMETHOD IsDirectory(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsDirectory(_retval); } \ + NS_IMETHOD IsFile(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsFile(_retval); } \ + NS_IMETHOD IsSymlink(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSymlink(_retval); } \ + NS_IMETHOD IsSpecial(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSpecial(_retval); } \ + NS_IMETHOD CreateUnique(PRUint32 type, PRUint32 permissions) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateUnique(type, permissions); } \ + NS_IMETHOD Clone(nsIFile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Clone(_retval); } \ + NS_IMETHOD Equals(nsIFile *inFile, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(inFile, _retval); } \ + NS_IMETHOD Contains(nsIFile *inFile, PRBool recur, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Contains(inFile, recur, _retval); } \ + NS_IMETHOD GetParent(nsIFile * *aParent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParent(aParent); } \ + NS_IMETHOD GetDirectoryEntries(nsISimpleEnumerator * *aDirectoryEntries) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDirectoryEntries(aDirectoryEntries); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsFile : public nsIFile +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIFILE + + nsFile(); + +private: + ~nsFile(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsFile, nsIFile) + +nsFile::nsFile() +{ + /* member initializers and constructor code */ +} + +nsFile::~nsFile() +{ + /* destructor code */ +} + +/* void append (in AString node); */ +NS_IMETHODIMP nsFile::Append(const nsAString & node) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void appendNative (in ACString node); */ +NS_IMETHODIMP nsFile::AppendNative(const nsACString & node) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void normalize (); */ +NS_IMETHODIMP nsFile::Normalize() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void create (in unsigned long type, in unsigned long permissions); */ +NS_IMETHODIMP nsFile::Create(PRUint32 type, PRUint32 permissions) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AString leafName; */ +NS_IMETHODIMP nsFile::GetLeafName(nsAString & aLeafName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsFile::SetLeafName(const nsAString & aLeafName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] attribute ACString nativeLeafName; */ +NS_IMETHODIMP nsFile::GetNativeLeafName(nsACString & aNativeLeafName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsFile::SetNativeLeafName(const nsACString & aNativeLeafName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void copyTo (in nsIFile newParentDir, in AString newName); */ +NS_IMETHODIMP nsFile::CopyTo(nsIFile *newParentDir, const nsAString & newName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void CopyToNative (in nsIFile newParentDir, in ACString newName); */ +NS_IMETHODIMP nsFile::CopyToNative(nsIFile *newParentDir, const nsACString & newName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void copyToFollowingLinks (in nsIFile newParentDir, in AString newName); */ +NS_IMETHODIMP nsFile::CopyToFollowingLinks(nsIFile *newParentDir, const nsAString & newName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void copyToFollowingLinksNative (in nsIFile newParentDir, in ACString newName); */ +NS_IMETHODIMP nsFile::CopyToFollowingLinksNative(nsIFile *newParentDir, const nsACString & newName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void moveTo (in nsIFile newParentDir, in AString newName); */ +NS_IMETHODIMP nsFile::MoveTo(nsIFile *newParentDir, const nsAString & newName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void moveToNative (in nsIFile newParentDir, in ACString newName); */ +NS_IMETHODIMP nsFile::MoveToNative(nsIFile *newParentDir, const nsACString & newName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void remove (in boolean recursive); */ +NS_IMETHODIMP nsFile::Remove(PRBool recursive) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute unsigned long permissions; */ +NS_IMETHODIMP nsFile::GetPermissions(PRUint32 *aPermissions) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsFile::SetPermissions(PRUint32 aPermissions) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute unsigned long permissionsOfLink; */ +NS_IMETHODIMP nsFile::GetPermissionsOfLink(PRUint32 *aPermissionsOfLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsFile::SetPermissionsOfLink(PRUint32 aPermissionsOfLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute PRInt64 lastModifiedTime; */ +NS_IMETHODIMP nsFile::GetLastModifiedTime(PRInt64 *aLastModifiedTime) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsFile::SetLastModifiedTime(PRInt64 aLastModifiedTime) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute PRInt64 lastModifiedTimeOfLink; */ +NS_IMETHODIMP nsFile::GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsFile::SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute PRInt64 fileSize; */ +NS_IMETHODIMP nsFile::GetFileSize(PRInt64 *aFileSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsFile::SetFileSize(PRInt64 aFileSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRInt64 fileSizeOfLink; */ +NS_IMETHODIMP nsFile::GetFileSizeOfLink(PRInt64 *aFileSizeOfLink) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString target; */ +NS_IMETHODIMP nsFile::GetTarget(nsAString & aTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] readonly attribute ACString nativeTarget; */ +NS_IMETHODIMP nsFile::GetNativeTarget(nsACString & aNativeTarget) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString path; */ +NS_IMETHODIMP nsFile::GetPath(nsAString & aPath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] readonly attribute ACString nativePath; */ +NS_IMETHODIMP nsFile::GetNativePath(nsACString & aNativePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean exists (); */ +NS_IMETHODIMP nsFile::Exists(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isWritable (); */ +NS_IMETHODIMP nsFile::IsWritable(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isReadable (); */ +NS_IMETHODIMP nsFile::IsReadable(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isExecutable (); */ +NS_IMETHODIMP nsFile::IsExecutable(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isHidden (); */ +NS_IMETHODIMP nsFile::IsHidden(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isDirectory (); */ +NS_IMETHODIMP nsFile::IsDirectory(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isFile (); */ +NS_IMETHODIMP nsFile::IsFile(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isSymlink (); */ +NS_IMETHODIMP nsFile::IsSymlink(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isSpecial (); */ +NS_IMETHODIMP nsFile::IsSpecial(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void createUnique (in unsigned long type, in unsigned long permissions); */ +NS_IMETHODIMP nsFile::CreateUnique(PRUint32 type, PRUint32 permissions) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIFile clone (); */ +NS_IMETHODIMP nsFile::Clone(nsIFile **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean equals (in nsIFile inFile); */ +NS_IMETHODIMP nsFile::Equals(nsIFile *inFile, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean contains (in nsIFile inFile, in boolean recur); */ +NS_IMETHODIMP nsFile::Contains(nsIFile *inFile, PRBool recur, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIFile parent; */ +NS_IMETHODIMP nsFile::GetParent(nsIFile * *aParent) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsISimpleEnumerator directoryEntries; */ +NS_IMETHODIMP nsFile::GetDirectoryEntries(nsISimpleEnumerator * *aDirectoryEntries) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#ifdef MOZILLA_INTERNAL_API +#include "nsDirectoryServiceUtils.h" +#endif + +#endif /* __gen_nsIFile_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIFileURL.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIFileURL.h new file mode 100644 index 00000000..0b3782d5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIFileURL.h @@ -0,0 +1,116 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIFileURL.idl + */ + +#ifndef __gen_nsIFileURL_h__ +#define __gen_nsIFileURL_h__ + + +#ifndef __gen_nsIURL_h__ +#include "nsIURL.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIFile; /* forward declaration */ + + +/* starting interface: nsIFileURL */ +#define NS_IFILEURL_IID_STR "d26b2e2e-1dd1-11b2-88f3-8545a7ba7949" + +#define NS_IFILEURL_IID \ + {0xd26b2e2e, 0x1dd1, 0x11b2, \ + { 0x88, 0xf3, 0x85, 0x45, 0xa7, 0xba, 0x79, 0x49 }} + +/** + * nsIFileURL provides access to the underlying nsIFile object corresponding to + * an URL. The URL scheme need not be file:, since other local protocols may + * map URLs to files (e.g., resource:). + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIFileURL : public nsIURL { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEURL_IID) + + /** + * Get/Set nsIFile corresponding to this URL. + * + * - Getter returns a reference to an immutable object. Callers must clone + * before attempting to modify the returned nsIFile object. NOTE: this + * constraint might not be enforced at runtime, so beware!! + * + * - Setter clones the nsIFile object (allowing the caller to safely modify + * the nsIFile object after setting it on this interface). + */ + /* attribute nsIFile file; */ + NS_IMETHOD GetFile(nsIFile * *aFile) = 0; + NS_IMETHOD SetFile(nsIFile * aFile) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIFILEURL \ + NS_IMETHOD GetFile(nsIFile * *aFile); \ + NS_IMETHOD SetFile(nsIFile * aFile); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIFILEURL(_to) \ + NS_IMETHOD GetFile(nsIFile * *aFile) { return _to GetFile(aFile); } \ + NS_IMETHOD SetFile(nsIFile * aFile) { return _to SetFile(aFile); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIFILEURL(_to) \ + NS_IMETHOD GetFile(nsIFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \ + NS_IMETHOD SetFile(nsIFile * aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFile(aFile); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsFileURL : public nsIFileURL +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIFILEURL + + nsFileURL(); + +private: + ~nsFileURL(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsFileURL, nsIFileURL) + +nsFileURL::nsFileURL() +{ + /* member initializers and constructor code */ +} + +nsFileURL::~nsFileURL() +{ + /* destructor code */ +} + +/* attribute nsIFile file; */ +NS_IMETHODIMP nsFileURL::GetFile(nsIFile * *aFile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsFileURL::SetFile(nsIFile * aFile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIFileURL_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIGenericFactory.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIGenericFactory.h new file mode 100644 index 00000000..09bf1152 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIGenericFactory.h @@ -0,0 +1,447 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Benjamin Smedberg <benjamin@smedbergs.us> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsIGenericFactory_h___ +#define nsIGenericFactory_h___ + +#include "nsIFactory.h" +#include "nsIModule.h" +#include "nsIClassInfo.h" + +class nsIFile; +class nsIComponentManager; + +// {3bc97f01-ccdf-11d2-bab8-b548654461fc} +#define NS_GENERICFACTORY_CID \ + { 0x3bc97f01, 0xccdf, 0x11d2, \ + { 0xba, 0xb8, 0xb5, 0x48, 0x65, 0x44, 0x61, 0xfc } } + +// {3bc97f00-ccdf-11d2-bab8-b548654461fc} +#define NS_IGENERICFACTORY_IID \ + { 0x3bc97f00, 0xccdf, 0x11d2, \ + { 0xba, 0xb8, 0xb5, 0x48, 0x65, 0x44, 0x61, 0xfc } } + +#define NS_GENERICFACTORY_CONTRACTID "@mozilla.org/generic-factory;1" +#define NS_GENERICFACTORY_CLASSNAME "Generic Factory" + +struct nsModuleComponentInfo; // forward declaration + +/** + * Provides a Generic nsIFactory implementation that can be used by + * DLLs with very simple factory needs. + */ +class nsIGenericFactory : public nsIFactory { +public: + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IGENERICFACTORY_IID) + + NS_IMETHOD SetComponentInfo(const nsModuleComponentInfo *info) = 0; + NS_IMETHOD GetComponentInfo(const nsModuleComponentInfo **infop) = 0; +}; + +NS_COM_GLUE nsresult +NS_NewGenericFactory(nsIGenericFactory **result, + const nsModuleComponentInfo *info); + + +/** Component Callbacks **/ + + /** + * NSConstructorProcPtr + * + * This function will be used by the generic factory to create an + * instance of the given CID. + * + * @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. + **/ +typedef NS_CALLBACK(NSConstructorProcPtr)(nsISupports *aOuter, + REFNSIID aIID, + void **aResult); + +/** + * NSRegisterSelfProcPtr + * + * One time registration call back. Allows you to perform registration + * specific activity like adding yourself to a category. + * + * @param aCompMgr : The global component manager + * @param aFile : Component File. This file must have an associated + * loader and export the required symbols which this + * loader defines. + * @param aLoaderStr : Opaque loader specific string. This value is + * passed into the nsIModule's registerSelf + * callback and must be fowarded unmodified when + * registering factories via their location. + * @param aType : Component Type of CID aClass. This value is + * passed into the nsIModule's registerSelf + * callback and must be fowarded unmodified when + * registering factories via their location. + * @param aInfo : Pointer to array of nsModuleComponentInfo + * + * @param aInfo + * @return NS_OK Registration was successful. + * NS_ERROR* Method failure. + **/ +typedef NS_CALLBACK(NSRegisterSelfProcPtr)(nsIComponentManager *aCompMgr, + nsIFile *aPath, + const char *aLoaderStr, + const char *aType, + const nsModuleComponentInfo *aInfo); + +/** + * NSUnregisterSelfProcPtr + * + * One time unregistration call back. Allows you to perform unregistration + * specific activity like removing yourself from a category. + * + * @param aCompMgr : The global component manager + * @param aFile : Component File. This file must have an associated + * loader and export the required symbols which this + * loader defines. + * @param aLoaderStr : Opaque loader specific string. This value is + * passed into the nsIModule's registerSelf + * callback and must be fowarded unmodified when + * registering factories via their location + * @param aInfo : Pointer to array of nsModuleComponentInfo + * + * @param aInfo + * @return NS_OK Registration was successful. + * NS_ERROR* Method failure. + + **/ +typedef NS_CALLBACK(NSUnregisterSelfProcPtr)(nsIComponentManager *aCompMgr, + nsIFile *aPath, + const char *aLoaderStr, + const nsModuleComponentInfo *aInfo); + +/** + * NSFactoryDestructorProcPtr + * + * This function will be called when the factory is being destroyed. + * + **/ +typedef NS_CALLBACK(NSFactoryDestructorProcPtr)(void); + + +/** + * NSGetInterfacesProcPtr + * + * This function is used to implement class info. + * + * 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. + * + * @see nsIClassInfo.idl + **/ +typedef NS_CALLBACK(NSGetInterfacesProcPtr)(PRUint32 *countp, + nsIID* **array); + +/** + * NSGetLanguageHelperProcPtr + * + * This function is used to implement class info. + * + * 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: nsIClassInfo.idl, nsIProgrammingLanguage.idl + * + * Should return null if no helper available for given language. + **/ +typedef NS_CALLBACK(NSGetLanguageHelperProcPtr)(PRUint32 language, + nsISupports **helper); + +/** + * nsModuleComponentInfo + * + * Use this type to define a list of module component info to pass to + * NS_NewGenericModule. + * + * @param mDescription : Class Name of given object + * @param mCID : CID of given object + * @param mContractID : Contract ID of given object + * @param mConstructor : Constructor of given object + * @param mRegisterSelfProc : (optional) Registration Callback + * @param mUnregisterSelfProc : (optional) Unregistration Callback + * @param mFactoryDestructor : (optional) Destruction Callback + * @param mGetInterfacesProc : (optional) Interfaces Callback + * @param mGetLanguageHelperProc : (optional) Language Helper Callback + * @param mClassInfoGlobal : (optional) Global Class Info of given object + * @param mFlags : (optional) Class Info Flags @see nsIClassInfo + * + * E.g.: + * static nsModuleComponentInfo components[] = { ... }; + * + * See xpcom/sample/nsSampleModule.cpp for more info. + */ +struct nsModuleComponentInfo { + const char* mDescription; + nsCID mCID; + const char* mContractID; + NSConstructorProcPtr mConstructor; + NSRegisterSelfProcPtr mRegisterSelfProc; + NSUnregisterSelfProcPtr mUnregisterSelfProc; + NSFactoryDestructorProcPtr mFactoryDestructor; + NSGetInterfacesProcPtr mGetInterfacesProc; + NSGetLanguageHelperProcPtr mGetLanguageHelperProc; + nsIClassInfo ** mClassInfoGlobal; + PRUint32 mFlags; +}; + + +/** Module Callbacks **/ + + +/** + * nsModuleConstructorProc + * + * This function is called when the module is first being constructed. + * @param self module which is being constructed. + * + * @return NS_OK Construction successful. + * NS_ERROR* Method failure which will result in module not being + * loaded. + **/ +typedef nsresult (PR_CALLBACK *nsModuleConstructorProc) (nsIModule *self); + + +/** + * nsModuleDestructorProc + * + * This function is called when the module is being destroyed. + * @param self module which is being destroyed. + * + **/ +typedef void (PR_CALLBACK *nsModuleDestructorProc) (nsIModule *self); + +/** + * nsModuleInfo + * + * Use this structure to define meta-information about the module + * itself, including the name, its components, and an optional + * module-level initialization or shutdown routine. + * + * @param mVersion : Module Info Version + * @param mModuleName : Module Name + * @param mComponents : Array of Components + * @param mCount : Count of mComponents + * @param mCtor : Module user defined constructor + * @param mDtor : Module user defined destructor + * + **/ + +struct nsModuleInfo { + PRUint32 mVersion; + const char* mModuleName; + const nsModuleComponentInfo *mComponents; + PRUint32 mCount; + nsModuleConstructorProc mCtor; + nsModuleDestructorProc mDtor; +}; + +/** + * Rev this if you change the nsModuleInfo, and are worried about + * binary compatibility. (Ostensibly fix NS_NewGenericModule2() to deal + * with older rev's at the same time.) + */ +#define NS_MODULEINFO_VERSION 0x00015000UL // 1.5 + +/** + * Create a new generic module. Use the NS_IMPL_NSGETMODULE macro, or + * one of its relatives, rather than using this directly. + */ +NS_COM_GLUE nsresult +NS_NewGenericModule2(nsModuleInfo const *info, nsIModule* *result); + +/** + * Obsolete. Use NS_NewGenericModule2() instead. + */ +NS_COM_GLUE nsresult +NS_NewGenericModule(const char* moduleName, + PRUint32 componentCount, + nsModuleComponentInfo* components, + nsModuleDestructorProc dtor, + nsIModule* *result); + +#if defined(XPCOM_TRANSLATE_NSGM_ENTRY_POINT) +# define NSGETMODULE_ENTRY_POINT(_name) NS_VISIBILITY_HIDDEN nsresult _name##_NSGetModule +#else +# define NSGETMODULE_ENTRY_POINT(_name) extern "C" NS_EXPORT nsresult NSGetModule +#endif + +/** + * Ease of use Macros which define NSGetModule for your component. + * See xpcom/sample/nsSampleModule.cpp for more info. + * + **/ + +#define NS_IMPL_NSGETMODULE(_name, _components) \ + NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(_name, _components, nsnull, nsnull) + +#define NS_IMPL_NSGETMODULE_WITH_CTOR(_name, _components, _ctor) \ + NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(_name, _components, _ctor, nsnull) + +#define NS_IMPL_NSGETMODULE_WITH_DTOR(_name, _components, _dtor) \ + NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(_name, _components, nsnull, _dtor) + +#define NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(_name, _components, _ctor, _dtor) \ +static nsModuleInfo const kModuleInfo = { \ + NS_MODULEINFO_VERSION, \ + (#_name), \ + (_components), \ + (sizeof(_components) / sizeof(_components[0])), \ + (_ctor), \ + (_dtor) \ +}; \ +NSGETMODULE_ENTRY_POINT(_name) \ +(nsIComponentManager *servMgr, \ + nsIFile* location, \ + nsIModule** result) \ +{ \ + return NS_NewGenericModule2(&kModuleInfo, result); \ +} + +//////////////////////////////////////////////////////////////////////////////// + +#define NS_GENERIC_FACTORY_CONSTRUCTOR(_InstanceClass) \ +static NS_IMETHODIMP \ +_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \ + void **aResult) \ +{ \ + nsresult rv; \ + \ + _InstanceClass * inst; \ + \ + *aResult = NULL; \ + if (NULL != aOuter) { \ + rv = NS_ERROR_NO_AGGREGATION; \ + return rv; \ + } \ + \ + NS_NEWXPCOM(inst, _InstanceClass); \ + if (NULL == inst) { \ + rv = NS_ERROR_OUT_OF_MEMORY; \ + return rv; \ + } \ + NS_ADDREF(inst); \ + rv = inst->QueryInterface(aIID, aResult); \ + NS_RELEASE(inst); \ + \ + return rv; \ +} \ + + +#define NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(_InstanceClass, _InitMethod) \ +static NS_IMETHODIMP \ +_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \ + void **aResult) \ +{ \ + nsresult rv; \ + \ + _InstanceClass * inst; \ + \ + *aResult = NULL; \ + if (NULL != aOuter) { \ + rv = NS_ERROR_NO_AGGREGATION; \ + return rv; \ + } \ + \ + NS_NEWXPCOM(inst, _InstanceClass); \ + if (NULL == inst) { \ + rv = NS_ERROR_OUT_OF_MEMORY; \ + return rv; \ + } \ + NS_ADDREF(inst); \ + rv = inst->_InitMethod(); \ + if(NS_SUCCEEDED(rv)) { \ + rv = inst->QueryInterface(aIID, aResult); \ + } \ + NS_RELEASE(inst); \ + \ + return rv; \ +} \ + +// 'Constructor' that uses an existing getter function that gets a singleton. +// NOTE: assumes that getter does an AddRef - so additional AddRef is not done. +#define NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(_InstanceClass, _GetterProc) \ +static NS_IMETHODIMP \ +_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \ + void **aResult) \ +{ \ + nsresult rv; \ + \ + _InstanceClass * inst; \ + \ + *aResult = NULL; \ + if (NULL != aOuter) { \ + rv = NS_ERROR_NO_AGGREGATION; \ + return rv; \ + } \ + \ + inst = _GetterProc(); \ + if (NULL == inst) { \ + rv = NS_ERROR_OUT_OF_MEMORY; \ + return rv; \ + } \ + /* NS_ADDREF(inst); */ \ + rv = inst->QueryInterface(aIID, aResult); \ + NS_RELEASE(inst); \ + \ + return rv; \ +} \ + +#endif /* nsIGenericFactory_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIGlobalHistory.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIGlobalHistory.h new file mode 100644 index 00000000..29493a9b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIGlobalHistory.h @@ -0,0 +1,116 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/docshell/base/nsIGlobalHistory.idl + */ + +#ifndef __gen_nsIGlobalHistory_h__ +#define __gen_nsIGlobalHistory_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIGlobalHistory */ +#define NS_IGLOBALHISTORY_IID_STR "9491c383-e3c4-11d2-bdbe-0050040a9b44" + +#define NS_IGLOBALHISTORY_IID \ + {0x9491c383, 0xe3c4, 0x11d2, \ + { 0xbd, 0xbe, 0x00, 0x50, 0x04, 0x0a, 0x9b, 0x44 }} + +class NS_NO_VTABLE nsIGlobalHistory : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IGLOBALHISTORY_IID) + + /** + * addPage + * Add a page to the history + * + * @param aURL the url to the page + */ + /* void addPage (in string aURL); */ + NS_IMETHOD AddPage(const char *aURL) = 0; + + /** + * isVisited + * Checks to see if the given page is in history + * + * @return true if a page has been passed into addPage(). + * @param aURL the url to the page + */ + /* boolean isVisited (in string aURL); */ + NS_IMETHOD IsVisited(const char *aURL, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIGLOBALHISTORY \ + NS_IMETHOD AddPage(const char *aURL); \ + NS_IMETHOD IsVisited(const char *aURL, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIGLOBALHISTORY(_to) \ + NS_IMETHOD AddPage(const char *aURL) { return _to AddPage(aURL); } \ + NS_IMETHOD IsVisited(const char *aURL, PRBool *_retval) { return _to IsVisited(aURL, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIGLOBALHISTORY(_to) \ + NS_IMETHOD AddPage(const char *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddPage(aURL); } \ + NS_IMETHOD IsVisited(const char *aURL, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsVisited(aURL, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsGlobalHistory : public nsIGlobalHistory +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIGLOBALHISTORY + + nsGlobalHistory(); + +private: + ~nsGlobalHistory(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsGlobalHistory, nsIGlobalHistory) + +nsGlobalHistory::nsGlobalHistory() +{ + /* member initializers and constructor code */ +} + +nsGlobalHistory::~nsGlobalHistory() +{ + /* destructor code */ +} + +/* void addPage (in string aURL); */ +NS_IMETHODIMP nsGlobalHistory::AddPage(const char *aURL) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isVisited (in string aURL); */ +NS_IMETHODIMP nsGlobalHistory::IsVisited(const char *aURL, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_GLOBALHISTORY_CONTRACTID \ + "@mozilla.org/browser/global-history;1" + +#endif /* __gen_nsIGlobalHistory_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIHistoryEntry.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIHistoryEntry.h new file mode 100644 index 00000000..9bf0209b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIHistoryEntry.h @@ -0,0 +1,139 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpfe/components/shistory/public/nsIHistoryEntry.idl + */ + +#ifndef __gen_nsIHistoryEntry_h__ +#define __gen_nsIHistoryEntry_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIURI; /* forward declaration */ + + +/* starting interface: nsIHistoryEntry */ +#define NS_IHISTORYENTRY_IID_STR "a41661d4-1417-11d5-9882-00c04fa02f40" + +#define NS_IHISTORYENTRY_IID \ + {0xa41661d4, 0x1417, 0x11d5, \ + { 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 }} + +class NS_NO_VTABLE nsIHistoryEntry : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHISTORYENTRY_IID) + + /** + * A readonly property that returns the URI + * of the current entry. The object returned is + * of type nsIURI + */ + /* readonly attribute nsIURI URI; */ + NS_IMETHOD GetURI(nsIURI * *aURI) = 0; + + /** + * A readonly property that returns the title + * of the current entry. The object returned + * is a encoded string + */ + /* readonly attribute wstring title; */ + NS_IMETHOD GetTitle(PRUnichar * *aTitle) = 0; + + /** + * A readonly property that returns a boolean + * flag which indicates if the entry was created as a + * result of a subframe navigation. This flag will be + * 'false' when a frameset page is visited for + * the first time. This flag will be 'true' for all + * history entries created as a result of a subframe + * navigation. + */ + /* readonly attribute boolean isSubFrame; */ + NS_IMETHOD GetIsSubFrame(PRBool *aIsSubFrame) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIHISTORYENTRY \ + NS_IMETHOD GetURI(nsIURI * *aURI); \ + NS_IMETHOD GetTitle(PRUnichar * *aTitle); \ + NS_IMETHOD GetIsSubFrame(PRBool *aIsSubFrame); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIHISTORYENTRY(_to) \ + NS_IMETHOD GetURI(nsIURI * *aURI) { return _to GetURI(aURI); } \ + NS_IMETHOD GetTitle(PRUnichar * *aTitle) { return _to GetTitle(aTitle); } \ + NS_IMETHOD GetIsSubFrame(PRBool *aIsSubFrame) { return _to GetIsSubFrame(aIsSubFrame); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIHISTORYENTRY(_to) \ + NS_IMETHOD GetURI(nsIURI * *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURI(aURI); } \ + NS_IMETHOD GetTitle(PRUnichar * *aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \ + NS_IMETHOD GetIsSubFrame(PRBool *aIsSubFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsSubFrame(aIsSubFrame); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsHistoryEntry : public nsIHistoryEntry +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIHISTORYENTRY + + nsHistoryEntry(); + +private: + ~nsHistoryEntry(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsHistoryEntry, nsIHistoryEntry) + +nsHistoryEntry::nsHistoryEntry() +{ + /* member initializers and constructor code */ +} + +nsHistoryEntry::~nsHistoryEntry() +{ + /* destructor code */ +} + +/* readonly attribute nsIURI URI; */ +NS_IMETHODIMP nsHistoryEntry::GetURI(nsIURI * *aURI) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute wstring title; */ +NS_IMETHODIMP nsHistoryEntry::GetTitle(PRUnichar * *aTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isSubFrame; */ +NS_IMETHODIMP nsHistoryEntry::GetIsSubFrame(PRBool *aIsSubFrame) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +// {A41661D5-1417-11D5-9882-00C04FA02F40} +#define NS_HISTORYENTRY_CID \ +{0xa41661d5, 0x1417, 0x11d5, {0x98, 0x82, 0x0, 0xc0, 0x4f, 0xa0, 0x2f, 0x40}} +#define NS_HISTORYENTRY_CONTRACTID \ + "@mozilla.org/browser/history-entry;1" + +#endif /* __gen_nsIHistoryEntry_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIHttpChannel.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIHttpChannel.h new file mode 100644 index 00000000..03abafb2 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIHttpChannel.h @@ -0,0 +1,504 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/protocol/http/public/nsIHttpChannel.idl + */ + +#ifndef __gen_nsIHttpChannel_h__ +#define __gen_nsIHttpChannel_h__ + + +#ifndef __gen_nsIChannel_h__ +#include "nsIChannel.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIHttpHeaderVisitor; /* forward declaration */ + + +/* starting interface: nsIHttpChannel */ +#define NS_IHTTPCHANNEL_IID_STR "9277fe09-f0cc-4cd9-bbce-581dd94b0260" + +#define NS_IHTTPCHANNEL_IID \ + {0x9277fe09, 0xf0cc, 0x4cd9, \ + { 0xbb, 0xce, 0x58, 0x1d, 0xd9, 0x4b, 0x02, 0x60 }} + +/** + * nsIHttpChannel + * + * This interface allows for the modification of HTTP request parameters and + * the inspection of the resulting HTTP response status and headers when they + * become available. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIHttpChannel : public nsIChannel { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTTPCHANNEL_IID) + + /************************************************************************** + * REQUEST CONFIGURATION + * + * Modifying request parameters after asyncOpen has been called is an error. + */ +/** + * Set/get the HTTP request method (default is "GET"). Setter is case + * insensitive; getter returns an uppercase string. + * + * This attribute may only be set before the channel is opened. + * + * NOTE: The data for a "POST" or "PUT" request can be configured via + * nsIUploadChannel; however, after setting the upload data, it may be + * necessary to set the request method explicitly. The documentation + * for nsIUploadChannel has further details. + * + * @throws NS_ERROR_IN_PROGRESS if set after the channel has been opened. + */ + /* attribute ACString requestMethod; */ + NS_IMETHOD GetRequestMethod(nsACString & aRequestMethod) = 0; + NS_IMETHOD SetRequestMethod(const nsACString & aRequestMethod) = 0; + + /** + * Get/set the HTTP referrer URI. This is the address (URI) of the + * resource from which this channel's URI was obtained (see RFC2616 section + * 14.36). + * + * This attribute may only be set before the channel is opened. + * + * NOTE: The channel may silently refuse to set the Referer header if the + * URI does not pass certain security checks (e.g., a "https://" URL will + * never be sent as the referrer for a plaintext HTTP request). The + * implementation is not required to throw an exception when the referrer + * URI is rejected. + * + * @throws NS_ERROR_IN_PROGRESS if set after the channel has been opened. + */ + /* attribute nsIURI referrer; */ + NS_IMETHOD GetReferrer(nsIURI * *aReferrer) = 0; + NS_IMETHOD SetReferrer(nsIURI * aReferrer) = 0; + + /** + * Get the value of a particular request header. + * + * @param aHeader + * The case-insensitive name of the request header to query (e.g., + * "Cache-Control"). + * + * @return the value of the request header. + * @throws NS_ERROR_NOT_AVAILABLE if the header is not set. + */ + /* ACString getRequestHeader (in ACString aHeader); */ + NS_IMETHOD GetRequestHeader(const nsACString & aHeader, nsACString & _retval) = 0; + + /** + * Set the value of a particular request header. + * + * This method allows, for example, the cookies module to add "Cookie" + * headers to the outgoing HTTP request. + * + * This method may only be called before the channel is opened. + * + * @param aHeader + * The case-insensitive name of the request header to set (e.g., + * "Cookie"). + * @param aValue + * The request header value to set (e.g., "X=1"). + * @param aMerge + * If true, the new header value will be merged with any existing + * values for the specified header. This flag is ignored if the + * specified header does not support merging (e.g., the "Content- + * Type" header can only have one value). The list of headers for + * which this flag is ignored is an implementation detail. If this + * flag is false, then the header value will be replaced with the + * contents of |aValue|. + * + * If aValue is empty and aMerge is false, the header will be cleared. + * + * @throws NS_ERROR_IN_PROGRESS if called after the channel has been + * opened. + */ + /* void setRequestHeader (in ACString aHeader, in ACString aValue, in boolean aMerge); */ + NS_IMETHOD SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge) = 0; + + /** + * Call this method to visit all request headers. Calling setRequestHeader + * while visiting request headers has undefined behavior. Don't do it! + * + * @param aVisitor + * the header visitor instance. + */ + /* void visitRequestHeaders (in nsIHttpHeaderVisitor aVisitor); */ + NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) = 0; + + /** + * This attribute is a hint to the channel to indicate whether or not + * the underlying HTTP transaction should be allowed to be pipelined + * with other transactions. This should be set to FALSE, for example, + * if the application knows that the corresponding document is likely + * to be very large. + * + * This attribute is true by default, though other factors may prevent + * pipelining. + * + * This attribute may only be set before the channel is opened. + * + * @throws NS_ERROR_FAILURE if set after the channel has been opened. + */ + /* attribute boolean allowPipelining; */ + NS_IMETHOD GetAllowPipelining(PRBool *aAllowPipelining) = 0; + NS_IMETHOD SetAllowPipelining(PRBool aAllowPipelining) = 0; + + /** + * This attribute specifies the number of redirects this channel is allowed + * to make. If zero, the channel will fail to redirect and will generate + * a NS_ERROR_REDIRECT_LOOP failure status. + * + * NOTE: An HTTP redirect results in a new channel being created. If the + * new channel supports nsIHttpChannel, then it will be assigned a value + * to its |redirectionLimit| attribute one less than the value of the + * redirected channel's |redirectionLimit| attribute. The initial value + * for this attribute may be a configurable preference (depending on the + * implementation). + */ + /* attribute unsigned long redirectionLimit; */ + NS_IMETHOD GetRedirectionLimit(PRUint32 *aRedirectionLimit) = 0; + NS_IMETHOD SetRedirectionLimit(PRUint32 aRedirectionLimit) = 0; + + /************************************************************************** + * RESPONSE INFO + * + * Accessing response info before the onStartRequest event is an error. + */ +/** + * Get the HTTP response code (e.g., 200). + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + /* readonly attribute unsigned long responseStatus; */ + NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus) = 0; + + /** + * Get the HTTP response status text (e.g., "OK"). + * + * NOTE: This returns the raw (possibly 8-bit) text from the server. There + * are no assumptions made about the charset of the returned text. You + * have been warned! + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + /* readonly attribute ACString responseStatusText; */ + NS_IMETHOD GetResponseStatusText(nsACString & aResponseStatusText) = 0; + + /** + * Returns true if the HTTP response code indicates success. The value of + * nsIRequest::status will be NS_OK even when processing a 404 response + * because a 404 response may include a message body that (in some cases) + * should be shown to the user. + * + * Use this attribute to distinguish server error pages from normal pages, + * instead of comparing the response status manually against the set of + * valid response codes, if that is required by your application. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + /* readonly attribute boolean requestSucceeded; */ + NS_IMETHOD GetRequestSucceeded(PRBool *aRequestSucceeded) = 0; + + /** + * Get the value of a particular response header. + * + * @param aHeader + * The case-insensitive name of the response header to query (e.g., + * "Set-Cookie"). + * + * @return the value of the response header. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest) or if the header is + * not set in the response. + */ + /* ACString getResponseHeader (in ACString header); */ + NS_IMETHOD GetResponseHeader(const nsACString & header, nsACString & _retval) = 0; + + /** + * Set the value of a particular response header. + * + * This method allows, for example, the HTML content sink to inform the HTTP + * channel about HTTP-EQUIV headers found in HTML <META> tags. + * + * @param aHeader + * The case-insensitive name of the response header to set (e.g., + * "Cache-control"). + * @param aValue + * The response header value to set (e.g., "no-cache"). + * @param aMerge + * If true, the new header value will be merged with any existing + * values for the specified header. This flag is ignored if the + * specified header does not support merging (e.g., the "Content- + * Type" header can only have one value). The list of headers for + * which this flag is ignored is an implementation detail. If this + * flag is false, then the header value will be replaced with the + * contents of |aValue|. + * + * If aValue is empty and aMerge is false, the header will be cleared. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + * @throws NS_ERROR_ILLEGAL_VALUE if changing the value of this response + * header is not allowed. + */ + /* void setResponseHeader (in ACString header, in ACString value, in boolean merge); */ + NS_IMETHOD SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge) = 0; + + /** + * Call this method to visit all response headers. Calling + * setResponseHeader while visiting response headers has undefined + * behavior. Don't do it! + * + * @param aVisitor + * the header visitor instance. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + /* void visitResponseHeaders (in nsIHttpHeaderVisitor aVisitor); */ + NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) = 0; + + /** + * Returns true if the server sent a "Cache-Control: no-store" response + * header. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + /* boolean isNoStoreResponse (); */ + NS_IMETHOD IsNoStoreResponse(PRBool *_retval) = 0; + + /** + * Returns true if the server sent the equivalent of a "Cache-control: + * no-cache" response header. Equivalent response headers include: + * "Pragma: no-cache", "Expires: 0", and "Expires" with a date value + * in the past relative to the value of the "Date" header. + * + * @throws NS_ERROR_NOT_AVAILABLE if called before the response + * has been received (before onStartRequest). + */ + /* boolean isNoCacheResponse (); */ + NS_IMETHOD IsNoCacheResponse(PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIHTTPCHANNEL \ + NS_IMETHOD GetRequestMethod(nsACString & aRequestMethod); \ + NS_IMETHOD SetRequestMethod(const nsACString & aRequestMethod); \ + NS_IMETHOD GetReferrer(nsIURI * *aReferrer); \ + NS_IMETHOD SetReferrer(nsIURI * aReferrer); \ + NS_IMETHOD GetRequestHeader(const nsACString & aHeader, nsACString & _retval); \ + NS_IMETHOD SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge); \ + NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor); \ + NS_IMETHOD GetAllowPipelining(PRBool *aAllowPipelining); \ + NS_IMETHOD SetAllowPipelining(PRBool aAllowPipelining); \ + NS_IMETHOD GetRedirectionLimit(PRUint32 *aRedirectionLimit); \ + NS_IMETHOD SetRedirectionLimit(PRUint32 aRedirectionLimit); \ + NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus); \ + NS_IMETHOD GetResponseStatusText(nsACString & aResponseStatusText); \ + NS_IMETHOD GetRequestSucceeded(PRBool *aRequestSucceeded); \ + NS_IMETHOD GetResponseHeader(const nsACString & header, nsACString & _retval); \ + NS_IMETHOD SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge); \ + NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor); \ + NS_IMETHOD IsNoStoreResponse(PRBool *_retval); \ + NS_IMETHOD IsNoCacheResponse(PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIHTTPCHANNEL(_to) \ + NS_IMETHOD GetRequestMethod(nsACString & aRequestMethod) { return _to GetRequestMethod(aRequestMethod); } \ + NS_IMETHOD SetRequestMethod(const nsACString & aRequestMethod) { return _to SetRequestMethod(aRequestMethod); } \ + NS_IMETHOD GetReferrer(nsIURI * *aReferrer) { return _to GetReferrer(aReferrer); } \ + NS_IMETHOD SetReferrer(nsIURI * aReferrer) { return _to SetReferrer(aReferrer); } \ + NS_IMETHOD GetRequestHeader(const nsACString & aHeader, nsACString & _retval) { return _to GetRequestHeader(aHeader, _retval); } \ + NS_IMETHOD SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge) { return _to SetRequestHeader(aHeader, aValue, aMerge); } \ + NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) { return _to VisitRequestHeaders(aVisitor); } \ + NS_IMETHOD GetAllowPipelining(PRBool *aAllowPipelining) { return _to GetAllowPipelining(aAllowPipelining); } \ + NS_IMETHOD SetAllowPipelining(PRBool aAllowPipelining) { return _to SetAllowPipelining(aAllowPipelining); } \ + NS_IMETHOD GetRedirectionLimit(PRUint32 *aRedirectionLimit) { return _to GetRedirectionLimit(aRedirectionLimit); } \ + NS_IMETHOD SetRedirectionLimit(PRUint32 aRedirectionLimit) { return _to SetRedirectionLimit(aRedirectionLimit); } \ + NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus) { return _to GetResponseStatus(aResponseStatus); } \ + NS_IMETHOD GetResponseStatusText(nsACString & aResponseStatusText) { return _to GetResponseStatusText(aResponseStatusText); } \ + NS_IMETHOD GetRequestSucceeded(PRBool *aRequestSucceeded) { return _to GetRequestSucceeded(aRequestSucceeded); } \ + NS_IMETHOD GetResponseHeader(const nsACString & header, nsACString & _retval) { return _to GetResponseHeader(header, _retval); } \ + NS_IMETHOD SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge) { return _to SetResponseHeader(header, value, merge); } \ + NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) { return _to VisitResponseHeaders(aVisitor); } \ + NS_IMETHOD IsNoStoreResponse(PRBool *_retval) { return _to IsNoStoreResponse(_retval); } \ + NS_IMETHOD IsNoCacheResponse(PRBool *_retval) { return _to IsNoCacheResponse(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIHTTPCHANNEL(_to) \ + NS_IMETHOD GetRequestMethod(nsACString & aRequestMethod) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestMethod(aRequestMethod); } \ + NS_IMETHOD SetRequestMethod(const nsACString & aRequestMethod) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRequestMethod(aRequestMethod); } \ + NS_IMETHOD GetReferrer(nsIURI * *aReferrer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReferrer(aReferrer); } \ + NS_IMETHOD SetReferrer(nsIURI * aReferrer) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReferrer(aReferrer); } \ + NS_IMETHOD GetRequestHeader(const nsACString & aHeader, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestHeader(aHeader, _retval); } \ + NS_IMETHOD SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRequestHeader(aHeader, aValue, aMerge); } \ + NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitRequestHeaders(aVisitor); } \ + NS_IMETHOD GetAllowPipelining(PRBool *aAllowPipelining) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowPipelining(aAllowPipelining); } \ + NS_IMETHOD SetAllowPipelining(PRBool aAllowPipelining) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowPipelining(aAllowPipelining); } \ + NS_IMETHOD GetRedirectionLimit(PRUint32 *aRedirectionLimit) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRedirectionLimit(aRedirectionLimit); } \ + NS_IMETHOD SetRedirectionLimit(PRUint32 aRedirectionLimit) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRedirectionLimit(aRedirectionLimit); } \ + NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatus(aResponseStatus); } \ + NS_IMETHOD GetResponseStatusText(nsACString & aResponseStatusText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatusText(aResponseStatusText); } \ + NS_IMETHOD GetRequestSucceeded(PRBool *aRequestSucceeded) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestSucceeded(aRequestSucceeded); } \ + NS_IMETHOD GetResponseHeader(const nsACString & header, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseHeader(header, _retval); } \ + NS_IMETHOD SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetResponseHeader(header, value, merge); } \ + NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitResponseHeaders(aVisitor); } \ + NS_IMETHOD IsNoStoreResponse(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNoStoreResponse(_retval); } \ + NS_IMETHOD IsNoCacheResponse(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNoCacheResponse(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsHttpChannel : public nsIHttpChannel +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIHTTPCHANNEL + + nsHttpChannel(); + +private: + ~nsHttpChannel(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsHttpChannel, nsIHttpChannel) + +nsHttpChannel::nsHttpChannel() +{ + /* member initializers and constructor code */ +} + +nsHttpChannel::~nsHttpChannel() +{ + /* destructor code */ +} + +/* attribute ACString requestMethod; */ +NS_IMETHODIMP nsHttpChannel::GetRequestMethod(nsACString & aRequestMethod) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsHttpChannel::SetRequestMethod(const nsACString & aRequestMethod) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIURI referrer; */ +NS_IMETHODIMP nsHttpChannel::GetReferrer(nsIURI * *aReferrer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsHttpChannel::SetReferrer(nsIURI * aReferrer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* ACString getRequestHeader (in ACString aHeader); */ +NS_IMETHODIMP nsHttpChannel::GetRequestHeader(const nsACString & aHeader, nsACString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setRequestHeader (in ACString aHeader, in ACString aValue, in boolean aMerge); */ +NS_IMETHODIMP nsHttpChannel::SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void visitRequestHeaders (in nsIHttpHeaderVisitor aVisitor); */ +NS_IMETHODIMP nsHttpChannel::VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean allowPipelining; */ +NS_IMETHODIMP nsHttpChannel::GetAllowPipelining(PRBool *aAllowPipelining) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsHttpChannel::SetAllowPipelining(PRBool aAllowPipelining) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute unsigned long redirectionLimit; */ +NS_IMETHODIMP nsHttpChannel::GetRedirectionLimit(PRUint32 *aRedirectionLimit) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsHttpChannel::SetRedirectionLimit(PRUint32 aRedirectionLimit) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long responseStatus; */ +NS_IMETHODIMP nsHttpChannel::GetResponseStatus(PRUint32 *aResponseStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute ACString responseStatusText; */ +NS_IMETHODIMP nsHttpChannel::GetResponseStatusText(nsACString & aResponseStatusText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean requestSucceeded; */ +NS_IMETHODIMP nsHttpChannel::GetRequestSucceeded(PRBool *aRequestSucceeded) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* ACString getResponseHeader (in ACString header); */ +NS_IMETHODIMP nsHttpChannel::GetResponseHeader(const nsACString & header, nsACString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setResponseHeader (in ACString header, in ACString value, in boolean merge); */ +NS_IMETHODIMP nsHttpChannel::SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void visitResponseHeaders (in nsIHttpHeaderVisitor aVisitor); */ +NS_IMETHODIMP nsHttpChannel::VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isNoStoreResponse (); */ +NS_IMETHODIMP nsHttpChannel::IsNoStoreResponse(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isNoCacheResponse (); */ +NS_IMETHODIMP nsHttpChannel::IsNoCacheResponse(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIHttpChannel_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIHttpHeaderVisitor.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIHttpHeaderVisitor.h new file mode 100644 index 00000000..26da77d4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIHttpHeaderVisitor.h @@ -0,0 +1,105 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/protocol/http/public/nsIHttpHeaderVisitor.idl + */ + +#ifndef __gen_nsIHttpHeaderVisitor_h__ +#define __gen_nsIHttpHeaderVisitor_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIHttpHeaderVisitor */ +#define NS_IHTTPHEADERVISITOR_IID_STR "0cf40717-d7c1-4a94-8c1e-d6c9734101bb" + +#define NS_IHTTPHEADERVISITOR_IID \ + {0x0cf40717, 0xd7c1, 0x4a94, \ + { 0x8c, 0x1e, 0xd6, 0xc9, 0x73, 0x41, 0x01, 0xbb }} + +/** + * Implement this interface to visit http headers. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIHttpHeaderVisitor : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTTPHEADERVISITOR_IID) + + /** + * Called by the nsIHttpChannel implementation when visiting request and + * response headers. + * + * @param aHeader + * the header being visited. + * @param aValue + * the header value (possibly a comma delimited list). + * + * @throw any exception to terminate enumeration + */ + /* void visitHeader (in ACString aHeader, in ACString aValue); */ + NS_IMETHOD VisitHeader(const nsACString & aHeader, const nsACString & aValue) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIHTTPHEADERVISITOR \ + NS_IMETHOD VisitHeader(const nsACString & aHeader, const nsACString & aValue); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIHTTPHEADERVISITOR(_to) \ + NS_IMETHOD VisitHeader(const nsACString & aHeader, const nsACString & aValue) { return _to VisitHeader(aHeader, aValue); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIHTTPHEADERVISITOR(_to) \ + NS_IMETHOD VisitHeader(const nsACString & aHeader, const nsACString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitHeader(aHeader, aValue); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsHttpHeaderVisitor : public nsIHttpHeaderVisitor +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIHTTPHEADERVISITOR + + nsHttpHeaderVisitor(); + +private: + ~nsHttpHeaderVisitor(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsHttpHeaderVisitor, nsIHttpHeaderVisitor) + +nsHttpHeaderVisitor::nsHttpHeaderVisitor() +{ + /* member initializers and constructor code */ +} + +nsHttpHeaderVisitor::~nsHttpHeaderVisitor() +{ + /* destructor code */ +} + +/* void visitHeader (in ACString aHeader, in ACString aValue); */ +NS_IMETHODIMP nsHttpHeaderVisitor::VisitHeader(const nsACString & aHeader, const nsACString & aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIHttpHeaderVisitor_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIIOService.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIIOService.h new file mode 100644 index 00000000..8b60f205 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIIOService.h @@ -0,0 +1,278 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIIOService.idl + */ + +#ifndef __gen_nsIIOService_h__ +#define __gen_nsIIOService_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIProtocolHandler; /* forward declaration */ + +class nsIChannel; /* forward declaration */ + +class nsIURI; /* forward declaration */ + +class nsIFile; /* forward declaration */ + + +/* starting interface: nsIIOService */ +#define NS_IIOSERVICE_IID_STR "bddeda3f-9020-4d12-8c70-984ee9f7935e" + +#define NS_IIOSERVICE_IID \ + {0xbddeda3f, 0x9020, 0x4d12, \ + { 0x8c, 0x70, 0x98, 0x4e, 0xe9, 0xf7, 0x93, 0x5e }} + +/** + * nsIIOService provides a set of network utility functions. This interface + * duplicates many of the nsIProtocolHandler methods in a protocol handler + * independent way (e.g., NewURI inspects the scheme in order to delegate + * creation of the new URI to the appropriate protocol handler). nsIIOService + * also provides a set of URL parsing utility functions. These are provided + * as a convenience to the programmer and in some cases to improve performance + * by eliminating intermediate data structures and interfaces. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIIOService : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IIOSERVICE_IID) + + /** + * Returns a protocol handler for a given URI scheme. + * + * @param aScheme the URI scheme + * @return reference to corresponding nsIProtocolHandler + */ + /* nsIProtocolHandler getProtocolHandler (in string aScheme); */ + NS_IMETHOD GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval) = 0; + + /** + * Returns the protocol flags for a given scheme. + * + * @param aScheme the URI scheme + * @return value of corresponding nsIProtocolHandler::protocolFlags + */ + /* unsigned long getProtocolFlags (in string aScheme); */ + NS_IMETHOD GetProtocolFlags(const char *aScheme, PRUint32 *_retval) = 0; + + /** + * This method constructs a new URI by determining the scheme of the + * URI spec, and then delegating the construction of the URI to the + * protocol handler for that scheme. QueryInterface can be used on + * the resulting URI object to obtain a more specific type of URI. + * + * @see nsIProtocolHandler::newURI + */ + /* nsIURI newURI (in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */ + NS_IMETHOD NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) = 0; + + /** + * This method constructs a new URI from a nsIFile. + * + * @param aFile specifies the file path + * @return reference to a new nsIURI object + */ + /* nsIURI newFileURI (in nsIFile aFile); */ + NS_IMETHOD NewFileURI(nsIFile *aFile, nsIURI **_retval) = 0; + + /** + * Creates a channel for a given URI. + * + * @param aURI nsIURI from which to make a channel + * @return reference to the new nsIChannel object + */ + /* nsIChannel newChannelFromURI (in nsIURI aURI); */ + NS_IMETHOD NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval) = 0; + + /** + * Equivalent to newChannelFromURI(newURI(...)) + */ + /* nsIChannel newChannel (in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */ + NS_IMETHOD NewChannel(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIChannel **_retval) = 0; + + /** + * Returns true if networking is in "offline" mode. When in offline mode, + * attempts to access the network will fail (although this is not + * necessarily corrolated with whether there is actually a network + * available -- that's hard to detect without causing the dialer to + * come up). + */ + /* attribute boolean offline; */ + NS_IMETHOD GetOffline(PRBool *aOffline) = 0; + NS_IMETHOD SetOffline(PRBool aOffline) = 0; + + /** + * Checks if a port number is banned. This involves consulting a list of + * unsafe ports, corresponding to network services that may be easily + * exploitable. If the given port is considered unsafe, then the protocol + * handler (corresponding to aScheme) will be asked whether it wishes to + * override the IO service's decision to block the port. This gives the + * protocol handler ultimate control over its own security policy while + * ensuring reasonable, default protection. + * + * @see nsIProtocolHandler::allowPort + */ + /* boolean allowPort (in long aPort, in string aScheme); */ + NS_IMETHOD AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval) = 0; + + /** + * Utility to extract the scheme from a URL string, consistently and + * according to spec (see RFC 2396). + * + * NOTE: Most URL parsing is done via nsIURI, and in fact the scheme + * can also be extracted from a URL string via nsIURI. This method + * is provided purely as an optimization. + * + * @param aSpec the URL string to parse + * @return URL scheme + * + * @throws NS_ERROR_MALFORMED_URI if URL string is not of the right form. + */ + /* ACString extractScheme (in AUTF8String urlString); */ + NS_IMETHOD ExtractScheme(const nsACString & urlString, nsACString & _retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIIOSERVICE \ + NS_IMETHOD GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval); \ + NS_IMETHOD GetProtocolFlags(const char *aScheme, PRUint32 *_retval); \ + NS_IMETHOD NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval); \ + NS_IMETHOD NewFileURI(nsIFile *aFile, nsIURI **_retval); \ + NS_IMETHOD NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval); \ + NS_IMETHOD NewChannel(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIChannel **_retval); \ + NS_IMETHOD GetOffline(PRBool *aOffline); \ + NS_IMETHOD SetOffline(PRBool aOffline); \ + NS_IMETHOD AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval); \ + NS_IMETHOD ExtractScheme(const nsACString & urlString, nsACString & _retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIIOSERVICE(_to) \ + NS_IMETHOD GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval) { return _to GetProtocolHandler(aScheme, _retval); } \ + NS_IMETHOD GetProtocolFlags(const char *aScheme, PRUint32 *_retval) { return _to GetProtocolFlags(aScheme, _retval); } \ + NS_IMETHOD NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) { return _to NewURI(aSpec, aOriginCharset, aBaseURI, _retval); } \ + NS_IMETHOD NewFileURI(nsIFile *aFile, nsIURI **_retval) { return _to NewFileURI(aFile, _retval); } \ + NS_IMETHOD NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval) { return _to NewChannelFromURI(aURI, _retval); } \ + NS_IMETHOD NewChannel(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIChannel **_retval) { return _to NewChannel(aSpec, aOriginCharset, aBaseURI, _retval); } \ + NS_IMETHOD GetOffline(PRBool *aOffline) { return _to GetOffline(aOffline); } \ + NS_IMETHOD SetOffline(PRBool aOffline) { return _to SetOffline(aOffline); } \ + NS_IMETHOD AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval) { return _to AllowPort(aPort, aScheme, _retval); } \ + NS_IMETHOD ExtractScheme(const nsACString & urlString, nsACString & _retval) { return _to ExtractScheme(urlString, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIIOSERVICE(_to) \ + NS_IMETHOD GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocolHandler(aScheme, _retval); } \ + NS_IMETHOD GetProtocolFlags(const char *aScheme, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocolFlags(aScheme, _retval); } \ + NS_IMETHOD NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewURI(aSpec, aOriginCharset, aBaseURI, _retval); } \ + NS_IMETHOD NewFileURI(nsIFile *aFile, nsIURI **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewFileURI(aFile, _retval); } \ + NS_IMETHOD NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewChannelFromURI(aURI, _retval); } \ + NS_IMETHOD NewChannel(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIChannel **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewChannel(aSpec, aOriginCharset, aBaseURI, _retval); } \ + NS_IMETHOD GetOffline(PRBool *aOffline) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOffline(aOffline); } \ + NS_IMETHOD SetOffline(PRBool aOffline) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOffline(aOffline); } \ + NS_IMETHOD AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllowPort(aPort, aScheme, _retval); } \ + NS_IMETHOD ExtractScheme(const nsACString & urlString, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtractScheme(urlString, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsIOService : public nsIIOService +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIIOSERVICE + + nsIOService(); + +private: + ~nsIOService(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsIOService, nsIIOService) + +nsIOService::nsIOService() +{ + /* member initializers and constructor code */ +} + +nsIOService::~nsIOService() +{ + /* destructor code */ +} + +/* nsIProtocolHandler getProtocolHandler (in string aScheme); */ +NS_IMETHODIMP nsIOService::GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* unsigned long getProtocolFlags (in string aScheme); */ +NS_IMETHODIMP nsIOService::GetProtocolFlags(const char *aScheme, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIURI newURI (in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */ +NS_IMETHODIMP nsIOService::NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIURI newFileURI (in nsIFile aFile); */ +NS_IMETHODIMP nsIOService::NewFileURI(nsIFile *aFile, nsIURI **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIChannel newChannelFromURI (in nsIURI aURI); */ +NS_IMETHODIMP nsIOService::NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIChannel newChannel (in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */ +NS_IMETHODIMP nsIOService::NewChannel(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIChannel **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean offline; */ +NS_IMETHODIMP nsIOService::GetOffline(PRBool *aOffline) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsIOService::SetOffline(PRBool aOffline) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean allowPort (in long aPort, in string aScheme); */ +NS_IMETHODIMP nsIOService::AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* ACString extractScheme (in AUTF8String urlString); */ +NS_IMETHODIMP nsIOService::ExtractScheme(const nsACString & urlString, nsACString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIIOService_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIInputStream.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIInputStream.h new file mode 100644 index 00000000..a1e4e3f4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIInputStream.h @@ -0,0 +1,215 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/io/nsIInputStream.idl + */ + +#ifndef __gen_nsIInputStream_h__ +#define __gen_nsIInputStream_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIInputStream; /* forward declaration */ + +/** + * The signature of the writer function passed to ReadSegments. This + * is the "consumer" of data that gets read from the stream's buffer. + * + * @param aInStream stream being read + * @param aClosure opaque parameter passed to ReadSegments + * @param aFromSegment pointer to memory owned by the input stream + * @param aToOffset amount already read (since ReadSegments was called) + * @param aCount length of fromSegment + * @param aWriteCount number of bytes read + * + * Implementers should return the following: + * + * @return NS_OK and (*aWriteCount > 0) if consumed some data + * @return <any-error> if not interested in consuming any data + * + * Errors are never passed to the caller of ReadSegments. + * + * NOTE: returning NS_OK and (*aWriteCount = 0) has undefined behavior. + * + * @status FROZEN + */ +typedef NS_CALLBACK(nsWriteSegmentFun)(nsIInputStream *aInStream, + void *aClosure, + const char *aFromSegment, + PRUint32 aToOffset, + PRUint32 aCount, + PRUint32 *aWriteCount); + +/* starting interface: nsIInputStream */ +#define NS_IINPUTSTREAM_IID_STR "fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a" + +#define NS_IINPUTSTREAM_IID \ + {0xfa9c7f6c, 0x61b3, 0x11d4, \ + { 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a }} + +class NS_NO_VTABLE nsIInputStream : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IINPUTSTREAM_IID) + + /** + * nsIInputStream + * + * @status FROZEN + */ +/** + * Close the stream. + */ + /* void close (); */ + NS_IMETHOD Close(void) = 0; + + /** + * @return number of bytes currently available in the stream + */ + /* unsigned long available (); */ + NS_IMETHOD Available(PRUint32 *_retval) = 0; + + /** + * 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 <other-error> on failure + */ + /* [noscript] unsigned long read (in charPtr aBuf, in unsigned long aCount); */ + NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) = 0; + + /** + * 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 <other-error> 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); */ + NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) = 0; + + /** + * @return true if stream is non-blocking + */ + /* boolean isNonBlocking (); */ + NS_IMETHOD IsNonBlocking(PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIINPUTSTREAM \ + NS_IMETHOD Close(void); \ + NS_IMETHOD Available(PRUint32 *_retval); \ + NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval); \ + NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval); \ + NS_IMETHOD IsNonBlocking(PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIINPUTSTREAM(_to) \ + NS_IMETHOD Close(void) { return _to Close(); } \ + NS_IMETHOD Available(PRUint32 *_retval) { return _to Available(_retval); } \ + NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) { return _to Read(aBuf, aCount, _retval); } \ + NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) { return _to ReadSegments(aWriter, aClosure, aCount, _retval); } \ + NS_IMETHOD IsNonBlocking(PRBool *_retval) { return _to IsNonBlocking(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIINPUTSTREAM(_to) \ + NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \ + NS_IMETHOD Available(PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Available(_retval); } \ + NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Read(aBuf, aCount, _retval); } \ + NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadSegments(aWriter, aClosure, aCount, _retval); } \ + NS_IMETHOD IsNonBlocking(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNonBlocking(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsInputStream : public nsIInputStream +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIINPUTSTREAM + + nsInputStream(); + +private: + ~nsInputStream(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsInputStream, nsIInputStream) + +nsInputStream::nsInputStream() +{ + /* member initializers and constructor code */ +} + +nsInputStream::~nsInputStream() +{ + /* destructor code */ +} + +/* void close (); */ +NS_IMETHODIMP nsInputStream::Close() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* unsigned long available (); */ +NS_IMETHODIMP nsInputStream::Available(PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] unsigned long read (in charPtr aBuf, in unsigned long aCount); */ +NS_IMETHODIMP nsInputStream::Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] unsigned long readSegments (in nsWriteSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount); */ +NS_IMETHODIMP nsInputStream::ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isNonBlocking (); */ +NS_IMETHODIMP nsInputStream::IsNonBlocking(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIInputStream_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIInterfaceRequestor.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIInterfaceRequestor.h new file mode 100644 index 00000000..4a29ef7a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIInterfaceRequestor.h @@ -0,0 +1,112 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsIInterfaceRequestor.idl + */ + +#ifndef __gen_nsIInterfaceRequestor_h__ +#define __gen_nsIInterfaceRequestor_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIInterfaceRequestor */ +#define NS_IINTERFACEREQUESTOR_IID_STR "033a1470-8b2a-11d3-af88-00a024ffc08c" + +#define NS_IINTERFACEREQUESTOR_IID \ + {0x033a1470, 0x8b2a, 0x11d3, \ + { 0xaf, 0x88, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }} + +/** + * The nsIInterfaceRequestor interface defines a generic interface for + * requesting interfaces that a given object might provide access to. + * This is very similar to QueryInterface found in nsISupports. + * The main difference is that interfaces returned from GetInterface() + * are not required to provide a way back to the object implementing this + * interface. The semantics of QI() dictate that given an interface A that + * you QI() on to get to interface B, you must be able to QI on B to get back + * to A. This interface however allows you to obtain an interface C from A + * that may or most likely will not have the ability to get back to A. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIInterfaceRequestor : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IINTERFACEREQUESTOR_IID) + + /** + * 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) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIINTERFACEREQUESTOR \ + NS_IMETHOD GetInterface(const nsIID & uuid, void * *result); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIINTERFACEREQUESTOR(_to) \ + NS_IMETHOD GetInterface(const nsIID & uuid, void * *result) { return _to GetInterface(uuid, result); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIINTERFACEREQUESTOR(_to) \ + NS_IMETHOD GetInterface(const nsIID & uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterface(uuid, result); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsInterfaceRequestor : public nsIInterfaceRequestor +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIINTERFACEREQUESTOR + + nsInterfaceRequestor(); + +private: + ~nsInterfaceRequestor(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsInterfaceRequestor, nsIInterfaceRequestor) + +nsInterfaceRequestor::nsInterfaceRequestor() +{ + /* member initializers and constructor code */ +} + +nsInterfaceRequestor::~nsInterfaceRequestor() +{ + /* destructor code */ +} + +/* void getInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ +NS_IMETHODIMP nsInterfaceRequestor::GetInterface(const nsIID & uuid, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIInterfaceRequestor_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIInterfaceRequestorUtils.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIInterfaceRequestorUtils.h new file mode 100644 index 00000000..2a4c0a8c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIInterfaceRequestorUtils.h @@ -0,0 +1,83 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef __nsInterfaceRequestorUtils_h +#define __nsInterfaceRequestorUtils_h + +#include "nsCOMPtr.h" + +// a type-safe shortcut for calling the |GetInterface()| member function +// T must inherit from nsIInterfaceRequestor, but the cast may be ambiguous. +template <class T, class DestinationType> +inline +nsresult +CallGetInterface( T* aSource, DestinationType** aDestination ) + { + NS_PRECONDITION(aSource, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return aSource->GetInterface(NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); + } + +class NS_COM_GLUE nsGetInterface : public nsCOMPtr_helper + { + public: + nsGetInterface( nsISupports* aSource, nsresult* error ) + : mSource(aSource), + mErrorPtr(error) + { + // nothing else to do here + } + + virtual nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + + private: + nsISupports* mSource; + nsresult* mErrorPtr; + }; + +inline +const nsGetInterface +do_GetInterface( nsISupports* aSource, nsresult* error = 0 ) + { + return nsGetInterface(aSource, error); + } + +#endif // __nsInterfaceRequestorUtils_h + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsILoadGroup.h b/Src/nprt_plugin/gecko/1.8/win/include/nsILoadGroup.h new file mode 100644 index 00000000..30ef5bda --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsILoadGroup.h @@ -0,0 +1,233 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsILoadGroup.idl + */ + +#ifndef __gen_nsILoadGroup_h__ +#define __gen_nsILoadGroup_h__ + + +#ifndef __gen_nsIRequest_h__ +#include "nsIRequest.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsISimpleEnumerator; /* forward declaration */ + +class nsIRequestObserver; /* forward declaration */ + +class nsIInterfaceRequestor; /* forward declaration */ + + +/* starting interface: nsILoadGroup */ +#define NS_ILOADGROUP_IID_STR "3de0a31c-feaf-400f-9f1e-4ef71f8b20cc" + +#define NS_ILOADGROUP_IID \ + {0x3de0a31c, 0xfeaf, 0x400f, \ + { 0x9f, 0x1e, 0x4e, 0xf7, 0x1f, 0x8b, 0x20, 0xcc }} + +class NS_NO_VTABLE nsILoadGroup : public nsIRequest { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOADGROUP_IID) + + /** + * A load group maintains a collection of nsIRequest objects. + * + * @status FROZEN + */ +/** + * 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) = 0; + NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) = 0; + + /** + * 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) = 0; + NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) = 0; + + /** + * 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) = 0; + + /** + * 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) = 0; + + /** + * Returns the requests contained directly in this group. + * Enumerator element type: nsIRequest. + */ + /* readonly attribute nsISimpleEnumerator requests; */ + NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) = 0; + + /** + * Returns the count of "active" requests (ie. requests without the + * LOAD_BACKGROUND bit set). + */ + /* readonly attribute unsigned long activeCount; */ + NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) = 0; + + /** + * Notification callbacks for the load group. + */ + /* attribute nsIInterfaceRequestor notificationCallbacks; */ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) = 0; + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSILOADGROUP \ + NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver); \ + NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver); \ + NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest); \ + NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest); \ + NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext); \ + NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus); \ + NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests); \ + NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount); \ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks); \ + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSILOADGROUP(_to) \ + NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) { return _to GetGroupObserver(aGroupObserver); } \ + NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) { return _to SetGroupObserver(aGroupObserver); } \ + NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) { return _to GetDefaultLoadRequest(aDefaultLoadRequest); } \ + NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) { return _to SetDefaultLoadRequest(aDefaultLoadRequest); } \ + NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext) { return _to AddRequest(aRequest, aContext); } \ + NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) { return _to RemoveRequest(aRequest, aContext, aStatus); } \ + NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) { return _to GetRequests(aRequests); } \ + NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) { return _to GetActiveCount(aActiveCount); } \ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return _to GetNotificationCallbacks(aNotificationCallbacks); } \ + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return _to SetNotificationCallbacks(aNotificationCallbacks); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSILOADGROUP(_to) \ + NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGroupObserver(aGroupObserver); } \ + NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetGroupObserver(aGroupObserver); } \ + NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultLoadRequest(aDefaultLoadRequest); } \ + NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultLoadRequest(aDefaultLoadRequest); } \ + NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRequest(aRequest, aContext); } \ + NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveRequest(aRequest, aContext, aStatus); } \ + NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequests(aRequests); } \ + NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActiveCount(aActiveCount); } \ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotificationCallbacks(aNotificationCallbacks); } \ + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNotificationCallbacks(aNotificationCallbacks); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsLoadGroup : public nsILoadGroup +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSILOADGROUP + + nsLoadGroup(); + +private: + ~nsLoadGroup(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsLoadGroup, nsILoadGroup) + +nsLoadGroup::nsLoadGroup() +{ + /* member initializers and constructor code */ +} + +nsLoadGroup::~nsLoadGroup() +{ + /* destructor code */ +} + +/* attribute nsIRequestObserver groupObserver; */ +NS_IMETHODIMP nsLoadGroup::GetGroupObserver(nsIRequestObserver * *aGroupObserver) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsLoadGroup::SetGroupObserver(nsIRequestObserver * aGroupObserver) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIRequest defaultLoadRequest; */ +NS_IMETHODIMP nsLoadGroup::GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsLoadGroup::SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void addRequest (in nsIRequest aRequest, in nsISupports aContext); */ +NS_IMETHODIMP nsLoadGroup::AddRequest(nsIRequest *aRequest, nsISupports *aContext) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatus); */ +NS_IMETHODIMP nsLoadGroup::RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsISimpleEnumerator requests; */ +NS_IMETHODIMP nsLoadGroup::GetRequests(nsISimpleEnumerator * *aRequests) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long activeCount; */ +NS_IMETHODIMP nsLoadGroup::GetActiveCount(PRUint32 *aActiveCount) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIInterfaceRequestor notificationCallbacks; */ +NS_IMETHODIMP nsLoadGroup::GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsLoadGroup::SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsILoadGroup_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsILocalFile.h b/Src/nprt_plugin/gecko/1.8/win/include/nsILocalFile.h new file mode 100644 index 00000000..8afe1770 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsILocalFile.h @@ -0,0 +1,373 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/io/nsILocalFile.idl + */ + +#ifndef __gen_nsILocalFile_h__ +#define __gen_nsILocalFile_h__ + + +#ifndef __gen_nsIFile_h__ +#include "nsIFile.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "prio.h" +#include "prlink.h" +#include <stdio.h> + +/* starting interface: nsILocalFile */ +#define NS_ILOCALFILE_IID_STR "aa610f20-a889-11d3-8c81-000064657374" + +#define NS_ILOCALFILE_IID \ + {0xaa610f20, 0xa889, 0x11d3, \ + { 0x8c, 0x81, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }} + +/** + * This interface adds methods to nsIFile that are particular to a file + * that is accessible via the local file system. + * + * It follows the same string conventions as nsIFile. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsILocalFile : public nsIFile { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOCALFILE_IID) + + /** + * initWith[Native]Path + * + * This function will initialize the nsILocalFile object. Any + * internal state information will be reset. + * + * NOTE: This function has a known bug on the macintosh and + * other OSes which do not represent file locations as paths. + * If you do use this function, be very aware of this problem! + * + * @param filePath + * A string which specifies a full file path to a + * location. Relative paths will be treated as an + * error (NS_ERROR_FILE_UNRECOGNIZED_PATH). For + * initWithNativePath, the filePath must be in the native + * filesystem charset. + */ + /* void initWithPath (in AString filePath); */ + NS_IMETHOD InitWithPath(const nsAString & filePath) = 0; + + /* [noscript] void initWithNativePath (in ACString filePath); */ + NS_IMETHOD InitWithNativePath(const nsACString & filePath) = 0; + + /** + * initWithFile + * + * Initialize this object with another file + * + * @param aFile + * the file this becomes equivalent to + */ + /* void initWithFile (in nsILocalFile aFile); */ + NS_IMETHOD InitWithFile(nsILocalFile *aFile) = 0; + + /** + * followLinks + * + * This attribute will determine if the nsLocalFile will auto + * resolve symbolic links. By default, this value will be false + * on all non unix systems. On unix, this attribute is effectively + * a noop. + */ + /* attribute PRBool followLinks; */ + NS_IMETHOD GetFollowLinks(PRBool *aFollowLinks) = 0; + NS_IMETHOD SetFollowLinks(PRBool aFollowLinks) = 0; + + /* [noscript] PRFileDescStar openNSPRFileDesc (in long flags, in long mode); */ + NS_IMETHOD OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval) = 0; + + /* [noscript] FILE openANSIFileDesc (in string mode); */ + NS_IMETHOD OpenANSIFileDesc(const char *mode, FILE * *_retval) = 0; + + /* [noscript] PRLibraryStar load (); */ + NS_IMETHOD Load(PRLibrary * *_retval) = 0; + + /* readonly attribute PRInt64 diskSpaceAvailable; */ + NS_IMETHOD GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) = 0; + + /** + * appendRelative[Native]Path + * + * Append a relative path to the current path of the nsILocalFile object. + * + * @param relativeFilePath + * relativeFilePath is a native relative path. For security reasons, + * this cannot contain .. or cannot start with a directory separator. + * For the |appendRelativeNativePath| method, the relativeFilePath + * must be in the native filesystem charset. + */ + /* void appendRelativePath (in AString relativeFilePath); */ + NS_IMETHOD AppendRelativePath(const nsAString & relativeFilePath) = 0; + + /* [noscript] void appendRelativeNativePath (in ACString relativeFilePath); */ + NS_IMETHOD AppendRelativeNativePath(const nsACString & relativeFilePath) = 0; + + /** + * Accessor to a null terminated string which will specify + * the file in a persistent manner for disk storage. + * + * The character set of this attribute is undefined. DO NOT TRY TO + * INTERPRET IT AS HUMAN READABLE TEXT! + */ + /* attribute ACString persistentDescriptor; */ + NS_IMETHOD GetPersistentDescriptor(nsACString & aPersistentDescriptor) = 0; + NS_IMETHOD SetPersistentDescriptor(const nsACString & aPersistentDescriptor) = 0; + + /** + * reveal + * + * Ask the operating system to open the folder which contains + * this file or folder. This routine only works on platforms which + * support the ability to open a folder... + */ + /* void reveal (); */ + NS_IMETHOD Reveal(void) = 0; + + /** + * launch + * + * Ask the operating system to attempt to open the file. + * this really just simulates "double clicking" the file on your platform. + * This routine only works on platforms which support this functionality. + */ + /* void launch (); */ + NS_IMETHOD Launch(void) = 0; + + /** + * getRelativeDescriptor + * + * Returns a relative file path in an opaque, XP format. It is therefore + * not a native path. + * + * The character set of the string returned from this function is + * undefined. DO NOT TRY TO INTERPRET IT AS HUMAN READABLE TEXT! + * + * @param fromFile + * the file from which the descriptor is relative. + * There is no defined result if this param is null. + */ + /* ACString getRelativeDescriptor (in nsILocalFile fromFile); */ + NS_IMETHOD GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval) = 0; + + /** + * setRelativeDescriptor + * + * Initializes the file to the location relative to fromFile using + * a string returned by getRelativeDescriptor. + * + * @param fromFile + * the file to which the descriptor is relative + * @param relative + * the relative descriptor obtained from getRelativeDescriptor + */ + /* void setRelativeDescriptor (in nsILocalFile fromFile, in ACString relativeDesc); */ + NS_IMETHOD SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & relativeDesc) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSILOCALFILE \ + NS_IMETHOD InitWithPath(const nsAString & filePath); \ + NS_IMETHOD InitWithNativePath(const nsACString & filePath); \ + NS_IMETHOD InitWithFile(nsILocalFile *aFile); \ + NS_IMETHOD GetFollowLinks(PRBool *aFollowLinks); \ + NS_IMETHOD SetFollowLinks(PRBool aFollowLinks); \ + NS_IMETHOD OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval); \ + NS_IMETHOD OpenANSIFileDesc(const char *mode, FILE * *_retval); \ + NS_IMETHOD Load(PRLibrary * *_retval); \ + NS_IMETHOD GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable); \ + NS_IMETHOD AppendRelativePath(const nsAString & relativeFilePath); \ + NS_IMETHOD AppendRelativeNativePath(const nsACString & relativeFilePath); \ + NS_IMETHOD GetPersistentDescriptor(nsACString & aPersistentDescriptor); \ + NS_IMETHOD SetPersistentDescriptor(const nsACString & aPersistentDescriptor); \ + NS_IMETHOD Reveal(void); \ + NS_IMETHOD Launch(void); \ + NS_IMETHOD GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval); \ + NS_IMETHOD SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & relativeDesc); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSILOCALFILE(_to) \ + NS_IMETHOD InitWithPath(const nsAString & filePath) { return _to InitWithPath(filePath); } \ + NS_IMETHOD InitWithNativePath(const nsACString & filePath) { return _to InitWithNativePath(filePath); } \ + NS_IMETHOD InitWithFile(nsILocalFile *aFile) { return _to InitWithFile(aFile); } \ + NS_IMETHOD GetFollowLinks(PRBool *aFollowLinks) { return _to GetFollowLinks(aFollowLinks); } \ + NS_IMETHOD SetFollowLinks(PRBool aFollowLinks) { return _to SetFollowLinks(aFollowLinks); } \ + NS_IMETHOD OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval) { return _to OpenNSPRFileDesc(flags, mode, _retval); } \ + NS_IMETHOD OpenANSIFileDesc(const char *mode, FILE * *_retval) { return _to OpenANSIFileDesc(mode, _retval); } \ + NS_IMETHOD Load(PRLibrary * *_retval) { return _to Load(_retval); } \ + NS_IMETHOD GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) { return _to GetDiskSpaceAvailable(aDiskSpaceAvailable); } \ + NS_IMETHOD AppendRelativePath(const nsAString & relativeFilePath) { return _to AppendRelativePath(relativeFilePath); } \ + NS_IMETHOD AppendRelativeNativePath(const nsACString & relativeFilePath) { return _to AppendRelativeNativePath(relativeFilePath); } \ + NS_IMETHOD GetPersistentDescriptor(nsACString & aPersistentDescriptor) { return _to GetPersistentDescriptor(aPersistentDescriptor); } \ + NS_IMETHOD SetPersistentDescriptor(const nsACString & aPersistentDescriptor) { return _to SetPersistentDescriptor(aPersistentDescriptor); } \ + NS_IMETHOD Reveal(void) { return _to Reveal(); } \ + NS_IMETHOD Launch(void) { return _to Launch(); } \ + NS_IMETHOD GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval) { return _to GetRelativeDescriptor(fromFile, _retval); } \ + NS_IMETHOD SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & relativeDesc) { return _to SetRelativeDescriptor(fromFile, relativeDesc); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSILOCALFILE(_to) \ + NS_IMETHOD InitWithPath(const nsAString & filePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithPath(filePath); } \ + NS_IMETHOD InitWithNativePath(const nsACString & filePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithNativePath(filePath); } \ + NS_IMETHOD InitWithFile(nsILocalFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithFile(aFile); } \ + NS_IMETHOD GetFollowLinks(PRBool *aFollowLinks) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFollowLinks(aFollowLinks); } \ + NS_IMETHOD SetFollowLinks(PRBool aFollowLinks) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFollowLinks(aFollowLinks); } \ + NS_IMETHOD OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenNSPRFileDesc(flags, mode, _retval); } \ + NS_IMETHOD OpenANSIFileDesc(const char *mode, FILE * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenANSIFileDesc(mode, _retval); } \ + NS_IMETHOD Load(PRLibrary * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Load(_retval); } \ + NS_IMETHOD GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDiskSpaceAvailable(aDiskSpaceAvailable); } \ + NS_IMETHOD AppendRelativePath(const nsAString & relativeFilePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendRelativePath(relativeFilePath); } \ + NS_IMETHOD AppendRelativeNativePath(const nsACString & relativeFilePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendRelativeNativePath(relativeFilePath); } \ + NS_IMETHOD GetPersistentDescriptor(nsACString & aPersistentDescriptor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPersistentDescriptor(aPersistentDescriptor); } \ + NS_IMETHOD SetPersistentDescriptor(const nsACString & aPersistentDescriptor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPersistentDescriptor(aPersistentDescriptor); } \ + NS_IMETHOD Reveal(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Reveal(); } \ + NS_IMETHOD Launch(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Launch(); } \ + NS_IMETHOD GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRelativeDescriptor(fromFile, _retval); } \ + NS_IMETHOD SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & relativeDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRelativeDescriptor(fromFile, relativeDesc); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsLocalFile : public nsILocalFile +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSILOCALFILE + + nsLocalFile(); + +private: + ~nsLocalFile(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsLocalFile, nsILocalFile) + +nsLocalFile::nsLocalFile() +{ + /* member initializers and constructor code */ +} + +nsLocalFile::~nsLocalFile() +{ + /* destructor code */ +} + +/* void initWithPath (in AString filePath); */ +NS_IMETHODIMP nsLocalFile::InitWithPath(const nsAString & filePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void initWithNativePath (in ACString filePath); */ +NS_IMETHODIMP nsLocalFile::InitWithNativePath(const nsACString & filePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void initWithFile (in nsILocalFile aFile); */ +NS_IMETHODIMP nsLocalFile::InitWithFile(nsILocalFile *aFile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute PRBool followLinks; */ +NS_IMETHODIMP nsLocalFile::GetFollowLinks(PRBool *aFollowLinks) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsLocalFile::SetFollowLinks(PRBool aFollowLinks) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] PRFileDescStar openNSPRFileDesc (in long flags, in long mode); */ +NS_IMETHODIMP nsLocalFile::OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] FILE openANSIFileDesc (in string mode); */ +NS_IMETHODIMP nsLocalFile::OpenANSIFileDesc(const char *mode, FILE * *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] PRLibraryStar load (); */ +NS_IMETHODIMP nsLocalFile::Load(PRLibrary * *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRInt64 diskSpaceAvailable; */ +NS_IMETHODIMP nsLocalFile::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void appendRelativePath (in AString relativeFilePath); */ +NS_IMETHODIMP nsLocalFile::AppendRelativePath(const nsAString & relativeFilePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void appendRelativeNativePath (in ACString relativeFilePath); */ +NS_IMETHODIMP nsLocalFile::AppendRelativeNativePath(const nsACString & relativeFilePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute ACString persistentDescriptor; */ +NS_IMETHODIMP nsLocalFile::GetPersistentDescriptor(nsACString & aPersistentDescriptor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsLocalFile::SetPersistentDescriptor(const nsACString & aPersistentDescriptor) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void reveal (); */ +NS_IMETHODIMP nsLocalFile::Reveal() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void launch (); */ +NS_IMETHODIMP nsLocalFile::Launch() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* ACString getRelativeDescriptor (in nsILocalFile fromFile); */ +NS_IMETHODIMP nsLocalFile::GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setRelativeDescriptor (in nsILocalFile fromFile, in ACString relativeDesc); */ +NS_IMETHODIMP nsLocalFile::SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & relativeDesc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsILocalFile_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIMemory.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIMemory.h new file mode 100644 index 00000000..3e9128b0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIMemory.h @@ -0,0 +1,212 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsIMemory.idl + */ + +#ifndef __gen_nsIMemory_h__ +#define __gen_nsIMemory_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIMemory */ +#define NS_IMEMORY_IID_STR "59e7e77a-38e4-11d4-8cf5-0060b0fc14a3" + +#define NS_IMEMORY_IID \ + {0x59e7e77a, 0x38e4, 0x11d4, \ + { 0x8c, 0xf5, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }} + +/** + * + * nsIMemory: interface to allocate and deallocate memory. Also provides + * for notifications in low-memory situations. + * + * The frozen exported symbols NS_Alloc, NS_Realloc, and NS_Free + * provide a more efficient way to access XPCOM memory allocation. Using + * those symbols is preferred to using the methods on this interface. + * + * A client that wishes to be notified of low memory situations (for + * example, because the client maintains a large memory cache that + * could be released when memory is tight) should register with the + * observer service (see nsIObserverService) using the topic + * "memory-pressure". There are three specific types of notications + * that can occur. These types will be passed as the |aData| + * parameter of the of the "memory-pressure" notification: + * + * "low-memory" + * This will be passed as the extra data when the pressure + * observer is being asked to flush for low-memory conditions. + * + * "heap-minimize" + * This will be passed as the extra data when the pressure + * observer is being asked to flush because of a heap minimize + * call. + * + * "alloc-failure" + * This will be passed as the extra data when the pressure + * observer has been asked to flush because a malloc() or + * realloc() has failed. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIMemory : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMEMORY_IID) + + /** + * 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) = 0; + + /** + * 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) = 0; + + /** + * 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) = 0; + + /** + * 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) = 0; + + /** + * 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) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIMEMORY \ + NS_IMETHOD_(void *) Alloc(size_t size); \ + NS_IMETHOD_(void *) Realloc(void * ptr, size_t newSize); \ + NS_IMETHOD_(void) Free(void * ptr); \ + NS_IMETHOD HeapMinimize(PRBool immediate); \ + NS_IMETHOD IsLowMemory(PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIMEMORY(_to) \ + NS_IMETHOD_(void *) Alloc(size_t size) { return _to Alloc(size); } \ + NS_IMETHOD_(void *) Realloc(void * ptr, size_t newSize) { return _to Realloc(ptr, newSize); } \ + NS_IMETHOD_(void) Free(void * ptr) { return _to Free(ptr); } \ + NS_IMETHOD HeapMinimize(PRBool immediate) { return _to HeapMinimize(immediate); } \ + NS_IMETHOD IsLowMemory(PRBool *_retval) { return _to IsLowMemory(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIMEMORY(_to) \ + NS_IMETHOD_(void *) Alloc(size_t size) { return !_to ? NS_ERROR_NULL_POINTER : _to->Alloc(size); } \ + NS_IMETHOD_(void *) Realloc(void * ptr, size_t newSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->Realloc(ptr, newSize); } \ + NS_IMETHOD_(void) Free(void * ptr) { return !_to ? NS_ERROR_NULL_POINTER : _to->Free(ptr); } \ + NS_IMETHOD HeapMinimize(PRBool immediate) { return !_to ? NS_ERROR_NULL_POINTER : _to->HeapMinimize(immediate); } \ + NS_IMETHOD IsLowMemory(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsLowMemory(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsMemory : public nsIMemory +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIMEMORY + + nsMemory(); + +private: + ~nsMemory(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsMemory, nsIMemory) + +nsMemory::nsMemory() +{ + /* member initializers and constructor code */ +} + +nsMemory::~nsMemory() +{ + /* destructor code */ +} + +/* [noscript, notxpcom] voidPtr alloc (in size_t size); */ +NS_IMETHODIMP_(void *) nsMemory::Alloc(size_t size) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript, notxpcom] voidPtr realloc (in voidPtr ptr, in size_t newSize); */ +NS_IMETHODIMP_(void *) nsMemory::Realloc(void * ptr, size_t newSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript, notxpcom] void free (in voidPtr ptr); */ +NS_IMETHODIMP_(void) nsMemory::Free(void * ptr) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void heapMinimize (in boolean immediate); */ +NS_IMETHODIMP nsMemory::HeapMinimize(PRBool immediate) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isLowMemory (); */ +NS_IMETHODIMP nsMemory::IsLowMemory(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIMemory_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIModule.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIModule.h new file mode 100644 index 00000000..2c57a2c4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIModule.h @@ -0,0 +1,180 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsIModule.idl + */ + +#ifndef __gen_nsIModule_h__ +#define __gen_nsIModule_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIFile; /* forward declaration */ + +class nsIComponentManager; /* forward declaration */ + + +/* starting interface: nsIModule */ +#define NS_IMODULE_IID_STR "7392d032-5371-11d3-994e-00805fd26fee" + +#define NS_IMODULE_IID \ + {0x7392d032, 0x5371, 0x11d3, \ + { 0x99, 0x4e, 0x00, 0x80, 0x5f, 0xd2, 0x6f, 0xee }} + +/** + * The nsIModule interface. + * @status FROZEN + */ +class NS_NO_VTABLE nsIModule : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMODULE_IID) + + /** + * Object Instance Creation + * + * Obtains a Class Object from a nsIModule for a given CID and IID pair. + * This class object can either be query to a nsIFactory or a may be + * query to a nsIClassInfo. + * + * @param aCompMgr : The global component manager + * @param aClass : ClassID of object instance requested + * @param aIID : IID of interface requested + * + */ + /* void getClassObject (in nsIComponentManager aCompMgr, in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */ + NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult) = 0; + + /** + * One time registration callback + * + * When the nsIModule is discovered, this method will be + * called so that any setup registration can be preformed. + * + * @param aCompMgr : The global component manager + * @param aLocation : The location of the nsIModule on disk + * @param aLoaderStr: Opaque loader specific string + * @param aType : Loader Type being used to load this module + */ + /* void registerSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr, in string aType); */ + NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType) = 0; + + /** + * One time unregistration callback + * + * When the nsIModule is being unregistered, this method will be + * called so that any unregistration can be preformed + * + * @param aCompMgr : The global component manager + * @param aLocation : The location of the nsIModule on disk + * @param aLoaderStr : Opaque loader specific string + * + */ + /* void unregisterSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr); */ + NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) = 0; + + /** + * Module load management + * + * @param aCompMgr : The global component manager + * + * @return indicates to the caller if the module can be unloaded. + * Returning PR_TRUE isn't a guarantee that the module will be + * unloaded. It constitues only willingness of the module to be + * unloaded. It is very important to ensure that no outstanding + * references to the module's code/data exist before returning + * PR_TRUE. + * Returning PR_FALSE guaratees that the module wont be unloaded. + */ + /* boolean canUnload (in nsIComponentManager aCompMgr); */ + NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIMODULE \ + NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult); \ + NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType); \ + NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr); \ + NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIMODULE(_to) \ + NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult) { return _to GetClassObject(aCompMgr, aClass, aIID, aResult); } \ + NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType) { return _to RegisterSelf(aCompMgr, aLocation, aLoaderStr, aType); } \ + NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) { return _to UnregisterSelf(aCompMgr, aLocation, aLoaderStr); } \ + NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) { return _to CanUnload(aCompMgr, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIMODULE(_to) \ + NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObject(aCompMgr, aClass, aIID, aResult); } \ + NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterSelf(aCompMgr, aLocation, aLoaderStr, aType); } \ + NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterSelf(aCompMgr, aLocation, aLoaderStr); } \ + NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanUnload(aCompMgr, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsModule : public nsIModule +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIMODULE + + nsModule(); + +private: + ~nsModule(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsModule, nsIModule) + +nsModule::nsModule() +{ + /* member initializers and constructor code */ +} + +nsModule::~nsModule() +{ + /* destructor code */ +} + +/* void getClassObject (in nsIComponentManager aCompMgr, in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */ +NS_IMETHODIMP nsModule::GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr, in string aType); */ +NS_IMETHODIMP nsModule::RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr); */ +NS_IMETHODIMP nsModule::UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean canUnload (in nsIComponentManager aCompMgr); */ +NS_IMETHODIMP nsModule::CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIModule_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIObserver.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIObserver.h new file mode 100644 index 00000000..40dcddb9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIObserver.h @@ -0,0 +1,112 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/ds/nsIObserver.idl + */ + +#ifndef __gen_nsIObserver_h__ +#define __gen_nsIObserver_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIObserver */ +#define NS_IOBSERVER_IID_STR "db242e01-e4d9-11d2-9dde-000064657374" + +#define NS_IOBSERVER_IID \ + {0xdb242e01, 0xe4d9, 0x11d2, \ + { 0x9d, 0xde, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }} + +/** + * This interface is implemented by an object that wants + * to observe an event corresponding to a topic. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIObserver : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IOBSERVER_IID) + + /** + * Observe will be called when there is a notification for the + * topic |aTopic|. This assumes that the object implementing + * this interface has been registered with an observer service + * such as the nsIObserverService. + * + * If you expect multiple topics/subjects, the impl is + * responsible for filtering. + * + * You should not modify, add, remove, or enumerate + * notifications in the implemention of observe. + * + * @param aSubject : Notification specific interface pointer. + * @param aTopic : The notification topic or subject. + * @param aData : Notification specific wide string. + * subject event. + */ + /* void observe (in nsISupports aSubject, in string aTopic, in wstring aData); */ + NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIOBSERVER \ + NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIOBSERVER(_to) \ + NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) { return _to Observe(aSubject, aTopic, aData); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIOBSERVER(_to) \ + NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->Observe(aSubject, aTopic, aData); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsObserver : public nsIObserver +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIOBSERVER + + nsObserver(); + +private: + ~nsObserver(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsObserver, nsIObserver) + +nsObserver::nsObserver() +{ + /* member initializers and constructor code */ +} + +nsObserver::~nsObserver() +{ + /* destructor code */ +} + +/* void observe (in nsISupports aSubject, in string aTopic, in wstring aData); */ +NS_IMETHODIMP nsObserver::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIObserver_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIObserverService.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIObserverService.h new file mode 100644 index 00000000..36eb447f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIObserverService.h @@ -0,0 +1,179 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/ds/nsIObserverService.idl + */ + +#ifndef __gen_nsIObserverService_h__ +#define __gen_nsIObserverService_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIObserver; /* forward declaration */ + +class nsISimpleEnumerator; /* forward declaration */ + + +/* starting interface: nsIObserverService */ +#define NS_IOBSERVERSERVICE_IID_STR "d07f5192-e3d1-11d2-8acd-00105a1b8860" + +#define NS_IOBSERVERSERVICE_IID \ + {0xd07f5192, 0xe3d1, 0x11d2, \ + { 0x8a, 0xcd, 0x00, 0x10, 0x5a, 0x1b, 0x88, 0x60 }} + +/** + * nsIObserverService + * + * Service allows a client listener (nsIObserver) to register and unregister for + * notifications of specific string referenced topic. Service also provides a + * way to notify registered listeners and a way to enumerate registered client + * listeners. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIObserverService : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IOBSERVERSERVICE_IID) + + /** + * AddObserver + * + * Registers a given listener for a notifications regarding the specified + * topic. + * + * @param anObserve : The interface pointer which will receive notifications. + * @param aTopic : The notification topic or subject. + * @param ownsWeak : If set to false, the nsIObserverService will hold a + * strong reference to |anObserver|. If set to true and + * |anObserver| supports the nsIWeakReference interface, + * a weak reference will be held. Otherwise an error will be + * returned. + */ + /* void addObserver (in nsIObserver anObserver, in string aTopic, in boolean ownsWeak); */ + NS_IMETHOD AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak) = 0; + + /** + * removeObserver + * + * Unregisters a given listener from notifications regarding the specified + * topic. + * + * @param anObserver : The interface pointer which will stop recieving + * notifications. + * @param aTopic : The notification topic or subject. + */ + /* void removeObserver (in nsIObserver anObserver, in string aTopic); */ + NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char *aTopic) = 0; + + /** + * notifyObservers + * + * Notifies all registered listeners of the given topic. + * + * @param aSubject : Notification specific interface pointer. + * @param aTopic : The notification topic or subject. + * @param someData : Notification specific wide string. + */ + /* void notifyObservers (in nsISupports aSubject, in string aTopic, in wstring someData); */ + NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) = 0; + + /** + * enumerateObservers + * + * Returns an enumeration of all registered listeners. + * + * @param aTopic : The notification topic or subject. + */ + /* nsISimpleEnumerator enumerateObservers (in string aTopic); */ + NS_IMETHOD EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIOBSERVERSERVICE \ + NS_IMETHOD AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak); \ + NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char *aTopic); \ + NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData); \ + NS_IMETHOD EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIOBSERVERSERVICE(_to) \ + NS_IMETHOD AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak) { return _to AddObserver(anObserver, aTopic, ownsWeak); } \ + NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char *aTopic) { return _to RemoveObserver(anObserver, aTopic); } \ + NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) { return _to NotifyObservers(aSubject, aTopic, someData); } \ + NS_IMETHOD EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval) { return _to EnumerateObservers(aTopic, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIOBSERVERSERVICE(_to) \ + NS_IMETHOD AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(anObserver, aTopic, ownsWeak); } \ + NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char *aTopic) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(anObserver, aTopic); } \ + NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyObservers(aSubject, aTopic, someData); } \ + NS_IMETHOD EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateObservers(aTopic, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsObserverService : public nsIObserverService +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIOBSERVERSERVICE + + nsObserverService(); + +private: + ~nsObserverService(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsObserverService, nsIObserverService) + +nsObserverService::nsObserverService() +{ + /* member initializers and constructor code */ +} + +nsObserverService::~nsObserverService() +{ + /* destructor code */ +} + +/* void addObserver (in nsIObserver anObserver, in string aTopic, in boolean ownsWeak); */ +NS_IMETHODIMP nsObserverService::AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeObserver (in nsIObserver anObserver, in string aTopic); */ +NS_IMETHODIMP nsObserverService::RemoveObserver(nsIObserver *anObserver, const char *aTopic) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void notifyObservers (in nsISupports aSubject, in string aTopic, in wstring someData); */ +NS_IMETHODIMP nsObserverService::NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISimpleEnumerator enumerateObservers (in string aTopic); */ +NS_IMETHODIMP nsObserverService::EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIObserverService_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIOutputStream.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIOutputStream.h new file mode 100644 index 00000000..6fd4ba1f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIOutputStream.h @@ -0,0 +1,253 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/io/nsIOutputStream.idl + */ + +#ifndef __gen_nsIOutputStream_h__ +#define __gen_nsIOutputStream_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIOutputStream; /* forward declaration */ + +class nsIInputStream; /* forward declaration */ + +/** + * The signature for the reader function passed to WriteSegments. This + * is the "provider" of data that gets written into the stream's buffer. + * + * @param aOutStream stream being written to + * @param aClosure opaque parameter passed to WriteSegments + * @param aToSegment pointer to memory owned by the output stream + * @param aFromOffset amount already written (since WriteSegments was called) + * @param aCount length of toSegment + * @param aReadCount number of bytes written + * + * Implementers should return the following: + * + * @return NS_OK and (*aReadCount > 0) if successfully provided some data + * @return NS_OK and (*aReadCount = 0) or + * @return <any-error> if not interested in providing any data + * + * Errors are never passed to the caller of WriteSegments. + * + * @status FROZEN + */ +typedef NS_CALLBACK(nsReadSegmentFun)(nsIOutputStream *aOutStream, + void *aClosure, + char *aToSegment, + PRUint32 aFromOffset, + PRUint32 aCount, + PRUint32 *aReadCount); + +/* starting interface: nsIOutputStream */ +#define NS_IOUTPUTSTREAM_IID_STR "0d0acd2a-61b4-11d4-9877-00c04fa0cf4a" + +#define NS_IOUTPUTSTREAM_IID \ + {0x0d0acd2a, 0x61b4, 0x11d4, \ + { 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a }} + +class NS_NO_VTABLE nsIOutputStream : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IOUTPUTSTREAM_IID) + + /** + * nsIOutputStream + * + * @status FROZEN + */ +/** + * 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) = 0; + + /** + * 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) = 0; + + /** + * 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 <other-error> on failure + */ + /* unsigned long write (in string aBuf, in unsigned long aCount); */ + NS_IMETHOD Write(const char *aBuf, PRUint32 aCount, PRUint32 *_retval) = 0; + + /** + * 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 <other-error> 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) = 0; + + /** + * 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 <other-error> 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) = 0; + + /** + * @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) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIOUTPUTSTREAM \ + NS_IMETHOD Close(void); \ + NS_IMETHOD Flush(void); \ + NS_IMETHOD Write(const char *aBuf, PRUint32 aCount, PRUint32 *_retval); \ + NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval); \ + NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval); \ + NS_IMETHOD IsNonBlocking(PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIOUTPUTSTREAM(_to) \ + NS_IMETHOD Close(void) { return _to Close(); } \ + NS_IMETHOD Flush(void) { return _to Flush(); } \ + NS_IMETHOD Write(const char *aBuf, PRUint32 aCount, PRUint32 *_retval) { return _to Write(aBuf, aCount, _retval); } \ + NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval) { return _to WriteFrom(aFromStream, aCount, _retval); } \ + NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval) { return _to WriteSegments(aReader, aClosure, aCount, _retval); } \ + NS_IMETHOD IsNonBlocking(PRBool *_retval) { return _to IsNonBlocking(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIOUTPUTSTREAM(_to) \ + NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \ + NS_IMETHOD Flush(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Flush(); } \ + NS_IMETHOD Write(const char *aBuf, PRUint32 aCount, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Write(aBuf, aCount, _retval); } \ + NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteFrom(aFromStream, aCount, _retval); } \ + NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteSegments(aReader, aClosure, aCount, _retval); } \ + NS_IMETHOD IsNonBlocking(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNonBlocking(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsOutputStream : public nsIOutputStream +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIOUTPUTSTREAM + + nsOutputStream(); + +private: + ~nsOutputStream(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsOutputStream, nsIOutputStream) + +nsOutputStream::nsOutputStream() +{ + /* member initializers and constructor code */ +} + +nsOutputStream::~nsOutputStream() +{ + /* destructor code */ +} + +/* void close (); */ +NS_IMETHODIMP nsOutputStream::Close() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void flush (); */ +NS_IMETHODIMP nsOutputStream::Flush() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* unsigned long write (in string aBuf, in unsigned long aCount); */ +NS_IMETHODIMP nsOutputStream::Write(const char *aBuf, PRUint32 aCount, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* unsigned long writeFrom (in nsIInputStream aFromStream, in unsigned long aCount); */ +NS_IMETHODIMP nsOutputStream::WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] unsigned long writeSegments (in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); */ +NS_IMETHODIMP nsOutputStream::WriteSegments(nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isNonBlocking (); */ +NS_IMETHODIMP nsOutputStream::IsNonBlocking(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIOutputStream_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefBranch.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefBranch.h new file mode 100644 index 00000000..b96a3036 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefBranch.h @@ -0,0 +1,557 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/modules/libpref/public/nsIPrefBranch.idl + */ + +#ifndef __gen_nsIPrefBranch_h__ +#define __gen_nsIPrefBranch_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIPrefBranch */ +#define NS_IPREFBRANCH_IID_STR "56c35506-f14b-11d3-99d3-ddbfac2ccf65" + +#define NS_IPREFBRANCH_IID \ + {0x56c35506, 0xf14b, 0x11d3, \ + { 0x99, 0xd3, 0xdd, 0xbf, 0xac, 0x2c, 0xcf, 0x65 }} + +/** + * The nsIPrefBranch interface is used to manipulate the preferences data. This + * object may be obtained from the preferences service (nsIPrefService) and + * used to get and set default and/or user preferences across the application. + * + * This object is created with a "root" value which describes the base point in + * the preferences "tree" from which this "branch" stems. Preferences are + * accessed off of this root by using just the final portion of the preference. + * For example, if this object is created with the root "browser.startup.", + * the preferences "browser.startup.page", "browser.startup.homepage", + * and "browser.startup.homepage_override" can be accessed by simply passing + * "page", "homepage", or "homepage_override" to the various Get/Set methods. + * + * @see nsIPrefService + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIPrefBranch : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPREFBRANCH_IID) + + /** + * Values describing the basic preference types. + * + * @see getPrefType + */ + enum { PREF_INVALID = 0 }; + + enum { PREF_STRING = 32 }; + + enum { PREF_INT = 64 }; + + enum { PREF_BOOL = 128 }; + + /** + * Called to get the root on which this branch is based, such as + * "browser.startup." + */ + /* readonly attribute string root; */ + NS_IMETHOD GetRoot(char * *aRoot) = 0; + + /** + * Called to determine the type of a specific preference. + * + * @param aPrefName The preference to get the type of. + * + * @return long A value representing the type of the preference. This + * value will be PREF_STRING, PREF_INT, or PREF_BOOL. + */ + /* long getPrefType (in string aPrefName); */ + NS_IMETHOD GetPrefType(const char *aPrefName, PRInt32 *_retval) = 0; + + /** + * Called to get the state of an individual boolean preference. + * + * @param aPrefName The boolean preference to get the state of. + * + * @return boolean The value of the requested boolean preference. + * + * @see setBoolPref + */ + /* boolean getBoolPref (in string aPrefName); */ + NS_IMETHOD GetBoolPref(const char *aPrefName, PRBool *_retval) = 0; + + /** + * Called to set the state of an individual boolean preference. + * + * @param aPrefName The boolean preference to set the state of. + * @param aValue The boolean value to set the preference to. + * + * @return NS_OK The value was successfully set. + * @return Other The value was not set or is the wrong type. + * + * @see getBoolPref + */ + /* void setBoolPref (in string aPrefName, in long aValue); */ + NS_IMETHOD SetBoolPref(const char *aPrefName, PRInt32 aValue) = 0; + + /** + * Called to get the state of an individual string preference. + * + * @param aPrefName The string preference to retrieve. + * + * @return string The value of the requested string preference. + * + * @see setCharPref + */ + /* string getCharPref (in string aPrefName); */ + NS_IMETHOD GetCharPref(const char *aPrefName, char **_retval) = 0; + + /** + * Called to set the state of an individual string preference. + * + * @param aPrefName The string preference to set. + * @param aValue The string value to set the preference to. + * + * @return NS_OK The value was successfully set. + * @return Other The value was not set or is the wrong type. + * + * @see getCharPref + */ + /* void setCharPref (in string aPrefName, in string aValue); */ + NS_IMETHOD SetCharPref(const char *aPrefName, const char *aValue) = 0; + + /** + * Called to get the state of an individual integer preference. + * + * @param aPrefName The integer preference to get the value of. + * + * @return long The value of the requested integer preference. + * + * @see setIntPref + */ + /* long getIntPref (in string aPrefName); */ + NS_IMETHOD GetIntPref(const char *aPrefName, PRInt32 *_retval) = 0; + + /** + * Called to set the state of an individual integer preference. + * + * @param aPrefName The integer preference to set the value of. + * @param aValue The integer value to set the preference to. + * + * @return NS_OK The value was successfully set. + * @return Other The value was not set or is the wrong type. + * + * @see getIntPref + */ + /* void setIntPref (in string aPrefName, in long aValue); */ + NS_IMETHOD SetIntPref(const char *aPrefName, PRInt32 aValue) = 0; + + /** + * Called to get the state of an individual complex preference. A complex + * preference is a preference which represents an XPCOM object that can not + * be easily represented using a standard boolean, integer or string value. + * + * @param aPrefName The complex preference to get the value of. + * @param aType The XPCOM interface that this complex preference + * represents. Interfaces currently supported are: + * - nsILocalFile + * - nsISupportsString (UniChar) + * - nsIPrefLocalizedString (Localized UniChar) + * - nsIFileSpec (deprecated - to be removed eventually) + * @param aValue The XPCOM object into which to the complex preference + * value should be retrieved. + * + * @return NS_OK The value was successfully retrieved. + * @return Other The value does not exist or is the wrong type. + * + * @see setComplexValue + */ + /* void getComplexValue (in string aPrefName, in nsIIDRef aType, [iid_is (aType), retval] out nsQIResult aValue); */ + NS_IMETHOD GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue) = 0; + + /** + * Called to set the state of an individual complex preference. A complex + * preference is a preference which represents an XPCOM object that can not + * be easily represented using a standard boolean, integer or string value. + * + * @param aPrefName The complex preference to set the value of. + * @param aType The XPCOM interface that this complex preference + * represents. Interfaces currently supported are: + * - nsILocalFile + * - nsISupportsString (UniChar) + * - nsIPrefLocalizedString (Localized UniChar) + * - nsIFileSpec (deprecated - to be removed eventually) + * @param aValue The XPCOM object from which to set the complex preference + * value. + * + * @return NS_OK The value was successfully set. + * @return Other The value was not set or is the wrong type. + * + * @see getComplexValue + */ + /* void setComplexValue (in string aPrefName, in nsIIDRef aType, in nsISupports aValue); */ + NS_IMETHOD SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue) = 0; + + /** + * Called to clear a user set value from a specific preference. This will, in + * effect, reset the value to the default value. If no default value exists + * the preference will cease to exist. + * + * @param aPrefName The preference to be cleared. + * + * @note + * This method does nothing if this object is a default branch. + * + * @return NS_OK The user preference was successfully cleared. + * @return Other The preference does not exist or have a user set value. + */ + /* void clearUserPref (in string aPrefName); */ + NS_IMETHOD ClearUserPref(const char *aPrefName) = 0; + + /** + * Called to lock a specific preference. Locking a preference will cause the + * preference service to always return the default value regardless of + * whether there is a user set value or not. + * + * @param aPrefName The preference to be locked. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the default branch. + * + * @return NS_OK The preference was successfully locked. + * @return Other The preference does not exist or an error occurred. + * + * @see unlockPref + */ + /* void lockPref (in string aPrefName); */ + NS_IMETHOD LockPref(const char *aPrefName) = 0; + + /** + * Called to check if a specific preference has a user value associated to + * it. + * + * @param aPrefName The preference to be tested. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the user branch. + * + * @return boolean true The preference has a user set value. + * false The preference only has a default value. + */ + /* boolean prefHasUserValue (in string aPrefName); */ + NS_IMETHOD PrefHasUserValue(const char *aPrefName, PRBool *_retval) = 0; + + /** + * Called to check if a specific preference is locked. If a preference is + * locked calling its Get method will always return the default value. + * + * @param aPrefName The preference to be tested. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the default branch. + * + * @return boolean true The preference is locked. + * false The preference is not locked. + * + * @see lockPref + * @see unlockPref + */ + /* boolean prefIsLocked (in string aPrefName); */ + NS_IMETHOD PrefIsLocked(const char *aPrefName, PRBool *_retval) = 0; + + /** + * Called to unlock a specific preference. Unlocking a previously locked + * preference allows the preference service to once again return the user set + * value of the preference. + * + * @param aPrefName The preference to be unlocked. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the default branch. + * + * @return NS_OK The preference was successfully unlocked. + * @return Other The preference does not exist or an error occurred. + * + * @see lockPref + */ + /* void unlockPref (in string aPrefName); */ + NS_IMETHOD UnlockPref(const char *aPrefName) = 0; + + /** + * Called to remove all of the preferences referenced by this branch. + * + * @param aStartingAt The point on the branch at which to start the deleting + * preferences. Pass in "" to remove all preferences + * referenced by this branch. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on both. + * + * @return NS_OK The preference(s) were successfully removed. + * @return Other The preference(s) do not exist or an error occurred. + */ + /* void deleteBranch (in string aStartingAt); */ + NS_IMETHOD DeleteBranch(const char *aStartingAt) = 0; + + /** + * Returns an array of strings representing the child preferences of the + * root of this branch. + * + * @param aStartingAt The point on the branch at which to start enumerating + * the child preferences. Pass in "" to enumerate all + * preferences referenced by this branch. + * @param aCount Receives the number of elements in the array. + * @param aChildArray Receives the array of child preferences. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on both. + * + * @return NS_OK The preference list was successfully retrieved. + * @return Other The preference(s) do not exist or an error occurred. + */ + /* void getChildList (in string aStartingAt, out unsigned long aCount, [array, size_is (aCount), retval] out string aChildArray); */ + NS_IMETHOD GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray) = 0; + + /** + * Called to reset all of the preferences referenced by this branch to their + * default values. + * + * @param aStartingAt The point on the branch at which to start the resetting + * preferences to their default values. Pass in "" to + * reset all preferences referenced by this branch. + * + * @note + * This method can be called on either a default or user branch but, in + * effect, always operates on the user branch. + * + * @return NS_OK The preference(s) were successfully reset. + * @return Other The preference(s) do not exist or an error occurred. + */ + /* void resetBranch (in string aStartingAt); */ + NS_IMETHOD ResetBranch(const char *aStartingAt) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPREFBRANCH \ + NS_IMETHOD GetRoot(char * *aRoot); \ + NS_IMETHOD GetPrefType(const char *aPrefName, PRInt32 *_retval); \ + NS_IMETHOD GetBoolPref(const char *aPrefName, PRBool *_retval); \ + NS_IMETHOD SetBoolPref(const char *aPrefName, PRInt32 aValue); \ + NS_IMETHOD GetCharPref(const char *aPrefName, char **_retval); \ + NS_IMETHOD SetCharPref(const char *aPrefName, const char *aValue); \ + NS_IMETHOD GetIntPref(const char *aPrefName, PRInt32 *_retval); \ + NS_IMETHOD SetIntPref(const char *aPrefName, PRInt32 aValue); \ + NS_IMETHOD GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue); \ + NS_IMETHOD SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue); \ + NS_IMETHOD ClearUserPref(const char *aPrefName); \ + NS_IMETHOD LockPref(const char *aPrefName); \ + NS_IMETHOD PrefHasUserValue(const char *aPrefName, PRBool *_retval); \ + NS_IMETHOD PrefIsLocked(const char *aPrefName, PRBool *_retval); \ + NS_IMETHOD UnlockPref(const char *aPrefName); \ + NS_IMETHOD DeleteBranch(const char *aStartingAt); \ + NS_IMETHOD GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray); \ + NS_IMETHOD ResetBranch(const char *aStartingAt); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPREFBRANCH(_to) \ + NS_IMETHOD GetRoot(char * *aRoot) { return _to GetRoot(aRoot); } \ + NS_IMETHOD GetPrefType(const char *aPrefName, PRInt32 *_retval) { return _to GetPrefType(aPrefName, _retval); } \ + NS_IMETHOD GetBoolPref(const char *aPrefName, PRBool *_retval) { return _to GetBoolPref(aPrefName, _retval); } \ + NS_IMETHOD SetBoolPref(const char *aPrefName, PRInt32 aValue) { return _to SetBoolPref(aPrefName, aValue); } \ + NS_IMETHOD GetCharPref(const char *aPrefName, char **_retval) { return _to GetCharPref(aPrefName, _retval); } \ + NS_IMETHOD SetCharPref(const char *aPrefName, const char *aValue) { return _to SetCharPref(aPrefName, aValue); } \ + NS_IMETHOD GetIntPref(const char *aPrefName, PRInt32 *_retval) { return _to GetIntPref(aPrefName, _retval); } \ + NS_IMETHOD SetIntPref(const char *aPrefName, PRInt32 aValue) { return _to SetIntPref(aPrefName, aValue); } \ + NS_IMETHOD GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue) { return _to GetComplexValue(aPrefName, aType, aValue); } \ + NS_IMETHOD SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue) { return _to SetComplexValue(aPrefName, aType, aValue); } \ + NS_IMETHOD ClearUserPref(const char *aPrefName) { return _to ClearUserPref(aPrefName); } \ + NS_IMETHOD LockPref(const char *aPrefName) { return _to LockPref(aPrefName); } \ + NS_IMETHOD PrefHasUserValue(const char *aPrefName, PRBool *_retval) { return _to PrefHasUserValue(aPrefName, _retval); } \ + NS_IMETHOD PrefIsLocked(const char *aPrefName, PRBool *_retval) { return _to PrefIsLocked(aPrefName, _retval); } \ + NS_IMETHOD UnlockPref(const char *aPrefName) { return _to UnlockPref(aPrefName); } \ + NS_IMETHOD DeleteBranch(const char *aStartingAt) { return _to DeleteBranch(aStartingAt); } \ + NS_IMETHOD GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray) { return _to GetChildList(aStartingAt, aCount, aChildArray); } \ + NS_IMETHOD ResetBranch(const char *aStartingAt) { return _to ResetBranch(aStartingAt); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPREFBRANCH(_to) \ + NS_IMETHOD GetRoot(char * *aRoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRoot(aRoot); } \ + NS_IMETHOD GetPrefType(const char *aPrefName, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrefType(aPrefName, _retval); } \ + NS_IMETHOD GetBoolPref(const char *aPrefName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBoolPref(aPrefName, _retval); } \ + NS_IMETHOD SetBoolPref(const char *aPrefName, PRInt32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBoolPref(aPrefName, aValue); } \ + NS_IMETHOD GetCharPref(const char *aPrefName, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharPref(aPrefName, _retval); } \ + NS_IMETHOD SetCharPref(const char *aPrefName, const char *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCharPref(aPrefName, aValue); } \ + NS_IMETHOD GetIntPref(const char *aPrefName, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIntPref(aPrefName, _retval); } \ + NS_IMETHOD SetIntPref(const char *aPrefName, PRInt32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIntPref(aPrefName, aValue); } \ + NS_IMETHOD GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetComplexValue(aPrefName, aType, aValue); } \ + NS_IMETHOD SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetComplexValue(aPrefName, aType, aValue); } \ + NS_IMETHOD ClearUserPref(const char *aPrefName) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearUserPref(aPrefName); } \ + NS_IMETHOD LockPref(const char *aPrefName) { return !_to ? NS_ERROR_NULL_POINTER : _to->LockPref(aPrefName); } \ + NS_IMETHOD PrefHasUserValue(const char *aPrefName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrefHasUserValue(aPrefName, _retval); } \ + NS_IMETHOD PrefIsLocked(const char *aPrefName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrefIsLocked(aPrefName, _retval); } \ + NS_IMETHOD UnlockPref(const char *aPrefName) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnlockPref(aPrefName); } \ + NS_IMETHOD DeleteBranch(const char *aStartingAt) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteBranch(aStartingAt); } \ + NS_IMETHOD GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChildList(aStartingAt, aCount, aChildArray); } \ + NS_IMETHOD ResetBranch(const char *aStartingAt) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetBranch(aStartingAt); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPrefBranch : public nsIPrefBranch +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPREFBRANCH + + nsPrefBranch(); + +private: + ~nsPrefBranch(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPrefBranch, nsIPrefBranch) + +nsPrefBranch::nsPrefBranch() +{ + /* member initializers and constructor code */ +} + +nsPrefBranch::~nsPrefBranch() +{ + /* destructor code */ +} + +/* readonly attribute string root; */ +NS_IMETHODIMP nsPrefBranch::GetRoot(char * *aRoot) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* long getPrefType (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::GetPrefType(const char *aPrefName, PRInt32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean getBoolPref (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::GetBoolPref(const char *aPrefName, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setBoolPref (in string aPrefName, in long aValue); */ +NS_IMETHODIMP nsPrefBranch::SetBoolPref(const char *aPrefName, PRInt32 aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string getCharPref (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::GetCharPref(const char *aPrefName, char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setCharPref (in string aPrefName, in string aValue); */ +NS_IMETHODIMP nsPrefBranch::SetCharPref(const char *aPrefName, const char *aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* long getIntPref (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::GetIntPref(const char *aPrefName, PRInt32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setIntPref (in string aPrefName, in long aValue); */ +NS_IMETHODIMP nsPrefBranch::SetIntPref(const char *aPrefName, PRInt32 aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getComplexValue (in string aPrefName, in nsIIDRef aType, [iid_is (aType), retval] out nsQIResult aValue); */ +NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID & aType, void * *aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setComplexValue (in string aPrefName, in nsIIDRef aType, in nsISupports aValue); */ +NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void clearUserPref (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::ClearUserPref(const char *aPrefName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void lockPref (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::LockPref(const char *aPrefName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean prefHasUserValue (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::PrefHasUserValue(const char *aPrefName, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean prefIsLocked (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::PrefIsLocked(const char *aPrefName, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unlockPref (in string aPrefName); */ +NS_IMETHODIMP nsPrefBranch::UnlockPref(const char *aPrefName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteBranch (in string aStartingAt); */ +NS_IMETHODIMP nsPrefBranch::DeleteBranch(const char *aStartingAt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getChildList (in string aStartingAt, out unsigned long aCount, [array, size_is (aCount), retval] out string aChildArray); */ +NS_IMETHODIMP nsPrefBranch::GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void resetBranch (in string aStartingAt); */ +NS_IMETHODIMP nsPrefBranch::ResetBranch(const char *aStartingAt) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_PREFBRANCH_CONTRACTID "@mozilla.org/preferencesbranch;1" +#define NS_PREFBRANCH_CLASSNAME "Preferences Branch" + +#endif /* __gen_nsIPrefBranch_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefBranch2.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefBranch2.h new file mode 100644 index 00000000..6109f66f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefBranch2.h @@ -0,0 +1,160 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/modules/libpref/public/nsIPrefBranch2.idl + */ + +#ifndef __gen_nsIPrefBranch2_h__ +#define __gen_nsIPrefBranch2_h__ + + +#ifndef __gen_nsIPrefBranch_h__ +#include "nsIPrefBranch.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIObserver; /* forward declaration */ + + +/* starting interface: nsIPrefBranch2 */ +#define NS_IPREFBRANCH2_IID_STR "74567534-eb94-4b1c-8f45-389643bfc555" + +#define NS_IPREFBRANCH2_IID \ + {0x74567534, 0xeb94, 0x4b1c, \ + { 0x8f, 0x45, 0x38, 0x96, 0x43, 0xbf, 0xc5, 0x55 }} + +/** + * nsIPrefBranch2 allows clients to observe changes to pref values. + * + * @status FROZEN + * @see nsIPrefBranch + */ +class NS_NO_VTABLE nsIPrefBranch2 : public nsIPrefBranch { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPREFBRANCH2_IID) + + /** + * Add a preference change observer. On preference changes, the following + * arguments will be passed to the nsIObserver.observe() method: + * aSubject - The nsIPrefBranch object (this) + * aTopic - The string defined by NS_PREFBRANCH_PREFCHANGE_TOPIC_ID + * aData - The preference which has changed + * + * @param aDomain The preference on which to listen for changes. This can + * be the name of an entire branch to observe. + * e.g. Holding the "root" prefbranch and calling + * addObserver("foo.bar.", ...) will observe changes to + * foo.bar.baz and foo.bar.bzip + * @param aObserver The object to be notified if the preference changes. + * @param aHoldWeak true Hold a weak reference to |aObserver|. The object + * must implement the nsISupportsWeakReference + * interface or this will fail. + * false Hold a strong reference to |aObserver|. + * + * @note + * Registering as a preference observer can open an object to potential + * cyclical references which will cause memory leaks. These cycles generally + * occur because an object both registers itself as an observer (causing the + * branch to hold a reference to the observer) and holds a reference to the + * branch object for the purpose of getting/setting preference values. There + * are 3 approaches which have been implemented in an attempt to avoid these + * situations. + * 1) The nsPrefBranch object supports nsISupportsWeakReference. Any consumer + * may hold a weak reference to it instead of a strong one. + * 2) The nsPrefBranch object listens for xpcom-shutdown and frees all of the + * objects currently in its observer list. This insures that long lived + * objects (services for example) will be freed correctly. + * 3) The observer can request to be held as a weak reference when it is + * registered. This insures that shorter lived objects (say one tied to an + * open window) will not fall into the cyclical reference trap. + * + * @see nsIObserver + * @see removeObserver + */ + /* void addObserver (in string aDomain, in nsIObserver aObserver, in boolean aHoldWeak); */ + NS_IMETHOD AddObserver(const char *aDomain, nsIObserver *aObserver, PRBool aHoldWeak) = 0; + + /** + * Remove a preference change observer. + * + * @param aDomain The preference which is being observed for changes. + * @param aObserver An observer previously registered with addObserver(). + * + * @see nsIObserver + * @see addObserver + */ + /* void removeObserver (in string aDomain, in nsIObserver aObserver); */ + NS_IMETHOD RemoveObserver(const char *aDomain, nsIObserver *aObserver) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPREFBRANCH2 \ + NS_IMETHOD AddObserver(const char *aDomain, nsIObserver *aObserver, PRBool aHoldWeak); \ + NS_IMETHOD RemoveObserver(const char *aDomain, nsIObserver *aObserver); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPREFBRANCH2(_to) \ + NS_IMETHOD AddObserver(const char *aDomain, nsIObserver *aObserver, PRBool aHoldWeak) { return _to AddObserver(aDomain, aObserver, aHoldWeak); } \ + NS_IMETHOD RemoveObserver(const char *aDomain, nsIObserver *aObserver) { return _to RemoveObserver(aDomain, aObserver); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPREFBRANCH2(_to) \ + NS_IMETHOD AddObserver(const char *aDomain, nsIObserver *aObserver, PRBool aHoldWeak) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aDomain, aObserver, aHoldWeak); } \ + NS_IMETHOD RemoveObserver(const char *aDomain, nsIObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aDomain, aObserver); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPrefBranch2 : public nsIPrefBranch2 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPREFBRANCH2 + + nsPrefBranch2(); + +private: + ~nsPrefBranch2(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPrefBranch2, nsIPrefBranch2) + +nsPrefBranch2::nsPrefBranch2() +{ + /* member initializers and constructor code */ +} + +nsPrefBranch2::~nsPrefBranch2() +{ + /* destructor code */ +} + +/* void addObserver (in string aDomain, in nsIObserver aObserver, in boolean aHoldWeak); */ +NS_IMETHODIMP nsPrefBranch2::AddObserver(const char *aDomain, nsIObserver *aObserver, PRBool aHoldWeak) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeObserver (in string aDomain, in nsIObserver aObserver); */ +NS_IMETHODIMP nsPrefBranch2::RemoveObserver(const char *aDomain, nsIObserver *aObserver) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +/** + * Notification sent when a preference changes. + */ +#define NS_PREFBRANCH_PREFCHANGE_TOPIC_ID "nsPref:changed" + +#endif /* __gen_nsIPrefBranch2_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefLocalizedString.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefLocalizedString.h new file mode 100644 index 00000000..cdf03d21 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefLocalizedString.h @@ -0,0 +1,167 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/modules/libpref/public/nsIPrefLocalizedString.idl + */ + +#ifndef __gen_nsIPrefLocalizedString_h__ +#define __gen_nsIPrefLocalizedString_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIPrefLocalizedString */ +#define NS_IPREFLOCALIZEDSTRING_IID_STR "ae419e24-1dd1-11b2-b39a-d3e5e7073802" + +#define NS_IPREFLOCALIZEDSTRING_IID \ + {0xae419e24, 0x1dd1, 0x11b2, \ + { 0xb3, 0x9a, 0xd3, 0xe5, 0xe7, 0x07, 0x38, 0x02 }} + +/** + * The nsIPrefLocalizedString interface is simply a wrapper interface for + * nsISupportsString so the preferences service can have a unique identifier + * to distinguish between requests for normal wide strings (nsISupportsString) + * and "localized" wide strings, which get their default values from properites + * files. + * + * @see nsIPrefBranch + * @see nsISupportsString + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIPrefLocalizedString : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPREFLOCALIZEDSTRING_IID) + + /** + * Provides access to string data stored in this property. + * + * @return NS_OK The operation succeeded. + * @return Other An error occured. + */ + /* attribute wstring data; */ + NS_IMETHOD GetData(PRUnichar * *aData) = 0; + NS_IMETHOD SetData(const PRUnichar * aData) = 0; + + /** + * Used to retrieve the contents of this object into a wide string. + * + * @return wstring The string containing the data stored within this object. + */ + /* wstring toString (); */ + NS_IMETHOD ToString(PRUnichar **_retval) = 0; + + /** + * Used to set the contents of this object. + * + * @param length The length of the string. This value should not include + * space for the null terminator, nor should it account for the + * size of a character. It should only be the number of + * characters for which there is space in the string. + * @param data The string data to be stored. + * + * @note + * This makes a copy of the string argument passed in. + * + * @return NS_OK The data was successfully stored. + */ + /* void setDataWithLength (in unsigned long length, [size_is (length)] in wstring data); */ + NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPREFLOCALIZEDSTRING \ + NS_IMETHOD GetData(PRUnichar * *aData); \ + NS_IMETHOD SetData(const PRUnichar * aData); \ + NS_IMETHOD ToString(PRUnichar **_retval); \ + NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPREFLOCALIZEDSTRING(_to) \ + NS_IMETHOD GetData(PRUnichar * *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(const PRUnichar * aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(PRUnichar **_retval) { return _to ToString(_retval); } \ + NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) { return _to SetDataWithLength(length, data); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPREFLOCALIZEDSTRING(_to) \ + NS_IMETHOD GetData(PRUnichar * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(const PRUnichar * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } \ + NS_IMETHOD SetDataWithLength(PRUint32 length, const PRUnichar *data) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDataWithLength(length, data); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPrefLocalizedString : public nsIPrefLocalizedString +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPREFLOCALIZEDSTRING + + nsPrefLocalizedString(); + +private: + ~nsPrefLocalizedString(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPrefLocalizedString, nsIPrefLocalizedString) + +nsPrefLocalizedString::nsPrefLocalizedString() +{ + /* member initializers and constructor code */ +} + +nsPrefLocalizedString::~nsPrefLocalizedString() +{ + /* destructor code */ +} + +/* attribute wstring data; */ +NS_IMETHODIMP nsPrefLocalizedString::GetData(PRUnichar * *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsPrefLocalizedString::SetData(const PRUnichar * aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* wstring toString (); */ +NS_IMETHODIMP nsPrefLocalizedString::ToString(PRUnichar **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setDataWithLength (in unsigned long length, [size_is (length)] in wstring data); */ +NS_IMETHODIMP nsPrefLocalizedString::SetDataWithLength(PRUint32 length, const PRUnichar *data) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_PREFLOCALIZEDSTRING_CID \ + { /* {064d9cee-1dd2-11b2-83e3-d25ab0193c26} */ \ + 0x064d9cee, \ + 0x1dd2, \ + 0x11b2, \ + { 0x83, 0xe3, 0xd2, 0x5a, 0xb0, 0x19, 0x3c, 0x26 } \ + } +#define NS_PREFLOCALIZEDSTRING_CONTRACTID "@mozilla.org/pref-localizedstring;1" +#define NS_PREFLOCALIZEDSTRING_CLASSNAME "Pref LocalizedString" + +#endif /* __gen_nsIPrefLocalizedString_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefService.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefService.h new file mode 100644 index 00000000..a69795a4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIPrefService.h @@ -0,0 +1,267 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/modules/libpref/public/nsIPrefService.idl + */ + +#ifndef __gen_nsIPrefService_h__ +#define __gen_nsIPrefService_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsIPrefBranch_h__ +#include "nsIPrefBranch.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIFile; /* forward declaration */ + + +/* starting interface: nsIPrefService */ +#define NS_IPREFSERVICE_IID_STR "decb9cc7-c08f-4ea5-be91-a8fc637ce2d2" + +#define NS_IPREFSERVICE_IID \ + {0xdecb9cc7, 0xc08f, 0x4ea5, \ + { 0xbe, 0x91, 0xa8, 0xfc, 0x63, 0x7c, 0xe2, 0xd2 }} + +/** + * The nsIPrefService interface is the main entry point into the back end + * preferences management library. The preference service is directly + * responsible for the management of the preferences files and also facilitates + * access to the preference branch object which allows the direct manipulation + * of the preferences themselves. + * + * @see nsIPrefBranch + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIPrefService : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPREFSERVICE_IID) + + /** + * Called to read in the preferences specified in a user preference file. + * + * @param aFile The file to be read. + * + * @note + * If nsnull is passed in for the aFile parameter the default preferences + * file(s) [prefs.js, user.js] will be read and processed. + * + * @return NS_OK File was read and processed. + * @return Other File failed to read or contained invalid data. + * + * @see savePrefFile + * @see nsIFile + */ + /* void readUserPrefs (in nsIFile aFile); */ + NS_IMETHOD ReadUserPrefs(nsIFile *aFile) = 0; + + /** + * Called to completely flush and re-initialize the preferences system. + * + * @return NS_OK The preference service was re-initialized correctly. + * @return Other The preference service failed to restart correctly. + */ + /* void resetPrefs (); */ + NS_IMETHOD ResetPrefs(void) = 0; + + /** + * Called to reset all preferences with user set values back to the + * application default values. + * + * @return NS_OK Always. + */ + /* void resetUserPrefs (); */ + NS_IMETHOD ResetUserPrefs(void) = 0; + + /** + * Called to write current preferences state to a file. + * + * @param aFile The file to be written. + * + * @note + * If nsnull is passed in for the aFile parameter the preference data is + * written out to the current preferences file (usually prefs.js.) + * + * @return NS_OK File was written. + * @return Other File failed to write. + * + * @see readUserPrefs + * @see nsIFile + */ + /* void savePrefFile (in nsIFile aFile); */ + NS_IMETHOD SavePrefFile(nsIFile *aFile) = 0; + + /** + * Call to get a Preferences "Branch" which accesses user preference data. + * Using a Set method on this object will always create or set a user + * preference value. When using a Get method a user set value will be + * returned if one exists, otherwise a default value will be returned. + * + * @param aPrefRoot The preference "root" on which to base this "branch". + * For example, if the root "browser.startup." is used, the + * branch will be able to easily access the preferences + * "browser.startup.page", "browser.startup.homepage", or + * "browser.startup.homepage_override" by simply requesting + * "page", "homepage", or "homepage_override". nsnull or "" + * may be used to access to the entire preference "tree". + * + * @return nsIPrefBranch The object representing the requested branch. + * + * @see getDefaultBranch + */ + /* nsIPrefBranch getBranch (in string aPrefRoot); */ + NS_IMETHOD GetBranch(const char *aPrefRoot, nsIPrefBranch **_retval) = 0; + + /** + * Call to get a Preferences "Branch" which accesses only the default + * preference data. Using a Set method on this object will always create or + * set a default preference value. When using a Get method a default value + * will always be returned. + * + * @param aPrefRoot The preference "root" on which to base this "branch". + * For example, if the root "browser.startup." is used, the + * branch will be able to easily access the preferences + * "browser.startup.page", "browser.startup.homepage", or + * "browser.startup.homepage_override" by simply requesting + * "page", "homepage", or "homepage_override". nsnull or "" + * may be used to access to the entire preference "tree". + * + * @note + * Few consumers will want to create default branch objects. Many of the + * branch methods do nothing on a default branch because the operations only + * make sense when applied to user set preferences. + * + * @return nsIPrefBranch The object representing the requested default branch. + * + * @see getBranch + */ + /* nsIPrefBranch getDefaultBranch (in string aPrefRoot); */ + NS_IMETHOD GetDefaultBranch(const char *aPrefRoot, nsIPrefBranch **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPREFSERVICE \ + NS_IMETHOD ReadUserPrefs(nsIFile *aFile); \ + NS_IMETHOD ResetPrefs(void); \ + NS_IMETHOD ResetUserPrefs(void); \ + NS_IMETHOD SavePrefFile(nsIFile *aFile); \ + NS_IMETHOD GetBranch(const char *aPrefRoot, nsIPrefBranch **_retval); \ + NS_IMETHOD GetDefaultBranch(const char *aPrefRoot, nsIPrefBranch **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPREFSERVICE(_to) \ + NS_IMETHOD ReadUserPrefs(nsIFile *aFile) { return _to ReadUserPrefs(aFile); } \ + NS_IMETHOD ResetPrefs(void) { return _to ResetPrefs(); } \ + NS_IMETHOD ResetUserPrefs(void) { return _to ResetUserPrefs(); } \ + NS_IMETHOD SavePrefFile(nsIFile *aFile) { return _to SavePrefFile(aFile); } \ + NS_IMETHOD GetBranch(const char *aPrefRoot, nsIPrefBranch **_retval) { return _to GetBranch(aPrefRoot, _retval); } \ + NS_IMETHOD GetDefaultBranch(const char *aPrefRoot, nsIPrefBranch **_retval) { return _to GetDefaultBranch(aPrefRoot, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPREFSERVICE(_to) \ + NS_IMETHOD ReadUserPrefs(nsIFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadUserPrefs(aFile); } \ + NS_IMETHOD ResetPrefs(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetPrefs(); } \ + NS_IMETHOD ResetUserPrefs(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetUserPrefs(); } \ + NS_IMETHOD SavePrefFile(nsIFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SavePrefFile(aFile); } \ + NS_IMETHOD GetBranch(const char *aPrefRoot, nsIPrefBranch **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBranch(aPrefRoot, _retval); } \ + NS_IMETHOD GetDefaultBranch(const char *aPrefRoot, nsIPrefBranch **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultBranch(aPrefRoot, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPrefService : public nsIPrefService +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPREFSERVICE + + nsPrefService(); + +private: + ~nsPrefService(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPrefService, nsIPrefService) + +nsPrefService::nsPrefService() +{ + /* member initializers and constructor code */ +} + +nsPrefService::~nsPrefService() +{ + /* destructor code */ +} + +/* void readUserPrefs (in nsIFile aFile); */ +NS_IMETHODIMP nsPrefService::ReadUserPrefs(nsIFile *aFile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void resetPrefs (); */ +NS_IMETHODIMP nsPrefService::ResetPrefs() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void resetUserPrefs (); */ +NS_IMETHODIMP nsPrefService::ResetUserPrefs() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void savePrefFile (in nsIFile aFile); */ +NS_IMETHODIMP nsPrefService::SavePrefFile(nsIFile *aFile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIPrefBranch getBranch (in string aPrefRoot); */ +NS_IMETHODIMP nsPrefService::GetBranch(const char *aPrefRoot, nsIPrefBranch **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIPrefBranch getDefaultBranch (in string aPrefRoot); */ +NS_IMETHODIMP nsPrefService::GetDefaultBranch(const char *aPrefRoot, nsIPrefBranch **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_PREFSERVICE_CID \ + { /* {1cd91b88-1dd2-11b2-92e1-ed22ed298000} */ \ + 0x1cd91b88, \ + 0x1dd2, \ + 0x11b2, \ + { 0x92, 0xe1, 0xed, 0x22, 0xed, 0x29, 0x80, 0x00 } \ + } +#define NS_PREFSERVICE_CONTRACTID "@mozilla.org/preferences-service;1" +#define NS_PREFSERVICE_CLASSNAME "Preferences Server" +/** + * Notification sent before reading the default user preferences files. + */ +#define NS_PREFSERVICE_READ_TOPIC_ID "prefservice:before-read-userprefs" +/** + * Notification sent when resetPrefs has been called, but before the actual + * reset process occurs. + */ +#define NS_PREFSERVICE_RESET_TOPIC_ID "prefservice:before-reset" + +#endif /* __gen_nsIPrefService_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIProfile.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIProfile.h new file mode 100644 index 00000000..e350b2a2 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIProfile.h @@ -0,0 +1,219 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/profile/public/nsIProfile.idl + */ + +#ifndef __gen_nsIProfile_h__ +#define __gen_nsIProfile_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsIFile_h__ +#include "nsIFile.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +#define NS_PROFILE_CID \ + { /* {02b0625b-e7f3-11d2-9f5a-006008a6efe9} */ \ + 0x02b0625b, \ + 0xe7f3, \ + 0x11d2, \ + { 0x9f, 0x5a, 0x00, 0x60, 0x08, 0xa6, 0xef, 0xe9 } \ + } +#define NS_PROFILE_CONTRACTID \ + "@mozilla.org/profile/manager;1" +#define NS_PROFILE_STARTUP_CATEGORY \ + "profile-startup-category" + +/* starting interface: nsIProfile */ +#define NS_IPROFILE_IID_STR "02b0625a-e7f3-11d2-9f5a-006008a6efe9" + +#define NS_IPROFILE_IID \ + {0x02b0625a, 0xe7f3, 0x11d2, \ + { 0x9f, 0x5a, 0x00, 0x60, 0x08, 0xa6, 0xef, 0xe9 }} + +/** + * nsIProfile + * + * @status FROZEN + * @version 1.0 + */ +class NS_NO_VTABLE nsIProfile : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROFILE_IID) + + /* readonly attribute long profileCount; */ + NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) = 0; + + /* void getProfileList (out unsigned long length, [array, size_is (length), retval] out wstring profileNames); */ + NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) = 0; + + /* boolean profileExists (in wstring profileName); */ + NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) = 0; + + /* attribute wstring currentProfile; */ + NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) = 0; + NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile) = 0; + + enum { SHUTDOWN_PERSIST = 1U }; + + enum { SHUTDOWN_CLEANSE = 2U }; + + /* void shutDownCurrentProfile (in unsigned long shutDownType); */ + NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) = 0; + + /* void createNewProfile (in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir); */ + NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir) = 0; + + /* void renameProfile (in wstring oldName, in wstring newName); */ + NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) = 0; + + /* void deleteProfile (in wstring name, in boolean canDeleteFiles); */ + NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) = 0; + + /* void cloneProfile (in wstring profileName); */ + NS_IMETHOD CloneProfile(const PRUnichar *profileName) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROFILE \ + NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount); \ + NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames); \ + NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval); \ + NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile); \ + NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile); \ + NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType); \ + NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir); \ + NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName); \ + NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles); \ + NS_IMETHOD CloneProfile(const PRUnichar *profileName); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROFILE(_to) \ + NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) { return _to GetProfileCount(aProfileCount); } \ + NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) { return _to GetProfileList(length, profileNames); } \ + NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) { return _to ProfileExists(profileName, _retval); } \ + NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) { return _to GetCurrentProfile(aCurrentProfile); } \ + NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile) { return _to SetCurrentProfile(aCurrentProfile); } \ + NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) { return _to ShutDownCurrentProfile(shutDownType); } \ + NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir) { return _to CreateNewProfile(profileName, nativeProfileDir, langcode, useExistingDir); } \ + NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) { return _to RenameProfile(oldName, newName); } \ + NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) { return _to DeleteProfile(name, canDeleteFiles); } \ + NS_IMETHOD CloneProfile(const PRUnichar *profileName) { return _to CloneProfile(profileName); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROFILE(_to) \ + NS_IMETHOD GetProfileCount(PRInt32 *aProfileCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileCount(aProfileCount); } \ + NS_IMETHOD GetProfileList(PRUint32 *length, PRUnichar ***profileNames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileList(length, profileNames); } \ + NS_IMETHOD ProfileExists(const PRUnichar *profileName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ProfileExists(profileName, _retval); } \ + NS_IMETHOD GetCurrentProfile(PRUnichar * *aCurrentProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentProfile(aCurrentProfile); } \ + NS_IMETHOD SetCurrentProfile(const PRUnichar * aCurrentProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentProfile(aCurrentProfile); } \ + NS_IMETHOD ShutDownCurrentProfile(PRUint32 shutDownType) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShutDownCurrentProfile(shutDownType); } \ + NS_IMETHOD CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateNewProfile(profileName, nativeProfileDir, langcode, useExistingDir); } \ + NS_IMETHOD RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) { return !_to ? NS_ERROR_NULL_POINTER : _to->RenameProfile(oldName, newName); } \ + NS_IMETHOD DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteProfile(name, canDeleteFiles); } \ + NS_IMETHOD CloneProfile(const PRUnichar *profileName) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloneProfile(profileName); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsProfile : public nsIProfile +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROFILE + + nsProfile(); + +private: + ~nsProfile(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsProfile, nsIProfile) + +nsProfile::nsProfile() +{ + /* member initializers and constructor code */ +} + +nsProfile::~nsProfile() +{ + /* destructor code */ +} + +/* readonly attribute long profileCount; */ +NS_IMETHODIMP nsProfile::GetProfileCount(PRInt32 *aProfileCount) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getProfileList (out unsigned long length, [array, size_is (length), retval] out wstring profileNames); */ +NS_IMETHODIMP nsProfile::GetProfileList(PRUint32 *length, PRUnichar ***profileNames) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean profileExists (in wstring profileName); */ +NS_IMETHODIMP nsProfile::ProfileExists(const PRUnichar *profileName, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute wstring currentProfile; */ +NS_IMETHODIMP nsProfile::GetCurrentProfile(PRUnichar * *aCurrentProfile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsProfile::SetCurrentProfile(const PRUnichar * aCurrentProfile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void shutDownCurrentProfile (in unsigned long shutDownType); */ +NS_IMETHODIMP nsProfile::ShutDownCurrentProfile(PRUint32 shutDownType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void createNewProfile (in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir); */ +NS_IMETHODIMP nsProfile::CreateNewProfile(const PRUnichar *profileName, const PRUnichar *nativeProfileDir, const PRUnichar *langcode, PRBool useExistingDir) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void renameProfile (in wstring oldName, in wstring newName); */ +NS_IMETHODIMP nsProfile::RenameProfile(const PRUnichar *oldName, const PRUnichar *newName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteProfile (in wstring name, in boolean canDeleteFiles); */ +NS_IMETHODIMP nsProfile::DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void cloneProfile (in wstring profileName); */ +NS_IMETHODIMP nsProfile::CloneProfile(const PRUnichar *profileName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIProfile_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIProfileChangeStatus.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIProfileChangeStatus.h new file mode 100644 index 00000000..4db996b1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIProfileChangeStatus.h @@ -0,0 +1,190 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/profile/public/nsIProfileChangeStatus.idl + */ + +#ifndef __gen_nsIProfileChangeStatus_h__ +#define __gen_nsIProfileChangeStatus_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + /** + * nsIObserver topics for profile changing. Profile changing happens in phases + * in the order given below. An observer may register separately for each phase + * of the process depending on its needs. The subject passed to the observer's + * Observe() method can be QI'd to an nsIProfileChangeStatus. + * + * "profile-approve-change" + * Called before a profile change is attempted. Typically, + * the application level observer will ask the user if + * he/she wants to stop all network activity, close all open + * windows, etc. If the user says NO, the observer should + * call the subject's vetoChange(). If any observer does + * this, the profile will not be changed. + * + * "profile-change-teardown" + * All async activity must be stopped in this phase. Typically, + * the application level observer will close all open windows. + * This is the last phase in which the subject's vetoChange() + * method may still be called. + * The next notification will be either + * profile-change-teardown-veto or profile-before-change. + * + * "profile-change-teardown-veto" + * This notification will only be sent, if the profile change + * was vetoed during the profile-change-teardown phase. + * This allows components to bring back required resources, + * that were tore down on profile-change-teardown. + * + * "profile-before-change" + * Called before the profile has changed. Use this notification + * to prepare for the profile going away. If a component is + * holding any state which needs to be flushed to a profile-relative + * location, it should be done here. + * + * "profile-do-change" + * Called after the profile has changed. Do the work to + * respond to having a new profile. Any change which + * affects others must be done in this phase. + * + * "profile-after-change" + * Called after the profile has changed. Use this notification + * to make changes that are dependent on what some other listener + * did during its profile-do-change. For example, to respond to + * new preferences. + * + * "profile-initial-state" + * Called after all phases of a change have completed. Typically + * in this phase, an application level observer will open a new window. + * + * Contexts for profile changes. These are passed as the someData param to the + * observer's Observe() method. + + * "startup" + * Going from no profile to a profile. + * + * The following topics happen in this context: + * profile-do-change + * profile-after-change + * + * "shutdown-persist" + * The user is logging out and whatever data the observer stores + * for the current profile should be released from memory and + * saved to disk. + * + * "shutdown-cleanse" + * The user is logging out and whatever data the observer stores + * for the current profile should be released from memory and + * deleted from disk. + * + * The following topics happen in both shutdown contexts: + * profile-approve-change + * profile-change-teardown + * profile-before-change + * + * "switch" + * Going from one profile to another. + * + * All of the above topics happen in a profile switch. + * + */ + +/* starting interface: nsIProfileChangeStatus */ +#define NS_IPROFILECHANGESTATUS_IID_STR "2f977d43-5485-11d4-87e2-0010a4e75ef2" + +#define NS_IPROFILECHANGESTATUS_IID \ + {0x2f977d43, 0x5485, 0x11d4, \ + { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 }} + +class NS_NO_VTABLE nsIProfileChangeStatus : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROFILECHANGESTATUS_IID) + + /* void vetoChange (); */ + NS_IMETHOD VetoChange(void) = 0; + + /** + * Called by a profile change observer when a fatal error + * occurred during the attempt to switch the profile. + * + * The profile should be considered in an unsafe condition, + * and the profile manager should inform the user and + * exit immediately. + * + */ + /* void changeFailed (); */ + NS_IMETHOD ChangeFailed(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROFILECHANGESTATUS \ + NS_IMETHOD VetoChange(void); \ + NS_IMETHOD ChangeFailed(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROFILECHANGESTATUS(_to) \ + NS_IMETHOD VetoChange(void) { return _to VetoChange(); } \ + NS_IMETHOD ChangeFailed(void) { return _to ChangeFailed(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROFILECHANGESTATUS(_to) \ + NS_IMETHOD VetoChange(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->VetoChange(); } \ + NS_IMETHOD ChangeFailed(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ChangeFailed(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsProfileChangeStatus : public nsIProfileChangeStatus +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROFILECHANGESTATUS + + nsProfileChangeStatus(); + +private: + ~nsProfileChangeStatus(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsProfileChangeStatus, nsIProfileChangeStatus) + +nsProfileChangeStatus::nsProfileChangeStatus() +{ + /* member initializers and constructor code */ +} + +nsProfileChangeStatus::~nsProfileChangeStatus() +{ + /* destructor code */ +} + +/* void vetoChange (); */ +NS_IMETHODIMP nsProfileChangeStatus::VetoChange() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void changeFailed (); */ +NS_IMETHODIMP nsProfileChangeStatus::ChangeFailed() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIProfileChangeStatus_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIProgrammingLanguage.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIProgrammingLanguage.h new file mode 100644 index 00000000..6bb29f1a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIProgrammingLanguage.h @@ -0,0 +1,103 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsIProgrammingLanguage.idl + */ + +#ifndef __gen_nsIProgrammingLanguage_h__ +#define __gen_nsIProgrammingLanguage_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#ifdef XP_OS2 // OS2 has UNKNOWN problems :) +#undef UNKNOWN +#endif + +/* starting interface: nsIProgrammingLanguage */ +#define NS_IPROGRAMMINGLANGUAGE_IID_STR "ea604e90-40ba-11d5-90bb-0010a4e73d9a" + +#define NS_IPROGRAMMINGLANGUAGE_IID \ + {0xea604e90, 0x40ba, 0x11d5, \ + { 0x90, 0xbb, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }} + +/** + * Enumeration of Programming Languages + * @status FROZEN + */ +class NS_NO_VTABLE nsIProgrammingLanguage : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROGRAMMINGLANGUAGE_IID) + + /** + * Identifiers for programming languages. + */ + enum { UNKNOWN = 0U }; + + enum { CPLUSPLUS = 1U }; + + enum { JAVASCRIPT = 2U }; + + enum { PYTHON = 3U }; + + enum { PERL = 4U }; + + enum { JAVA = 5U }; + + enum { ZX81_BASIC = 6U }; + + enum { JAVASCRIPT2 = 7U }; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROGRAMMINGLANGUAGE \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROGRAMMINGLANGUAGE(_to) \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROGRAMMINGLANGUAGE(_to) \ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsProgrammingLanguage : public nsIProgrammingLanguage +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROGRAMMINGLANGUAGE + + nsProgrammingLanguage(); + +private: + ~nsProgrammingLanguage(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsProgrammingLanguage, nsIProgrammingLanguage) + +nsProgrammingLanguage::nsProgrammingLanguage() +{ + /* member initializers and constructor code */ +} + +nsProgrammingLanguage::~nsProgrammingLanguage() +{ + /* destructor code */ +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIProgrammingLanguage_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIPromptService.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIPromptService.h new file mode 100644 index 00000000..62cccce1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIPromptService.h @@ -0,0 +1,471 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/components/windowwatcher/public/nsIPromptService.idl + */ + +#ifndef __gen_nsIPromptService_h__ +#define __gen_nsIPromptService_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMWindow; /* forward declaration */ + + +/* starting interface: nsIPromptService */ +#define NS_IPROMPTSERVICE_IID_STR "1630c61a-325e-49ca-8759-a31b16c47aa5" + +#define NS_IPROMPTSERVICE_IID \ + {0x1630c61a, 0x325e, 0x49ca, \ + { 0x87, 0x59, 0xa3, 0x1b, 0x16, 0xc4, 0x7a, 0xa5 }} + +/** + * This is the interface to the embeddable prompt service; the service that + * implements nsIPrompt. Its interface is designed to be just nsIPrompt, each + * method modified to take a parent window parameter. + * + * Accesskeys can be attached to buttons and checkboxes by inserting an & + * before the accesskey character in the checkbox message or button title. For + * a real &, use && instead. (A "button title" generally refers to the text + * label of a button.) + * + * One note: in all cases, the parent window parameter can be null. However, + * these windows are all intended to have parents. So when no parent is + * specified, the implementation should try hard to find a suitable foster + * parent. + * + * Implementations are free to choose how they present the various button + * types. For example, while prompts that give the user a choice between OK + * and Cancel are required to return a boolean value indicating whether or not + * the user accepted the prompt (pressed OK) or rejected the prompt (pressed + * Cancel), the implementation of this interface could very well speak the + * prompt to the user instead of rendering any visual user-interface. The + * standard button types are merely idioms used to convey the nature of the + * choice the user is to make. + * + * Because implementations of this interface may loosely interpret the various + * button types, it is advised that text messages passed to these prompts do + * not refer to the button types by name. For example, it is inadvisable to + * tell the user to "Press OK to proceed." Instead, such a prompt might be + * rewritten to ask the user: "Would you like to proceed?" + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIPromptService : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROMPTSERVICE_IID) + + /** + * Puts up an alert dialog with an OK button. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + */ + /* void alert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */ + NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) = 0; + + /** + * Puts up an alert dialog with an OK button and a labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aCheckMsg + * Text to appear with the checkbox. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + */ + /* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */ + NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) = 0; + + /** + * Puts up a dialog with OK and Cancel buttons. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * + * @return true for OK, false for Cancel + */ + /* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */ + NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) = 0; + + /** + * Puts up a dialog with OK and Cancel buttons and a labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aCheckMsg + * Text to appear with the checkbox. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return true for OK, false for Cancel + */ + /* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */ + NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0; + + /** + * Button Flags + * + * The following flags are combined to form the aButtonFlags parameter passed + * to confirmEx. See confirmEx for more information on how the flags may be + * combined. + */ +/** + * Button Position Flags + */ + enum { BUTTON_POS_0 = 1U }; + + enum { BUTTON_POS_1 = 256U }; + + enum { BUTTON_POS_2 = 65536U }; + + /** + * Button Title Flags (used to set the labels of buttons in the prompt) + */ + enum { BUTTON_TITLE_OK = 1U }; + + enum { BUTTON_TITLE_CANCEL = 2U }; + + enum { BUTTON_TITLE_YES = 3U }; + + enum { BUTTON_TITLE_NO = 4U }; + + enum { BUTTON_TITLE_SAVE = 5U }; + + enum { BUTTON_TITLE_DONT_SAVE = 6U }; + + enum { BUTTON_TITLE_REVERT = 7U }; + + enum { BUTTON_TITLE_IS_STRING = 127U }; + + /** + * Button Default Flags (used to select which button is the default one) + */ + enum { BUTTON_POS_0_DEFAULT = 0U }; + + enum { BUTTON_POS_1_DEFAULT = 16777216U }; + + enum { BUTTON_POS_2_DEFAULT = 33554432U }; + + /** + * Causes the buttons to be initially disabled. They are enabled after a + * timeout expires. The implementation may interpret this loosely as the + * intent is to ensure that the user does not click through a security dialog + * too quickly. Strictly speaking, the implementation could choose to ignore + * this flag. + */ + enum { BUTTON_DELAY_ENABLE = 67108864U }; + + /** + * Selects the standard set of OK/Cancel buttons. + */ + enum { STD_OK_CANCEL_BUTTONS = 513U }; + + /** + * Selects the standard set of Yes/No buttons. + */ + enum { STD_YES_NO_BUTTONS = 1027U }; + + /** + * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aButtonFlags + * A combination of Button Flags. + * @param aButton0Title + * Used when button 0 uses TITLE_IS_STRING + * @param aButton1Title + * Used when button 1 uses TITLE_IS_STRING + * @param aButton2Title + * Used when button 2 uses TITLE_IS_STRING + * @param aCheckMsg + * Text to appear with the checkbox. Null if no checkbox. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return index of the button pressed. + * + * Buttons are numbered 0 - 2. The implementation can decide whether the + * sequence goes from right to left or left to right. Button 0 is the + * default button unless one of the Button Default Flags is specified. + * + * A button may use a predefined title, specified by one of the Button Title + * Flags values. Each title value can be multiplied by a position value to + * assign the title to a particular button. If BUTTON_TITLE_IS_STRING is + * used for a button, the string parameter for that button will be used. If + * the value for a button position is zero, the button will not be shown. + * + * In general, aButtonFlags is constructed per the following example: + * + * aButtonFlags = (BUTTON_POS_0) * (BUTTON_TITLE_AAA) + + * (BUTTON_POS_1) * (BUTTON_TITLE_BBB) + + * BUTTON_POS_1_DEFAULT; + * + * where "AAA" and "BBB" correspond to one of the button titles. + */ + /* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */ + NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) = 0; + + /** + * Puts up a dialog with an edit field and an optional, labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aValue + * Contains the default value for the dialog field when this method + * is called (null value is ok). Upon return, if the user pressed + * OK, then this parameter contains a newly allocated string value. + * Otherwise, the parameter's value is unmodified. + * @param aCheckMsg + * Text to appear with the checkbox. If null, check box will not be shown. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return true for OK, false for Cancel. + */ + /* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */ + NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0; + + /** + * Puts up a dialog with an edit field, a password field, and an optional, + * labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aUsername + * Contains the default value for the username field when this method + * is called (null value is ok). Upon return, if the user pressed OK, + * then this parameter contains a newly allocated string value. + * Otherwise, the parameter's value is unmodified. + * @param aPassword + * Contains the default value for the password field when this method + * is called (null value is ok). Upon return, if the user pressed OK, + * then this parameter contains a newly allocated string value. + * Otherwise, the parameter's value is unmodified. + * @param aCheckMsg + * Text to appear with the checkbox. If null, check box will not be shown. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return true for OK, false for Cancel. + */ + /* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */ + NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0; + + /** + * Puts up a dialog with a password field and an optional, labeled checkbox. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aPassword + * Contains the default value for the password field when this method + * is called (null value is ok). Upon return, if the user pressed OK, + * then this parameter contains a newly allocated string value. + * Otherwise, the parameter's value is unmodified. + * @param aCheckMsg + * Text to appear with the checkbox. If null, check box will not be shown. + * @param aCheckState + * Contains the initial checked state of the checkbox when this method + * is called and the final checked state after this method returns. + * + * @return true for OK, false for Cancel. + */ + /* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */ + NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0; + + /** + * Puts up a dialog box which has a list box of strings from which the user + * may make a single selection. + * + * @param aParent + * The parent window or null. + * @param aDialogTitle + * Text to appear in the title of the dialog. + * @param aText + * Text to appear in the body of the dialog. + * @param aCount + * The length of the aSelectList array parameter. + * @param aSelectList + * The list of strings to display. + * @param aOutSelection + * Contains the index of the selected item in the list when this + * method returns true. + * + * @return true for OK, false for Cancel. + */ + /* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */ + NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROMPTSERVICE \ + NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText); \ + NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState); \ + NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval); \ + NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \ + NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval); \ + NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \ + NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \ + NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \ + NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROMPTSERVICE(_to) \ + NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) { return _to Alert(aParent, aDialogTitle, aText); } \ + NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) { return _to AlertCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState); } \ + NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) { return _to Confirm(aParent, aDialogTitle, aText, _retval); } \ + NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to ConfirmCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) { return _to ConfirmEx(aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to Prompt(aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to PromptUsernameAndPassword(aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to PromptPassword(aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) { return _to Select(aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROMPTSERVICE(_to) \ + NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->Alert(aParent, aDialogTitle, aText); } \ + NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) { return !_to ? NS_ERROR_NULL_POINTER : _to->AlertCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState); } \ + NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Confirm(aParent, aDialogTitle, aText, _retval); } \ + NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmEx(aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Prompt(aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptUsernameAndPassword(aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptPassword(aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval); } \ + NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Select(aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPromptService : public nsIPromptService +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROMPTSERVICE + + nsPromptService(); + +private: + ~nsPromptService(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPromptService, nsIPromptService) + +nsPromptService::nsPromptService() +{ + /* member initializers and constructor code */ +} + +nsPromptService::~nsPromptService() +{ + /* destructor code */ +} + +/* void alert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */ +NS_IMETHODIMP nsPromptService::Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */ +NS_IMETHODIMP nsPromptService::AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */ +NS_IMETHODIMP nsPromptService::Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */ +NS_IMETHODIMP nsPromptService::ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */ +NS_IMETHODIMP nsPromptService::ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */ +NS_IMETHODIMP nsPromptService::Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */ +NS_IMETHODIMP nsPromptService::PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */ +NS_IMETHODIMP nsPromptService::PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */ +NS_IMETHODIMP nsPromptService::Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPromptService_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIProperties.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIProperties.h new file mode 100644 index 00000000..87dd43d3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIProperties.h @@ -0,0 +1,158 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/ds/nsIProperties.idl + */ + +#ifndef __gen_nsIProperties_h__ +#define __gen_nsIProperties_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIProperties */ +#define NS_IPROPERTIES_IID_STR "78650582-4e93-4b60-8e85-26ebd3eb14ca" + +#define NS_IPROPERTIES_IID \ + {0x78650582, 0x4e93, 0x4b60, \ + { 0x8e, 0x85, 0x26, 0xeb, 0xd3, 0xeb, 0x14, 0xca }} + +class NS_NO_VTABLE nsIProperties : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROPERTIES_IID) + + /** + * Gets a property with a given name. + * + * @return NS_ERROR_FAILURE if a property with that name doesn't exist. + * @return NS_ERROR_NO_INTERFACE if the found property fails to QI to the + * given iid. + */ + /* void get (in string prop, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */ + NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result) = 0; + + /** + * Sets a property with a given name to a given value. + */ + /* void set (in string prop, in nsISupports value); */ + NS_IMETHOD Set(const char *prop, nsISupports *value) = 0; + + /** + * Returns true if the property with the given name exists. + */ + /* boolean has (in string prop); */ + NS_IMETHOD Has(const char *prop, PRBool *_retval) = 0; + + /** + * Undefines a property. + * @return NS_ERROR_FAILURE if a property with that name doesn't + * already exist. + */ + /* void undefine (in string prop); */ + NS_IMETHOD Undefine(const char *prop) = 0; + + /** + * Returns an array of the keys. + */ + /* void getKeys (out PRUint32 count, [array, size_is (count), retval] out string keys); */ + NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROPERTIES \ + NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result); \ + NS_IMETHOD Set(const char *prop, nsISupports *value); \ + NS_IMETHOD Has(const char *prop, PRBool *_retval); \ + NS_IMETHOD Undefine(const char *prop); \ + NS_IMETHOD GetKeys(PRUint32 *count, char ***keys); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROPERTIES(_to) \ + NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result) { return _to Get(prop, iid, result); } \ + NS_IMETHOD Set(const char *prop, nsISupports *value) { return _to Set(prop, value); } \ + NS_IMETHOD Has(const char *prop, PRBool *_retval) { return _to Has(prop, _retval); } \ + NS_IMETHOD Undefine(const char *prop) { return _to Undefine(prop); } \ + NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) { return _to GetKeys(count, keys); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROPERTIES(_to) \ + NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->Get(prop, iid, result); } \ + NS_IMETHOD Set(const char *prop, nsISupports *value) { return !_to ? NS_ERROR_NULL_POINTER : _to->Set(prop, value); } \ + NS_IMETHOD Has(const char *prop, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Has(prop, _retval); } \ + NS_IMETHOD Undefine(const char *prop) { return !_to ? NS_ERROR_NULL_POINTER : _to->Undefine(prop); } \ + NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeys(count, keys); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsProperties : public nsIProperties +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROPERTIES + + nsProperties(); + +private: + ~nsProperties(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsProperties, nsIProperties) + +nsProperties::nsProperties() +{ + /* member initializers and constructor code */ +} + +nsProperties::~nsProperties() +{ + /* destructor code */ +} + +/* void get (in string prop, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */ +NS_IMETHODIMP nsProperties::Get(const char *prop, const nsIID & iid, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void set (in string prop, in nsISupports value); */ +NS_IMETHODIMP nsProperties::Set(const char *prop, nsISupports *value) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean has (in string prop); */ +NS_IMETHODIMP nsProperties::Has(const char *prop, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void undefine (in string prop); */ +NS_IMETHODIMP nsProperties::Undefine(const char *prop) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getKeys (out PRUint32 count, [array, size_is (count), retval] out string keys); */ +NS_IMETHODIMP nsProperties::GetKeys(PRUint32 *count, char ***keys) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIProperties_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIProtocolHandler.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIProtocolHandler.h new file mode 100644 index 00000000..342ce406 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIProtocolHandler.h @@ -0,0 +1,256 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIProtocolHandler.idl + */ + +#ifndef __gen_nsIProtocolHandler_h__ +#define __gen_nsIProtocolHandler_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIURI; /* forward declaration */ + +class nsIChannel; /* forward declaration */ + + +/* starting interface: nsIProtocolHandler */ +#define NS_IPROTOCOLHANDLER_IID_STR "15fd6940-8ea7-11d3-93ad-00104ba0fd40" + +#define NS_IPROTOCOLHANDLER_IID \ + {0x15fd6940, 0x8ea7, 0x11d3, \ + { 0x93, 0xad, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }} + +/** + * nsIProtocolHandler + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIProtocolHandler : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROTOCOLHANDLER_IID) + + /** + * The scheme of this protocol (e.g., "file"). + */ + /* readonly attribute ACString scheme; */ + NS_IMETHOD GetScheme(nsACString & aScheme) = 0; + + /** + * The default port is the port that this protocol normally uses. + * If a port does not make sense for the protocol (e.g., "about:") + * then -1 will be returned. + */ + /* readonly attribute long defaultPort; */ + NS_IMETHOD GetDefaultPort(PRInt32 *aDefaultPort) = 0; + + /** + * Returns the protocol specific flags (see flag definitions below). + */ + /* readonly attribute unsigned long protocolFlags; */ + NS_IMETHOD GetProtocolFlags(PRUint32 *aProtocolFlags) = 0; + + /** + * Makes a URI object that is suitable for loading by this protocol, + * where the URI string is given as an UTF-8 string. The caller may + * provide the charset from which the URI string originated, so that + * the URI string can be translated back to that charset (if necessary) + * before communicating with, for example, the origin server of the URI + * string. (Many servers do not support UTF-8 IRIs at the present time, + * so we must be careful about tracking the native charset of the origin + * server.) + * + * @param aSpec - the URI string in UTF-8 encoding. depending + * on the protocol implementation, unicode character + * sequences may or may not be %xx escaped. + * @param aOriginCharset - the charset of the document from which this URI + * string originated. this corresponds to the + * charset that should be used when communicating + * this URI to an origin server, for example. if + * null, then UTF-8 encoding is assumed (i.e., + * no charset transformation from aSpec). + * @param aBaseURI - if null, aSpec must specify an absolute URI. + * otherwise, aSpec may be resolved relative + * to aBaseURI, depending on the protocol. + * If the protocol has no concept of relative + * URI aBaseURI will simply be ignored. + */ + /* nsIURI newURI (in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */ + NS_IMETHOD NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) = 0; + + /** + * Constructs a new channel from the given URI for this protocol handler. + */ + /* nsIChannel newChannel (in nsIURI aURI); */ + NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel **_retval) = 0; + + /** + * Allows a protocol to override blacklisted ports. + * + * This method will be called when there is an attempt to connect to a port + * that is blacklisted. For example, for most protocols, port 25 (Simple Mail + * Transfer) is banned. When a URI containing this "known-to-do-bad-things" + * port number is encountered, this function will be called to ask if the + * protocol handler wants to override the ban. + */ + /* boolean allowPort (in long port, in string scheme); */ + NS_IMETHOD AllowPort(PRInt32 port, const char *scheme, PRBool *_retval) = 0; + + /************************************************************************** + * Constants for the protocol flags (the first is the default mask, the + * others are deviations): + * + * NOTE: Implementation must ignore any flags they do not understand. + */ +/** + * standard full URI with authority component and concept of relative + * URIs (http, ftp, ...) + */ + enum { URI_STD = 0U }; + + /** + * no concept of relative URIs (about, javascript, finger, ...) + */ + enum { URI_NORELATIVE = 1U }; + + /** + * no authority component (file, ...) + */ + enum { URI_NOAUTH = 2U }; + + /** + * This protocol handler can be proxied via a proxy (socks or http) + * (e.g., irc, smtp, http, etc.). If the protocol supports transparent + * proxying, the handler should implement nsIProxiedProtocolHandler. + * + * If it supports only HTTP proxying, then it need not support + * nsIProxiedProtocolHandler, but should instead set the ALLOWS_PROXY_HTTP + * flag (see below). + * + * @see nsIProxiedProtocolHandler + */ + enum { ALLOWS_PROXY = 4U }; + + /** + * This protocol handler can be proxied using a http proxy (e.g., http, + * ftp, etc.). nsIIOService::newChannelFromURI will feed URIs from this + * protocol handler to the HTTP protocol handler instead. This flag is + * ignored if ALLOWS_PROXY is not set. + */ + enum { ALLOWS_PROXY_HTTP = 8U }; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROTOCOLHANDLER \ + NS_IMETHOD GetScheme(nsACString & aScheme); \ + NS_IMETHOD GetDefaultPort(PRInt32 *aDefaultPort); \ + NS_IMETHOD GetProtocolFlags(PRUint32 *aProtocolFlags); \ + NS_IMETHOD NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval); \ + NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel **_retval); \ + NS_IMETHOD AllowPort(PRInt32 port, const char *scheme, PRBool *_retval); \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROTOCOLHANDLER(_to) \ + NS_IMETHOD GetScheme(nsACString & aScheme) { return _to GetScheme(aScheme); } \ + NS_IMETHOD GetDefaultPort(PRInt32 *aDefaultPort) { return _to GetDefaultPort(aDefaultPort); } \ + NS_IMETHOD GetProtocolFlags(PRUint32 *aProtocolFlags) { return _to GetProtocolFlags(aProtocolFlags); } \ + NS_IMETHOD NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) { return _to NewURI(aSpec, aOriginCharset, aBaseURI, _retval); } \ + NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel **_retval) { return _to NewChannel(aURI, _retval); } \ + NS_IMETHOD AllowPort(PRInt32 port, const char *scheme, PRBool *_retval) { return _to AllowPort(port, scheme, _retval); } \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROTOCOLHANDLER(_to) \ + NS_IMETHOD GetScheme(nsACString & aScheme) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \ + NS_IMETHOD GetDefaultPort(PRInt32 *aDefaultPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultPort(aDefaultPort); } \ + NS_IMETHOD GetProtocolFlags(PRUint32 *aProtocolFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocolFlags(aProtocolFlags); } \ + NS_IMETHOD NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewURI(aSpec, aOriginCharset, aBaseURI, _retval); } \ + NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewChannel(aURI, _retval); } \ + NS_IMETHOD AllowPort(PRInt32 port, const char *scheme, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllowPort(port, scheme, _retval); } \ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsProtocolHandler : public nsIProtocolHandler +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROTOCOLHANDLER + + nsProtocolHandler(); + +private: + ~nsProtocolHandler(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsProtocolHandler, nsIProtocolHandler) + +nsProtocolHandler::nsProtocolHandler() +{ + /* member initializers and constructor code */ +} + +nsProtocolHandler::~nsProtocolHandler() +{ + /* destructor code */ +} + +/* readonly attribute ACString scheme; */ +NS_IMETHODIMP nsProtocolHandler::GetScheme(nsACString & aScheme) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long defaultPort; */ +NS_IMETHODIMP nsProtocolHandler::GetDefaultPort(PRInt32 *aDefaultPort) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long protocolFlags; */ +NS_IMETHODIMP nsProtocolHandler::GetProtocolFlags(PRUint32 *aProtocolFlags) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIURI newURI (in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */ +NS_IMETHODIMP nsProtocolHandler::NewURI(const nsACString & aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIChannel newChannel (in nsIURI aURI); */ +NS_IMETHODIMP nsProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean allowPort (in long port, in string scheme); */ +NS_IMETHODIMP nsProtocolHandler::AllowPort(PRInt32 port, const char *scheme, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +/** + * Protocol handlers are registered with XPCOM under the following CONTRACTID prefix: + */ +#define NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "@mozilla.org/network/protocol;1?name=" +/** + * For example, "@mozilla.org/network/protocol;1?name=http" + */ + +#endif /* __gen_nsIProtocolHandler_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIRequest.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIRequest.h new file mode 100644 index 00000000..84b6f4c0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIRequest.h @@ -0,0 +1,328 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIRequest.idl + */ + +#ifndef __gen_nsIRequest_h__ +#define __gen_nsIRequest_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsILoadGroup; /* forward declaration */ + +typedef PRUint32 nsLoadFlags; + + +/* starting interface: nsIRequest */ +#define NS_IREQUEST_IID_STR "ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe" + +#define NS_IREQUEST_IID \ + {0xef6bfbd2, 0xfd46, 0x48d8, \ + { 0x96, 0xb7, 0x9f, 0x8f, 0x0f, 0xd3, 0x87, 0xfe }} + +/** + * nsIRequest + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIRequest : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IREQUEST_IID) + + /** + * The name of the request. Often this is the URI of the request. + */ + /* readonly attribute AUTF8String name; */ + NS_IMETHOD GetName(nsACString & aName) = 0; + + /** + * @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 IsPending(PRBool *_retval) = 0; + + /** + * The error status associated with the request. + */ + /* readonly attribute nsresult status; */ + NS_IMETHOD GetStatus(nsresult *aStatus) = 0; + + /** + * 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 Cancel(nsresult aStatus) = 0; + + /** + * 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 Suspend(void) = 0; + + /** + * 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 Resume(void) = 0; + + /** + * 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 GetLoadGroup(nsILoadGroup * *aLoadGroup) = 0; + NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup) = 0; + + /** + * 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 GetLoadFlags(nsLoadFlags *aLoadFlags) = 0; + NS_IMETHOD SetLoadFlags(nsLoadFlags aLoadFlags) = 0; + + /************************************************************************** + * Listed below are the various load flags which may be or'd together. + */ +/** + * No special load flags: + */ + enum { LOAD_NORMAL = 0U }; + + /** + * Don't deliver status notifications to the nsIProgressEventSink, or keep + * this load from completing the nsILoadGroup it may belong to. + */ + enum { LOAD_BACKGROUND = 1U }; + + /************************************************************************** + * The following flags control the flow of data into the cache. + */ +/** + * This flag prevents caching of any kind. It does not, however, prevent + * cached content from being used to satisfy this request. + */ + enum { INHIBIT_CACHING = 128U }; + + /** + * This flag prevents caching on disk (or other persistent media), which + * may be needed to preserve privacy. For HTTPS, this flag is set auto- + * matically. + */ + enum { INHIBIT_PERSISTENT_CACHING = 256U }; + + /************************************************************************** + * The following flags control what happens when the cache contains data + * that could perhaps satisfy this request. They are listed in descending + * order of precidence. + */ +/** + * Force an end-to-end download of content data from the origin server. + * This flag is used for a shift-reload. + */ + enum { LOAD_BYPASS_CACHE = 512U }; + + /** + * Load from the cache, bypassing protocol specific validation logic. This + * flag is used when browsing via history. It is not recommended for normal + * browsing as it may likely violate reasonable assumptions made by the + * server and confuse users. + */ + enum { LOAD_FROM_CACHE = 1024U }; + + /** + * The following flags control the frequency of cached content validation + * when neither LOAD_BYPASS_CACHE or LOAD_FROM_CACHE are set. By default, + * cached content is automatically validated if necessary before reuse. + * + * VALIDATE_ALWAYS forces validation of any cached content independent of + * its expiration time. + * + * VALIDATE_NEVER disables validation of expired content. + * + * VALIDATE_ONCE_PER_SESSION disables validation of expired content, + * provided it has already been validated (at least once) since the start + * of this session. + * + * NOTE TO IMPLEMENTORS: + * These flags are intended for normal browsing, and they should therefore + * not apply to content that must be validated before each use. Consider, + * for example, a HTTP response with a "Cache-control: no-cache" header. + * According to RFC2616, this response must be validated before it can + * be taken from a cache. Breaking this requirement could result in + * incorrect and potentially undesirable side-effects. + */ + enum { VALIDATE_ALWAYS = 2048U }; + + enum { VALIDATE_NEVER = 4096U }; + + enum { VALIDATE_ONCE_PER_SESSION = 8192U }; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIREQUEST \ + NS_IMETHOD GetName(nsACString & aName); \ + NS_IMETHOD IsPending(PRBool *_retval); \ + NS_IMETHOD GetStatus(nsresult *aStatus); \ + NS_IMETHOD Cancel(nsresult aStatus); \ + NS_IMETHOD Suspend(void); \ + NS_IMETHOD Resume(void); \ + NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup); \ + NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup); \ + NS_IMETHOD GetLoadFlags(nsLoadFlags *aLoadFlags); \ + NS_IMETHOD SetLoadFlags(nsLoadFlags aLoadFlags); \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIREQUEST(_to) \ + NS_IMETHOD GetName(nsACString & aName) { return _to GetName(aName); } \ + NS_IMETHOD IsPending(PRBool *_retval) { return _to IsPending(_retval); } \ + NS_IMETHOD GetStatus(nsresult *aStatus) { return _to GetStatus(aStatus); } \ + NS_IMETHOD Cancel(nsresult aStatus) { return _to Cancel(aStatus); } \ + NS_IMETHOD Suspend(void) { return _to Suspend(); } \ + NS_IMETHOD Resume(void) { return _to Resume(); } \ + NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup) { return _to GetLoadGroup(aLoadGroup); } \ + NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup) { return _to SetLoadGroup(aLoadGroup); } \ + NS_IMETHOD GetLoadFlags(nsLoadFlags *aLoadFlags) { return _to GetLoadFlags(aLoadFlags); } \ + NS_IMETHOD SetLoadFlags(nsLoadFlags aLoadFlags) { return _to SetLoadFlags(aLoadFlags); } \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIREQUEST(_to) \ + NS_IMETHOD GetName(nsACString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ + NS_IMETHOD IsPending(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsPending(_retval); } \ + NS_IMETHOD GetStatus(nsresult *aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \ + NS_IMETHOD Cancel(nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(aStatus); } \ + NS_IMETHOD Suspend(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Suspend(); } \ + NS_IMETHOD Resume(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Resume(); } \ + NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadGroup(aLoadGroup); } \ + NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoadGroup(aLoadGroup); } \ + NS_IMETHOD GetLoadFlags(nsLoadFlags *aLoadFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadFlags(aLoadFlags); } \ + NS_IMETHOD SetLoadFlags(nsLoadFlags aLoadFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoadFlags(aLoadFlags); } \ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsRequest : public nsIRequest +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIREQUEST + + nsRequest(); + +private: + ~nsRequest(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsRequest, nsIRequest) + +nsRequest::nsRequest() +{ + /* member initializers and constructor code */ +} + +nsRequest::~nsRequest() +{ + /* destructor code */ +} + +/* readonly attribute AUTF8String name; */ +NS_IMETHODIMP nsRequest::GetName(nsACString & aName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isPending (); */ +NS_IMETHODIMP nsRequest::IsPending(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsresult status; */ +NS_IMETHODIMP nsRequest::GetStatus(nsresult *aStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void cancel (in nsresult aStatus); */ +NS_IMETHODIMP nsRequest::Cancel(nsresult aStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void suspend (); */ +NS_IMETHODIMP nsRequest::Suspend() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void resume (); */ +NS_IMETHODIMP nsRequest::Resume() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsILoadGroup loadGroup; */ +NS_IMETHODIMP nsRequest::GetLoadGroup(nsILoadGroup * *aLoadGroup) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsRequest::SetLoadGroup(nsILoadGroup * aLoadGroup) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsLoadFlags loadFlags; */ +NS_IMETHODIMP nsRequest::GetLoadFlags(nsLoadFlags *aLoadFlags) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsRequest::SetLoadFlags(nsLoadFlags aLoadFlags) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIRequest_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIRequestObserver.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIRequestObserver.h new file mode 100644 index 00000000..8cf6f39b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIRequestObserver.h @@ -0,0 +1,127 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIRequestObserver.idl + */ + +#ifndef __gen_nsIRequestObserver_h__ +#define __gen_nsIRequestObserver_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIRequest; /* forward declaration */ + + +/* starting interface: nsIRequestObserver */ +#define NS_IREQUESTOBSERVER_IID_STR "fd91e2e0-1481-11d3-9333-00104ba0fd40" + +#define NS_IREQUESTOBSERVER_IID \ + {0xfd91e2e0, 0x1481, 0x11d3, \ + { 0x93, 0x33, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }} + +/** + * nsIRequestObserver + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIRequestObserver : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IREQUESTOBSERVER_IID) + + /** + * 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 OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) = 0; + + /** + * 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 OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIREQUESTOBSERVER \ + NS_IMETHOD OnStartRequest(nsIRequest *aRequest, nsISupports *aContext); \ + NS_IMETHOD OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIREQUESTOBSERVER(_to) \ + NS_IMETHOD OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) { return _to OnStartRequest(aRequest, aContext); } \ + NS_IMETHOD OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) { return _to OnStopRequest(aRequest, aContext, aStatusCode); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIREQUESTOBSERVER(_to) \ + NS_IMETHOD OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartRequest(aRequest, aContext); } \ + NS_IMETHOD OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopRequest(aRequest, aContext, aStatusCode); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsRequestObserver : public nsIRequestObserver +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIREQUESTOBSERVER + + nsRequestObserver(); + +private: + ~nsRequestObserver(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsRequestObserver, nsIRequestObserver) + +nsRequestObserver::nsRequestObserver() +{ + /* member initializers and constructor code */ +} + +nsRequestObserver::~nsRequestObserver() +{ + /* destructor code */ +} + +/* void onStartRequest (in nsIRequest aRequest, in nsISupports aContext); */ +NS_IMETHODIMP nsRequestObserver::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode); */ +NS_IMETHODIMP nsRequestObserver::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIRequestObserver_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISHistory.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISHistory.h new file mode 100644 index 00000000..7f9c871e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISHistory.h @@ -0,0 +1,292 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpfe/components/shistory/public/nsISHistory.idl + */ + +#ifndef __gen_nsISHistory_h__ +#define __gen_nsISHistory_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIHistoryEntry; /* forward declaration */ + +class nsISHistoryListener; /* forward declaration */ + +class nsISimpleEnumerator; /* forward declaration */ + +#define NS_SHISTORY_CID \ +{0x7294fe9c, 0x14d8, 0x11d5, {0x98, 0x82, 0x00, 0xC0, 0x4f, 0xa0, 0x2f, 0x40}} +#define NS_SHISTORY_CONTRACTID "@mozilla.org/browser/shistory;1" + +/* starting interface: nsISHistory */ +#define NS_ISHISTORY_IID_STR "7294fe9b-14d8-11d5-9882-00c04fa02f40" + +#define NS_ISHISTORY_IID \ + {0x7294fe9b, 0x14d8, 0x11d5, \ + { 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 }} + +/** + * An interface to the primary properties of the Session History + * component. In an embedded browser environment, the nsIWebBrowser + * object creates an instance of session history for each open window. + * A handle to the session history object can be obtained from + * nsIWebNavigation. In a non-embedded situation, the owner of the + * session history component must create a instance of it and set + * it in the nsIWebNavigation object. + * This interface is accessible from javascript. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISHistory : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISHISTORY_IID) + + /** + * A readonly property of the interface that returns + * the number of toplevel documents currently available + * in session history. + */ + /* readonly attribute long count; */ + NS_IMETHOD GetCount(PRInt32 *aCount) = 0; + + /** + * A readonly property of the interface that returns + * the index of the current document in session history. + */ + /* readonly attribute long index; */ + NS_IMETHOD GetIndex(PRInt32 *aIndex) = 0; + + /** + * A read/write property of the interface, used to Get/Set + * the maximum number of toplevel documents, session history + * can hold for each instance. + */ + /* attribute long maxLength; */ + NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) = 0; + NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) = 0; + + /** + * Called to obtain handle to the history entry at a + * given index. + * + * @param index The index value whose entry is requested. + * @param modifyIndex A boolean flag that indicates if the current + * index of session history should be modified + * to the parameter index. + * + * @return <code>NS_OK</code> history entry for + * the index is obtained successfully. + * <code>NS_ERROR_FAILURE</code> Error in obtaining + * history entry for the given index. + */ + /* nsIHistoryEntry getEntryAtIndex (in long index, in boolean modifyIndex); */ + NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval) = 0; + + /** + * Called to purge older documents from history. + * Documents can be removed from session history for various + * reasons. For example to control memory usage of the browser, to + * prevent users from loading documents from history, to erase evidence of + * prior page loads etc... + * + * @param numEntries The number of toplevel documents to be + * purged from history. During purge operation, + * the latest documents are maintained and older + * 'numEntries' documents are removed from history. + * @throws <code>NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA</code> Purge was vetod. + * @throws <code>NS_ERROR_FAILURE</code> numEntries is + * invalid or out of bounds with the size of history. + * + */ + /* void PurgeHistory (in long numEntries); */ + NS_IMETHOD PurgeHistory(PRInt32 numEntries) = 0; + + /** + * Called to register a listener for the session history component. + * Listeners are notified when pages are loaded or purged from history. + * + * @param aListener Listener object to be notified for all + * page loads that initiate in session history. + * + * @note A listener object must implement + * nsISHistoryListener and nsSupportsWeakReference + * + * @see nsISHistoryListener + * @see nsSupportsWeakReference + */ + /* void addSHistoryListener (in nsISHistoryListener aListener); */ + NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) = 0; + + /** + * Called to remove a listener for the session history component. + * Listeners are notified when pages are loaded from history. + * + * @param aListener Listener object to be removed from + * session history. + * + * @note A listener object must implement + * nsISHistoryListener and nsSupportsWeakReference + * @see nsISHistoryListener + * @see nsSupportsWeakReference + */ + /* void removeSHistoryListener (in nsISHistoryListener aListener); */ + NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) = 0; + + /** + * Called to obtain a enumerator for all the documents stored in + * session history. The enumerator object thus returned by this method + * can be traversed using nsISimpleEnumerator. + * + * @note To access individual history entries of the enumerator, perform the + * following steps: + * 1) Call nsISHistory->GetSHistoryEnumerator() to obtain handle + * the nsISimpleEnumerator object. + * 2) Use nsISimpleEnumerator->GetNext() on the object returned + * by step #1 to obtain handle to the next object in the list. + * The object returned by this step is of type nsISupports. + * 3) Perform a QueryInterface on the object returned by step #2 + * to nsIHistoryEntry. + * 4) Use nsIHistoryEntry to access properties of each history entry. + * + * @see nsISimpleEnumerator + * @see nsIHistoryEntry + * @see QueryInterface() + * @see do_QueryInterface() + */ + /* readonly attribute nsISimpleEnumerator SHistoryEnumerator; */ + NS_IMETHOD GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISHISTORY \ + NS_IMETHOD GetCount(PRInt32 *aCount); \ + NS_IMETHOD GetIndex(PRInt32 *aIndex); \ + NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength); \ + NS_IMETHOD SetMaxLength(PRInt32 aMaxLength); \ + NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval); \ + NS_IMETHOD PurgeHistory(PRInt32 numEntries); \ + NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener); \ + NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener); \ + NS_IMETHOD GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISHISTORY(_to) \ + NS_IMETHOD GetCount(PRInt32 *aCount) { return _to GetCount(aCount); } \ + NS_IMETHOD GetIndex(PRInt32 *aIndex) { return _to GetIndex(aIndex); } \ + NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) { return _to GetMaxLength(aMaxLength); } \ + NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) { return _to SetMaxLength(aMaxLength); } \ + NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval) { return _to GetEntryAtIndex(index, modifyIndex, _retval); } \ + NS_IMETHOD PurgeHistory(PRInt32 numEntries) { return _to PurgeHistory(numEntries); } \ + NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) { return _to AddSHistoryListener(aListener); } \ + NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) { return _to RemoveSHistoryListener(aListener); } \ + NS_IMETHOD GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator) { return _to GetSHistoryEnumerator(aSHistoryEnumerator); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISHISTORY(_to) \ + NS_IMETHOD GetCount(PRInt32 *aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCount(aCount); } \ + NS_IMETHOD GetIndex(PRInt32 *aIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndex(aIndex); } \ + NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMaxLength(aMaxLength); } \ + NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMaxLength(aMaxLength); } \ + NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntryAtIndex(index, modifyIndex, _retval); } \ + NS_IMETHOD PurgeHistory(PRInt32 numEntries) { return !_to ? NS_ERROR_NULL_POINTER : _to->PurgeHistory(numEntries); } \ + NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddSHistoryListener(aListener); } \ + NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveSHistoryListener(aListener); } \ + NS_IMETHOD GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSHistoryEnumerator(aSHistoryEnumerator); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSHistory : public nsISHistory +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISHISTORY + + nsSHistory(); + +private: + ~nsSHistory(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSHistory, nsISHistory) + +nsSHistory::nsSHistory() +{ + /* member initializers and constructor code */ +} + +nsSHistory::~nsSHistory() +{ + /* destructor code */ +} + +/* readonly attribute long count; */ +NS_IMETHODIMP nsSHistory::GetCount(PRInt32 *aCount) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long index; */ +NS_IMETHODIMP nsSHistory::GetIndex(PRInt32 *aIndex) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long maxLength; */ +NS_IMETHODIMP nsSHistory::GetMaxLength(PRInt32 *aMaxLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSHistory::SetMaxLength(PRInt32 aMaxLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIHistoryEntry getEntryAtIndex (in long index, in boolean modifyIndex); */ +NS_IMETHODIMP nsSHistory::GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void PurgeHistory (in long numEntries); */ +NS_IMETHODIMP nsSHistory::PurgeHistory(PRInt32 numEntries) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void addSHistoryListener (in nsISHistoryListener aListener); */ +NS_IMETHODIMP nsSHistory::AddSHistoryListener(nsISHistoryListener *aListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeSHistoryListener (in nsISHistoryListener aListener); */ +NS_IMETHODIMP nsSHistory::RemoveSHistoryListener(nsISHistoryListener *aListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsISimpleEnumerator SHistoryEnumerator; */ +NS_IMETHODIMP nsSHistory::GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsISHistory_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISHistoryListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISHistoryListener.h new file mode 100644 index 00000000..c46fa2ce --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISHistoryListener.h @@ -0,0 +1,266 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpfe/components/shistory/public/nsISHistoryListener.idl + */ + +#ifndef __gen_nsISHistoryListener_h__ +#define __gen_nsISHistoryListener_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIURI; /* forward declaration */ + +#define NS_SHISTORYLISTENER_CONTRACTID "@mozilla.org/browser/shistorylistener;1" + +/* starting interface: nsISHistoryListener */ +#define NS_ISHISTORYLISTENER_IID_STR "3b07f591-e8e1-11d4-9882-00c04fa02f40" + +#define NS_ISHISTORYLISTENER_IID \ + {0x3b07f591, 0xe8e1, 0x11d4, \ + { 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 }} + +/** + * nsISHistoryListener defines the interface for an object that wishes + * to receive notifications about activities in History. A history + * listener will be notified when pages are added, removed and loaded + * from session history. A listener to session history can be registered + * using the interface nsISHistory. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISHistoryListener : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISHISTORYLISTENER_IID) + + /** + * called to notify a listener when a new document is + * added to session history. New documents are added to + * session history by docshell when new pages are loaded + * in a frame or content area. + * + * @param aNewURI The uri of the document to be added to session history + * + * @return <CODE>NS_OK</CODE> notification sent out successfully + */ + /* void OnHistoryNewEntry (in nsIURI aNewURI); */ + NS_IMETHOD OnHistoryNewEntry(nsIURI *aNewURI) = 0; + + /** + * called to notify a listener when the user presses the 'back' button + * of the browser OR when the user attempts to go back one page + * in history thro' other means, from javascript or using nsIWebNavigation + * + * @param aBackURI The uri of the previous page which is to be + * loaded. + * + * @return aReturn A boolean flag returned by the listener to + * indicate if the back operation is to be aborted + * or continued. If the listener returns 'true', it indicates + * that the back operation can be continued. If the listener + * returns 'false', then the back operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * + */ + /* boolean OnHistoryGoBack (in nsIURI aBackURI); */ + NS_IMETHOD OnHistoryGoBack(nsIURI *aBackURI, PRBool *_retval) = 0; + + /** + * called to notify a listener when the user presses the 'forward' button + * of the browser OR when the user attempts to go forward one page + * in history thro' other means, from javascript or using nsIWebNavigation + * + * @param aForwardURI The uri of the next page which is to be + * loaded. + * + * @return aReturn A boolean flag returned by the listener to + * indicate if the forward operation is to be aborted + * or continued. If the listener returns 'true', it indicates + * that the forward operation can be continued. If the listener + * returns 'false', then the forward operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * + */ + /* boolean OnHistoryGoForward (in nsIURI aForwardURI); */ + NS_IMETHOD OnHistoryGoForward(nsIURI *aForwardURI, PRBool *_retval) = 0; + + /** + * called to notify a listener when the user presses the 'reload' button + * of the browser OR when the user attempts to reload the current document + * through other means, like from javascript or using nsIWebNavigation + * + * @param aReloadURI The uri of the current document to be reloaded. + * @param aReloadFlags Flags that indicate how the document is to be + * refreshed. For example, from cache or bypassing + * cache and/or Proxy server. + * @return aReturn A boolean flag returned by the listener to indicate + * if the reload operation is to be aborted or continued. + * If the listener returns 'true', it indicates that the + * reload operation can be continued. If the listener + * returns 'false', then the reload operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * @see nsIWebNavigation + * + */ + /* boolean OnHistoryReload (in nsIURI aReloadURI, in unsigned long aReloadFlags); */ + NS_IMETHOD OnHistoryReload(nsIURI *aReloadURI, PRUint32 aReloadFlags, PRBool *_retval) = 0; + + /** + * called to notify a listener when the user visits a page using the 'Go' menu + * of the browser OR when the user attempts to go to a page at a particular index + * through other means, like from javascript or using nsIWebNavigation + * + * @param aIndex The index in history of the document to be loaded. + * @param aGotoURI The uri of the document to be loaded. + * + * @return aReturn A boolean flag returned by the listener to + * indicate if the GotoIndex operation is to be aborted + * or continued. If the listener returns 'true', it indicates + * that the GotoIndex operation can be continued. If the listener + * returns 'false', then the GotoIndex operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * + */ + /* boolean OnHistoryGotoIndex (in long aIndex, in nsIURI aGotoURI); */ + NS_IMETHOD OnHistoryGotoIndex(PRInt32 aIndex, nsIURI *aGotoURI, PRBool *_retval) = 0; + + /** + * called to notify a listener when documents are removed from session + * history. Documents can be removed from session history for various + * reasons. For example to control the memory usage of the browser, to + * prevent users from loading documents from history, to erase evidence of + * prior page loads etc... To purge documents from session history call + * nsISHistory::PurgeHistory() + * + * @param aNumEntries The number of documents to be removed from session history. + * + * @return aReturn A boolean flag returned by the listener to + * indicate if the purge operation is to be aborted + * or continued. If the listener returns 'true', it indicates + * that the purge operation can be continued. If the listener + * returns 'false', then the purge operation will be aborted. + * This is a mechanism for the listener to control user's + * operations with history. + * + * @note While purging history, the older documents are removed + * and newly loaded documents are kept. For example if there + * are 5 documents in history, and nsISHistory::PurgeHistory(3) + * is called, then, document 1, 2 and 3 are removed from history + * and most recently loaded document 4 and 5 are kept. + * + */ + /* boolean OnHistoryPurge (in long aNumEntries); */ + NS_IMETHOD OnHistoryPurge(PRInt32 aNumEntries, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISHISTORYLISTENER \ + NS_IMETHOD OnHistoryNewEntry(nsIURI *aNewURI); \ + NS_IMETHOD OnHistoryGoBack(nsIURI *aBackURI, PRBool *_retval); \ + NS_IMETHOD OnHistoryGoForward(nsIURI *aForwardURI, PRBool *_retval); \ + NS_IMETHOD OnHistoryReload(nsIURI *aReloadURI, PRUint32 aReloadFlags, PRBool *_retval); \ + NS_IMETHOD OnHistoryGotoIndex(PRInt32 aIndex, nsIURI *aGotoURI, PRBool *_retval); \ + NS_IMETHOD OnHistoryPurge(PRInt32 aNumEntries, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISHISTORYLISTENER(_to) \ + NS_IMETHOD OnHistoryNewEntry(nsIURI *aNewURI) { return _to OnHistoryNewEntry(aNewURI); } \ + NS_IMETHOD OnHistoryGoBack(nsIURI *aBackURI, PRBool *_retval) { return _to OnHistoryGoBack(aBackURI, _retval); } \ + NS_IMETHOD OnHistoryGoForward(nsIURI *aForwardURI, PRBool *_retval) { return _to OnHistoryGoForward(aForwardURI, _retval); } \ + NS_IMETHOD OnHistoryReload(nsIURI *aReloadURI, PRUint32 aReloadFlags, PRBool *_retval) { return _to OnHistoryReload(aReloadURI, aReloadFlags, _retval); } \ + NS_IMETHOD OnHistoryGotoIndex(PRInt32 aIndex, nsIURI *aGotoURI, PRBool *_retval) { return _to OnHistoryGotoIndex(aIndex, aGotoURI, _retval); } \ + NS_IMETHOD OnHistoryPurge(PRInt32 aNumEntries, PRBool *_retval) { return _to OnHistoryPurge(aNumEntries, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISHISTORYLISTENER(_to) \ + NS_IMETHOD OnHistoryNewEntry(nsIURI *aNewURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHistoryNewEntry(aNewURI); } \ + NS_IMETHOD OnHistoryGoBack(nsIURI *aBackURI, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHistoryGoBack(aBackURI, _retval); } \ + NS_IMETHOD OnHistoryGoForward(nsIURI *aForwardURI, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHistoryGoForward(aForwardURI, _retval); } \ + NS_IMETHOD OnHistoryReload(nsIURI *aReloadURI, PRUint32 aReloadFlags, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHistoryReload(aReloadURI, aReloadFlags, _retval); } \ + NS_IMETHOD OnHistoryGotoIndex(PRInt32 aIndex, nsIURI *aGotoURI, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHistoryGotoIndex(aIndex, aGotoURI, _retval); } \ + NS_IMETHOD OnHistoryPurge(PRInt32 aNumEntries, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHistoryPurge(aNumEntries, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSHistoryListener : public nsISHistoryListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISHISTORYLISTENER + + nsSHistoryListener(); + +private: + ~nsSHistoryListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSHistoryListener, nsISHistoryListener) + +nsSHistoryListener::nsSHistoryListener() +{ + /* member initializers and constructor code */ +} + +nsSHistoryListener::~nsSHistoryListener() +{ + /* destructor code */ +} + +/* void OnHistoryNewEntry (in nsIURI aNewURI); */ +NS_IMETHODIMP nsSHistoryListener::OnHistoryNewEntry(nsIURI *aNewURI) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean OnHistoryGoBack (in nsIURI aBackURI); */ +NS_IMETHODIMP nsSHistoryListener::OnHistoryGoBack(nsIURI *aBackURI, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean OnHistoryGoForward (in nsIURI aForwardURI); */ +NS_IMETHODIMP nsSHistoryListener::OnHistoryGoForward(nsIURI *aForwardURI, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean OnHistoryReload (in nsIURI aReloadURI, in unsigned long aReloadFlags); */ +NS_IMETHODIMP nsSHistoryListener::OnHistoryReload(nsIURI *aReloadURI, PRUint32 aReloadFlags, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean OnHistoryGotoIndex (in long aIndex, in nsIURI aGotoURI); */ +NS_IMETHODIMP nsSHistoryListener::OnHistoryGotoIndex(PRInt32 aIndex, nsIURI *aGotoURI, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean OnHistoryPurge (in long aNumEntries); */ +NS_IMETHODIMP nsSHistoryListener::OnHistoryPurge(PRInt32 aNumEntries, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsISHistoryListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIScriptableInputStream.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIScriptableInputStream.h new file mode 100644 index 00000000..bb1e276c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIScriptableInputStream.h @@ -0,0 +1,147 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/io/nsIScriptableInputStream.idl + */ + +#ifndef __gen_nsIScriptableInputStream_h__ +#define __gen_nsIScriptableInputStream_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIInputStream; /* forward declaration */ + + +/* starting interface: nsIScriptableInputStream */ +#define NS_ISCRIPTABLEINPUTSTREAM_IID_STR "a2a32f90-9b90-11d3-a189-0050041caf44" + +#define NS_ISCRIPTABLEINPUTSTREAM_IID \ + {0xa2a32f90, 0x9b90, 0x11d3, \ + { 0xa1, 0x89, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44 }} + +/** + * nsIScriptableInputStream provides scriptable access to the nsIInputStream. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIScriptableInputStream : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEINPUTSTREAM_IID) + + /** + * Closes the stream. + */ + /* void close (); */ + NS_IMETHOD Close(void) = 0; + + /** Wrap the given nsIInputStream with this nsIScriptableInputStream. + * @param aInputStream [in] parameter providing the stream to wrap + */ + /* void init (in nsIInputStream aInputStream); */ + NS_IMETHOD Init(nsIInputStream *aInputStream) = 0; + + /** Return the number of bytes currently available in the stream + * @param _retval [out] parameter to hold the number of bytes + * if an error occurs, the parameter will be undefined + * @return error status + */ + /* unsigned long available (); */ + NS_IMETHOD Available(PRUint32 *_retval) = 0; + + /** Read data from the stream. + * @param aCount [in] the maximum number of bytes to read + * @param _retval [out] the data + */ + /* string read (in unsigned long aCount); */ + NS_IMETHOD Read(PRUint32 aCount, char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISCRIPTABLEINPUTSTREAM \ + NS_IMETHOD Close(void); \ + NS_IMETHOD Init(nsIInputStream *aInputStream); \ + NS_IMETHOD Available(PRUint32 *_retval); \ + NS_IMETHOD Read(PRUint32 aCount, char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISCRIPTABLEINPUTSTREAM(_to) \ + NS_IMETHOD Close(void) { return _to Close(); } \ + NS_IMETHOD Init(nsIInputStream *aInputStream) { return _to Init(aInputStream); } \ + NS_IMETHOD Available(PRUint32 *_retval) { return _to Available(_retval); } \ + NS_IMETHOD Read(PRUint32 aCount, char **_retval) { return _to Read(aCount, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISCRIPTABLEINPUTSTREAM(_to) \ + NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \ + NS_IMETHOD Init(nsIInputStream *aInputStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aInputStream); } \ + NS_IMETHOD Available(PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Available(_retval); } \ + NS_IMETHOD Read(PRUint32 aCount, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Read(aCount, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsScriptableInputStream : public nsIScriptableInputStream +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISCRIPTABLEINPUTSTREAM + + nsScriptableInputStream(); + +private: + ~nsScriptableInputStream(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsScriptableInputStream, nsIScriptableInputStream) + +nsScriptableInputStream::nsScriptableInputStream() +{ + /* member initializers and constructor code */ +} + +nsScriptableInputStream::~nsScriptableInputStream() +{ + /* destructor code */ +} + +/* void close (); */ +NS_IMETHODIMP nsScriptableInputStream::Close() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void init (in nsIInputStream aInputStream); */ +NS_IMETHODIMP nsScriptableInputStream::Init(nsIInputStream *aInputStream) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* unsigned long available (); */ +NS_IMETHODIMP nsScriptableInputStream::Available(PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string read (in unsigned long aCount); */ +NS_IMETHODIMP nsScriptableInputStream::Read(PRUint32 aCount, char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIScriptableInputStream_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISecurityWarningDialogs.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISecurityWarningDialogs.h new file mode 100644 index 00000000..ca995bea --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISecurityWarningDialogs.h @@ -0,0 +1,215 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/boot/public/nsISecurityWarningDialogs.idl + */ + +#ifndef __gen_nsISecurityWarningDialogs_h__ +#define __gen_nsISecurityWarningDialogs_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIInterfaceRequestor; /* forward declaration */ + + +/* starting interface: nsISecurityWarningDialogs */ +#define NS_ISECURITYWARNINGDIALOGS_IID_STR "1c399d06-1dd2-11b2-bc58-c87cbcacdb78" + +#define NS_ISECURITYWARNINGDIALOGS_IID \ + {0x1c399d06, 0x1dd2, 0x11b2, \ + { 0xbc, 0x58, 0xc8, 0x7c, 0xbc, 0xac, 0xdb, 0x78 }} + +/** + * Functions that display warnings for transitions between secure + * and insecure pages, posts to insecure servers etc. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISecurityWarningDialogs : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISECURITYWARNINGDIALOGS_IID) + + /** + * Inform the user that a transition + * from an insecure page + * to a secure page + * is happening. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to continue + */ + /* boolean confirmEnteringSecure (in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ConfirmEnteringSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) = 0; + + /** + * Inform the user that a transition + * from an insecure page + * or from a secure page + * to a weak security page + * is happening. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to continue + */ + /* boolean confirmEnteringWeak (in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ConfirmEnteringWeak(nsIInterfaceRequestor *ctx, PRBool *_retval) = 0; + + /** + * Inform the user that a transition + * from a secure page + * to an insecure page + * is happening. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to continue + */ + /* boolean confirmLeavingSecure (in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ConfirmLeavingSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) = 0; + + /** + * Inform the user the currently displayed page + * contains some secure and some insecure page components. + * + * @param ctx A user interface context. + * + * @return true if the user decides to show insecure objects. + */ + /* boolean confirmMixedMode (in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ConfirmMixedMode(nsIInterfaceRequestor *ctx, PRBool *_retval) = 0; + + /** + * Inform the user that information is being submitted + * to an insecure page. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to submit. + */ + /* boolean confirmPostToInsecure (in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ConfirmPostToInsecure(nsIInterfaceRequestor *ctx, PRBool *_retval) = 0; + + /** + * Inform the user: Although the currently displayed + * page was loaded using a secure connection, and the UI probably + * currently indicates a secure page, + * that information is being submitted to an insecure page. + * + * @param ctx A user interface context. + * + * @return true if the user confirms to submit. + */ + /* boolean confirmPostToInsecureFromSecure (in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISECURITYWARNINGDIALOGS \ + NS_IMETHOD ConfirmEnteringSecure(nsIInterfaceRequestor *ctx, PRBool *_retval); \ + NS_IMETHOD ConfirmEnteringWeak(nsIInterfaceRequestor *ctx, PRBool *_retval); \ + NS_IMETHOD ConfirmLeavingSecure(nsIInterfaceRequestor *ctx, PRBool *_retval); \ + NS_IMETHOD ConfirmMixedMode(nsIInterfaceRequestor *ctx, PRBool *_retval); \ + NS_IMETHOD ConfirmPostToInsecure(nsIInterfaceRequestor *ctx, PRBool *_retval); \ + NS_IMETHOD ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISECURITYWARNINGDIALOGS(_to) \ + NS_IMETHOD ConfirmEnteringSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) { return _to ConfirmEnteringSecure(ctx, _retval); } \ + NS_IMETHOD ConfirmEnteringWeak(nsIInterfaceRequestor *ctx, PRBool *_retval) { return _to ConfirmEnteringWeak(ctx, _retval); } \ + NS_IMETHOD ConfirmLeavingSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) { return _to ConfirmLeavingSecure(ctx, _retval); } \ + NS_IMETHOD ConfirmMixedMode(nsIInterfaceRequestor *ctx, PRBool *_retval) { return _to ConfirmMixedMode(ctx, _retval); } \ + NS_IMETHOD ConfirmPostToInsecure(nsIInterfaceRequestor *ctx, PRBool *_retval) { return _to ConfirmPostToInsecure(ctx, _retval); } \ + NS_IMETHOD ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) { return _to ConfirmPostToInsecureFromSecure(ctx, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISECURITYWARNINGDIALOGS(_to) \ + NS_IMETHOD ConfirmEnteringSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmEnteringSecure(ctx, _retval); } \ + NS_IMETHOD ConfirmEnteringWeak(nsIInterfaceRequestor *ctx, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmEnteringWeak(ctx, _retval); } \ + NS_IMETHOD ConfirmLeavingSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmLeavingSecure(ctx, _retval); } \ + NS_IMETHOD ConfirmMixedMode(nsIInterfaceRequestor *ctx, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmMixedMode(ctx, _retval); } \ + NS_IMETHOD ConfirmPostToInsecure(nsIInterfaceRequestor *ctx, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmPostToInsecure(ctx, _retval); } \ + NS_IMETHOD ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmPostToInsecureFromSecure(ctx, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSecurityWarningDialogs : public nsISecurityWarningDialogs +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISECURITYWARNINGDIALOGS + + nsSecurityWarningDialogs(); + +private: + ~nsSecurityWarningDialogs(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSecurityWarningDialogs, nsISecurityWarningDialogs) + +nsSecurityWarningDialogs::nsSecurityWarningDialogs() +{ + /* member initializers and constructor code */ +} + +nsSecurityWarningDialogs::~nsSecurityWarningDialogs() +{ + /* destructor code */ +} + +/* boolean confirmEnteringSecure (in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsSecurityWarningDialogs::ConfirmEnteringSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirmEnteringWeak (in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsSecurityWarningDialogs::ConfirmEnteringWeak(nsIInterfaceRequestor *ctx, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirmLeavingSecure (in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsSecurityWarningDialogs::ConfirmLeavingSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirmMixedMode (in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsSecurityWarningDialogs::ConfirmMixedMode(nsIInterfaceRequestor *ctx, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirmPostToInsecure (in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsSecurityWarningDialogs::ConfirmPostToInsecure(nsIInterfaceRequestor *ctx, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean confirmPostToInsecureFromSecure (in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsSecurityWarningDialogs::ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_SECURITYWARNINGDIALOGS_CONTRACTID "@mozilla.org/nsSecurityWarningDialogs;1" + +#endif /* __gen_nsISecurityWarningDialogs_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISelection.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISelection.h new file mode 100644 index 00000000..09b4c32d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISelection.h @@ -0,0 +1,392 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/content/base/public/nsISelection.idl + */ + +#ifndef __gen_nsISelection_h__ +#define __gen_nsISelection_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMNode; /* forward declaration */ + +class nsIDOMRange; /* forward declaration */ + + +/* starting interface: nsISelection */ +#define NS_ISELECTION_IID_STR "b2c7ed59-8634-4352-9e37-5484c8b6e4e1" + +#define NS_ISELECTION_IID \ + {0xb2c7ed59, 0x8634, 0x4352, \ + { 0x9e, 0x37, 0x54, 0x84, 0xc8, 0xb6, 0xe4, 0xe1 }} + +/** + * Interface for manipulating and querying the current selected range + * of nodes within the document. + * + * @status FROZEN + * @version 1.0 + */ +class NS_NO_VTABLE nsISelection : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISELECTION_IID) + + /** + * The node representing one end of the selection. + */ + /* readonly attribute nsIDOMNode anchorNode; */ + NS_IMETHOD GetAnchorNode(nsIDOMNode * *aAnchorNode) = 0; + + /** + * The offset within the (text) node where the selection begins. + */ + /* readonly attribute long anchorOffset; */ + NS_IMETHOD GetAnchorOffset(PRInt32 *aAnchorOffset) = 0; + + /** + * The node with keyboard focus. + */ + /* readonly attribute nsIDOMNode focusNode; */ + NS_IMETHOD GetFocusNode(nsIDOMNode * *aFocusNode) = 0; + + /** + * The offset within the (text) node where focus starts. + */ + /* readonly attribute long focusOffset; */ + NS_IMETHOD GetFocusOffset(PRInt32 *aFocusOffset) = 0; + + /** + * Indicates if the selection is collapsed or not. + */ + /* readonly attribute boolean isCollapsed; */ + NS_IMETHOD GetIsCollapsed(PRBool *aIsCollapsed) = 0; + + /** + * Returns the number of ranges in the selection. + */ + /* readonly attribute long rangeCount; */ + NS_IMETHOD GetRangeCount(PRInt32 *aRangeCount) = 0; + + /** + * Returns the range at the specified index. + */ + /* nsIDOMRange getRangeAt (in long index); */ + NS_IMETHOD GetRangeAt(PRInt32 index, nsIDOMRange **_retval) = 0; + + /** + * Collapses the selection to a single point, at the specified offset + * in the given DOM node. When the selection is collapsed, and the content + * is focused and editable, the caret will blink there. + * @param parentNode The given dom node where the selection will be set + * @param offset Where in given dom node to place the selection (the offset into the given node) + */ + /* void collapse (in nsIDOMNode parentNode, in long offset); */ + NS_IMETHOD Collapse(nsIDOMNode *parentNode, PRInt32 offset) = 0; + + /** + * Extends the selection by moving the focus to the specified node and offset, + * preserving the anchor postion. The new selection end result will always + * be from the anchor to the new focus, regardless of direction. + * @param parentNode The node where the selection will be extended to + * @param offset Where in node to place the offset in the new focused node + */ + /* void extend (in nsIDOMNode parentNode, in long offset); */ + NS_IMETHOD Extend(nsIDOMNode *parentNode, PRInt32 offset) = 0; + + /** + * Collapses the whole selection to a single point at the start + * of the current selection (irrespective of direction). If content + * is focused and editable, the caret will blink there. + */ + /* void collapseToStart (); */ + NS_IMETHOD CollapseToStart(void) = 0; + + /** + * Collapses the whole selection to a single point at the end + * of the current selection (irrespective of direction). If content + * is focused and editable, the caret will blink there. + */ + /* void collapseToEnd (); */ + NS_IMETHOD CollapseToEnd(void) = 0; + + /** + * The value of entirelyContained determines the detail of the search to determine if + * the selection contains the node. If entirelyContained is set to PR_TRUE, t + * or false if + * @param node The node where the selection will be extended to + * @param entirelyContained Whether + */ + /* boolean containsNode (in nsIDOMNode node, in boolean entirelyContained); */ + NS_IMETHOD ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval) = 0; + + /** + * Adds all children of the specified node to the selection. + * @param parentNode the parent of the children to be added to the selection. + */ + /* void selectAllChildren (in nsIDOMNode parentNode); */ + NS_IMETHOD SelectAllChildren(nsIDOMNode *parentNode) = 0; + + /** + * Adds a range to the current selection. + */ + /* void addRange (in nsIDOMRange range); */ + NS_IMETHOD AddRange(nsIDOMRange *range) = 0; + + /** + * Removes a range from the current selection. + */ + /* void removeRange (in nsIDOMRange range); */ + NS_IMETHOD RemoveRange(nsIDOMRange *range) = 0; + + /** + * Removes all ranges from the current selection. + */ + /* void removeAllRanges (); */ + NS_IMETHOD RemoveAllRanges(void) = 0; + + /** + * Deletes this selection from document the nodes belong to. + */ + /* void deleteFromDocument (); */ + NS_IMETHOD DeleteFromDocument(void) = 0; + + /** + * Modifies the cursor Bidi level after a change in keyboard direction + * @param langRTL is PR_TRUE if the new language is right-to-left or + * PR_FALSE if the new language is left-to-right. + */ + /* void selectionLanguageChange (in boolean langRTL); */ + NS_IMETHOD SelectionLanguageChange(PRBool langRTL) = 0; + + /** + * Returns the whole selection into a plain text string. + */ + /* wstring toString (); */ + NS_IMETHOD ToString(PRUnichar **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISELECTION \ + NS_IMETHOD GetAnchorNode(nsIDOMNode * *aAnchorNode); \ + NS_IMETHOD GetAnchorOffset(PRInt32 *aAnchorOffset); \ + NS_IMETHOD GetFocusNode(nsIDOMNode * *aFocusNode); \ + NS_IMETHOD GetFocusOffset(PRInt32 *aFocusOffset); \ + NS_IMETHOD GetIsCollapsed(PRBool *aIsCollapsed); \ + NS_IMETHOD GetRangeCount(PRInt32 *aRangeCount); \ + NS_IMETHOD GetRangeAt(PRInt32 index, nsIDOMRange **_retval); \ + NS_IMETHOD Collapse(nsIDOMNode *parentNode, PRInt32 offset); \ + NS_IMETHOD Extend(nsIDOMNode *parentNode, PRInt32 offset); \ + NS_IMETHOD CollapseToStart(void); \ + NS_IMETHOD CollapseToEnd(void); \ + NS_IMETHOD ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval); \ + NS_IMETHOD SelectAllChildren(nsIDOMNode *parentNode); \ + NS_IMETHOD AddRange(nsIDOMRange *range); \ + NS_IMETHOD RemoveRange(nsIDOMRange *range); \ + NS_IMETHOD RemoveAllRanges(void); \ + NS_IMETHOD DeleteFromDocument(void); \ + NS_IMETHOD SelectionLanguageChange(PRBool langRTL); \ + NS_IMETHOD ToString(PRUnichar **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISELECTION(_to) \ + NS_IMETHOD GetAnchorNode(nsIDOMNode * *aAnchorNode) { return _to GetAnchorNode(aAnchorNode); } \ + NS_IMETHOD GetAnchorOffset(PRInt32 *aAnchorOffset) { return _to GetAnchorOffset(aAnchorOffset); } \ + NS_IMETHOD GetFocusNode(nsIDOMNode * *aFocusNode) { return _to GetFocusNode(aFocusNode); } \ + NS_IMETHOD GetFocusOffset(PRInt32 *aFocusOffset) { return _to GetFocusOffset(aFocusOffset); } \ + NS_IMETHOD GetIsCollapsed(PRBool *aIsCollapsed) { return _to GetIsCollapsed(aIsCollapsed); } \ + NS_IMETHOD GetRangeCount(PRInt32 *aRangeCount) { return _to GetRangeCount(aRangeCount); } \ + NS_IMETHOD GetRangeAt(PRInt32 index, nsIDOMRange **_retval) { return _to GetRangeAt(index, _retval); } \ + NS_IMETHOD Collapse(nsIDOMNode *parentNode, PRInt32 offset) { return _to Collapse(parentNode, offset); } \ + NS_IMETHOD Extend(nsIDOMNode *parentNode, PRInt32 offset) { return _to Extend(parentNode, offset); } \ + NS_IMETHOD CollapseToStart(void) { return _to CollapseToStart(); } \ + NS_IMETHOD CollapseToEnd(void) { return _to CollapseToEnd(); } \ + NS_IMETHOD ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval) { return _to ContainsNode(node, entirelyContained, _retval); } \ + NS_IMETHOD SelectAllChildren(nsIDOMNode *parentNode) { return _to SelectAllChildren(parentNode); } \ + NS_IMETHOD AddRange(nsIDOMRange *range) { return _to AddRange(range); } \ + NS_IMETHOD RemoveRange(nsIDOMRange *range) { return _to RemoveRange(range); } \ + NS_IMETHOD RemoveAllRanges(void) { return _to RemoveAllRanges(); } \ + NS_IMETHOD DeleteFromDocument(void) { return _to DeleteFromDocument(); } \ + NS_IMETHOD SelectionLanguageChange(PRBool langRTL) { return _to SelectionLanguageChange(langRTL); } \ + NS_IMETHOD ToString(PRUnichar **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISELECTION(_to) \ + NS_IMETHOD GetAnchorNode(nsIDOMNode * *aAnchorNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnchorNode(aAnchorNode); } \ + NS_IMETHOD GetAnchorOffset(PRInt32 *aAnchorOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnchorOffset(aAnchorOffset); } \ + NS_IMETHOD GetFocusNode(nsIDOMNode * *aFocusNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusNode(aFocusNode); } \ + NS_IMETHOD GetFocusOffset(PRInt32 *aFocusOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusOffset(aFocusOffset); } \ + NS_IMETHOD GetIsCollapsed(PRBool *aIsCollapsed) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsCollapsed(aIsCollapsed); } \ + NS_IMETHOD GetRangeCount(PRInt32 *aRangeCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRangeCount(aRangeCount); } \ + NS_IMETHOD GetRangeAt(PRInt32 index, nsIDOMRange **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRangeAt(index, _retval); } \ + NS_IMETHOD Collapse(nsIDOMNode *parentNode, PRInt32 offset) { return !_to ? NS_ERROR_NULL_POINTER : _to->Collapse(parentNode, offset); } \ + NS_IMETHOD Extend(nsIDOMNode *parentNode, PRInt32 offset) { return !_to ? NS_ERROR_NULL_POINTER : _to->Extend(parentNode, offset); } \ + NS_IMETHOD CollapseToStart(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CollapseToStart(); } \ + NS_IMETHOD CollapseToEnd(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CollapseToEnd(); } \ + NS_IMETHOD ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ContainsNode(node, entirelyContained, _retval); } \ + NS_IMETHOD SelectAllChildren(nsIDOMNode *parentNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectAllChildren(parentNode); } \ + NS_IMETHOD AddRange(nsIDOMRange *range) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRange(range); } \ + NS_IMETHOD RemoveRange(nsIDOMRange *range) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveRange(range); } \ + NS_IMETHOD RemoveAllRanges(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAllRanges(); } \ + NS_IMETHOD DeleteFromDocument(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteFromDocument(); } \ + NS_IMETHOD SelectionLanguageChange(PRBool langRTL) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectionLanguageChange(langRTL); } \ + NS_IMETHOD ToString(PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSelection : public nsISelection +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISELECTION + + nsSelection(); + +private: + ~nsSelection(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSelection, nsISelection) + +nsSelection::nsSelection() +{ + /* member initializers and constructor code */ +} + +nsSelection::~nsSelection() +{ + /* destructor code */ +} + +/* readonly attribute nsIDOMNode anchorNode; */ +NS_IMETHODIMP nsSelection::GetAnchorNode(nsIDOMNode * *aAnchorNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long anchorOffset; */ +NS_IMETHODIMP nsSelection::GetAnchorOffset(PRInt32 *aAnchorOffset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMNode focusNode; */ +NS_IMETHODIMP nsSelection::GetFocusNode(nsIDOMNode * *aFocusNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long focusOffset; */ +NS_IMETHODIMP nsSelection::GetFocusOffset(PRInt32 *aFocusOffset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isCollapsed; */ +NS_IMETHODIMP nsSelection::GetIsCollapsed(PRBool *aIsCollapsed) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long rangeCount; */ +NS_IMETHODIMP nsSelection::GetRangeCount(PRInt32 *aRangeCount) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMRange getRangeAt (in long index); */ +NS_IMETHODIMP nsSelection::GetRangeAt(PRInt32 index, nsIDOMRange **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void collapse (in nsIDOMNode parentNode, in long offset); */ +NS_IMETHODIMP nsSelection::Collapse(nsIDOMNode *parentNode, PRInt32 offset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void extend (in nsIDOMNode parentNode, in long offset); */ +NS_IMETHODIMP nsSelection::Extend(nsIDOMNode *parentNode, PRInt32 offset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void collapseToStart (); */ +NS_IMETHODIMP nsSelection::CollapseToStart() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void collapseToEnd (); */ +NS_IMETHODIMP nsSelection::CollapseToEnd() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean containsNode (in nsIDOMNode node, in boolean entirelyContained); */ +NS_IMETHODIMP nsSelection::ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void selectAllChildren (in nsIDOMNode parentNode); */ +NS_IMETHODIMP nsSelection::SelectAllChildren(nsIDOMNode *parentNode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void addRange (in nsIDOMRange range); */ +NS_IMETHODIMP nsSelection::AddRange(nsIDOMRange *range) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeRange (in nsIDOMRange range); */ +NS_IMETHODIMP nsSelection::RemoveRange(nsIDOMRange *range) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeAllRanges (); */ +NS_IMETHODIMP nsSelection::RemoveAllRanges() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteFromDocument (); */ +NS_IMETHODIMP nsSelection::DeleteFromDocument() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void selectionLanguageChange (in boolean langRTL); */ +NS_IMETHODIMP nsSelection::SelectionLanguageChange(PRBool langRTL) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* wstring toString (); */ +NS_IMETHODIMP nsSelection::ToString(PRUnichar **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsISelection_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIServiceManager.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIServiceManager.h new file mode 100644 index 00000000..a3ff4427 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIServiceManager.h @@ -0,0 +1,178 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsIServiceManager.idl + */ + +#ifndef __gen_nsIServiceManager_h__ +#define __gen_nsIServiceManager_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIServiceManager */ +#define NS_ISERVICEMANAGER_IID_STR "8bb35ed9-e332-462d-9155-4a002ab5c958" + +#define NS_ISERVICEMANAGER_IID \ + {0x8bb35ed9, 0xe332, 0x462d, \ + { 0x91, 0x55, 0x4a, 0x00, 0x2a, 0xb5, 0xc9, 0x58 }} + +/** + * The nsIServiceManager manager interface provides a means to obtain + * global services in an application. The service manager depends on the + * repository to find and instantiate factories to obtain services. + * + * Users of the service manager must first obtain a pointer to the global + * service manager by calling NS_GetServiceManager. After that, + * they can request specific services by calling GetService. When they are + * finished they can NS_RELEASE() the service as usual. + * + * A user of a service may keep references to particular services indefinitely + * and only must call Release when it shuts down. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIServiceManager : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISERVICEMANAGER_IID) + + /** + * 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); */ + NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result) = 0; + + /* void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ + NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) = 0; + + /** + * 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); */ + NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval) = 0; + + /* boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID); */ + NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISERVICEMANAGER \ + NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result); \ + NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result); \ + NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval); \ + NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISERVICEMANAGER(_to) \ + NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result) { return _to GetService(aClass, aIID, result); } \ + NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return _to GetServiceByContractID(aContractID, aIID, result); } \ + NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval) { return _to IsServiceInstantiated(aClass, aIID, _retval); } \ + NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval) { return _to IsServiceInstantiatedByContractID(aContractID, aIID, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISERVICEMANAGER(_to) \ + NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetService(aClass, aIID, result); } \ + NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceByContractID(aContractID, aIID, result); } \ + NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsServiceInstantiated(aClass, aIID, _retval); } \ + NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsServiceInstantiatedByContractID(aContractID, aIID, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsServiceManager : public nsIServiceManager +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISERVICEMANAGER + + nsServiceManager(); + +private: + ~nsServiceManager(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsServiceManager, nsIServiceManager) + +nsServiceManager::nsServiceManager() +{ + /* member initializers and constructor code */ +} + +nsServiceManager::~nsServiceManager() +{ + /* destructor code */ +} + +/* void getService (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsServiceManager::GetService(const nsCID & aClass, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsServiceManager::GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isServiceInstantiated (in nsCIDRef aClass, in nsIIDRef aIID); */ +NS_IMETHODIMP nsServiceManager::IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID); */ +NS_IMETHODIMP nsServiceManager::IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_ERROR_SERVICE_NOT_AVAILABLE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 22) +/** + * @status DEPRECATED + */ +#define NS_ERROR_SERVICE_NOT_FOUND NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 22) +/** + * @status DEPRECATED + */ +#define NS_ERROR_SERVICE_IN_USE NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 23) +// Observing xpcom autoregistration. Topics will be 'start' and 'stop'. +#define NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID "xpcom-autoregistration" +#ifdef MOZILLA_INTERNAL_API +#include "nsXPCOM.h" +#include "nsServiceManagerUtils.h" +#include "nsIServiceManagerObsolete.h" +#endif + +#endif /* __gen_nsIServiceManager_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISimpleEnumerator.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISimpleEnumerator.h new file mode 100644 index 00000000..0b133ef9 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISimpleEnumerator.h @@ -0,0 +1,136 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/ds/nsISimpleEnumerator.idl + */ + +#ifndef __gen_nsISimpleEnumerator_h__ +#define __gen_nsISimpleEnumerator_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsISimpleEnumerator */ +#define NS_ISIMPLEENUMERATOR_IID_STR "d1899240-f9d2-11d2-bdd6-000064657374" + +#define NS_ISIMPLEENUMERATOR_IID \ + {0xd1899240, 0xf9d2, 0x11d2, \ + { 0xbd, 0xd6, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }} + +/** + * Used to enumerate over elements defined by its implementor. + * Although hasMoreElements() can be called independently of getNext(), + * getNext() must be pre-ceeded by a call to hasMoreElements(). There is + * no way to "reset" an enumerator, once you obtain one. + * + * @status FROZEN + * @version 1.0 + */ +class NS_NO_VTABLE nsISimpleEnumerator : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISIMPLEENUMERATOR_IID) + + /** + * 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) = 0; + + /** + * 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) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISIMPLEENUMERATOR \ + NS_IMETHOD HasMoreElements(PRBool *_retval); \ + NS_IMETHOD GetNext(nsISupports **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISIMPLEENUMERATOR(_to) \ + NS_IMETHOD HasMoreElements(PRBool *_retval) { return _to HasMoreElements(_retval); } \ + NS_IMETHOD GetNext(nsISupports **_retval) { return _to GetNext(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISIMPLEENUMERATOR(_to) \ + NS_IMETHOD HasMoreElements(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasMoreElements(_retval); } \ + NS_IMETHOD GetNext(nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNext(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSimpleEnumerator : public nsISimpleEnumerator +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISIMPLEENUMERATOR + + nsSimpleEnumerator(); + +private: + ~nsSimpleEnumerator(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSimpleEnumerator, nsISimpleEnumerator) + +nsSimpleEnumerator::nsSimpleEnumerator() +{ + /* member initializers and constructor code */ +} + +nsSimpleEnumerator::~nsSimpleEnumerator() +{ + /* destructor code */ +} + +/* boolean hasMoreElements (); */ +NS_IMETHODIMP nsSimpleEnumerator::HasMoreElements(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISupports getNext (); */ +NS_IMETHODIMP nsSimpleEnumerator::GetNext(nsISupports **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsISimpleEnumerator_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIStreamListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIStreamListener.h new file mode 100644 index 00000000..67243286 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIStreamListener.h @@ -0,0 +1,112 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIStreamListener.idl + */ + +#ifndef __gen_nsIStreamListener_h__ +#define __gen_nsIStreamListener_h__ + + +#ifndef __gen_nsIRequestObserver_h__ +#include "nsIRequestObserver.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIInputStream; /* forward declaration */ + + +/* starting interface: nsIStreamListener */ +#define NS_ISTREAMLISTENER_IID_STR "1a637020-1482-11d3-9333-00104ba0fd40" + +#define NS_ISTREAMLISTENER_IID \ + {0x1a637020, 0x1482, 0x11d3, \ + { 0x93, 0x33, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }} + +/** + * nsIStreamListener + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIStreamListener : public nsIRequestObserver { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTREAMLISTENER_IID) + + /** + * 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 + * + * NOTE: The aInputStream parameter must implement readSegments. + * + * 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) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISTREAMLISTENER \ + NS_IMETHOD OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext, nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISTREAMLISTENER(_to) \ + NS_IMETHOD OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext, nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount) { return _to OnDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISTREAMLISTENER(_to) \ + NS_IMETHOD OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext, nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsStreamListener : public nsIStreamListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISTREAMLISTENER + + nsStreamListener(); + +private: + ~nsStreamListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsStreamListener, nsIStreamListener) + +nsStreamListener::nsStreamListener() +{ + /* member initializers and constructor code */ +} + +nsStreamListener::~nsStreamListener() +{ + /* destructor code */ +} + +/* void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long aOffset, in unsigned long aCount); */ +NS_IMETHODIMP nsStreamListener::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext, nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIStreamListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISupports.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISupports.h new file mode 100644 index 00000000..83174899 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISupports.h @@ -0,0 +1,123 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsISupports.idl + */ + +#ifndef __gen_nsISupports_h__ +#define __gen_nsISupports_h__ + + +#ifndef __gen_nsrootidl_h__ +#include "nsrootidl.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +/* + * Start commenting out the C++ versions of the below in the output header + */ +#if 0 + +/* starting interface: nsISupports */ +#define NS_ISUPPORTS_IID_STR "00000000-0000-0000-c000-000000000046" + +#define NS_ISUPPORTS_IID \ + {0x00000000, 0x0000, 0x0000, \ + { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} + +class NS_NO_VTABLE nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTS_IID) + + /* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ + NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) = 0; + + /* [noscript, notxpcom] nsrefcnt AddRef (); */ + NS_IMETHOD_(nsrefcnt) AddRef(void) = 0; + + /* [noscript, notxpcom] nsrefcnt Release (); */ + NS_IMETHOD_(nsrefcnt) Release(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTS \ + NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result); \ + NS_IMETHOD_(nsrefcnt) AddRef(void); \ + NS_IMETHOD_(nsrefcnt) Release(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTS(_to) \ + NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return _to QueryInterface(uuid, result); } \ + NS_IMETHOD_(nsrefcnt) AddRef(void) { return _to AddRef(); } \ + NS_IMETHOD_(nsrefcnt) Release(void) { return _to Release(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTS(_to) \ + NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryInterface(uuid, result); } \ + NS_IMETHOD_(nsrefcnt) AddRef(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRef(); } \ + NS_IMETHOD_(nsrefcnt) Release(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Release(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupports : public nsISupports +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTS + + nsSupports(); + +private: + ~nsSupports(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupports, nsISupports) + +nsSupports::nsSupports() +{ + /* member initializers and constructor code */ +} + +nsSupports::~nsSupports() +{ + /* destructor code */ +} + +/* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ +NS_IMETHODIMP nsSupports::QueryInterface(const nsIID & uuid, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript, notxpcom] nsrefcnt AddRef (); */ +NS_IMETHODIMP_(nsrefcnt) nsSupports::AddRef() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript, notxpcom] nsrefcnt Release (); */ +NS_IMETHODIMP_(nsrefcnt) nsSupports::Release() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +/* + * End commenting out the C++ versions of the above in the output header + */ +#endif +#include "nsISupportsBase.h" +#include "nsISupportsUtils.h" + +#endif /* __gen_nsISupports_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsBase.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsBase.h new file mode 100644 index 00000000..bea876f5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsBase.h @@ -0,0 +1,119 @@ +/* ***** 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 XPCOM. + * + * The Initial Developer of the Original Code is Netscape Communications Corp. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nsISupportsBase_h__ +#define nsISupportsBase_h__ + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +#ifndef nsID_h__ +#include "nsID.h" +#endif + + +/*@{*/ +/** + * IID for the nsISupports interface + * {00000000-0000-0000-c000-000000000046} + * + * To maintain binary compatibility with COM's IUnknown, we define the IID + * of nsISupports to be the same as that of COM's IUnknown. + */ +#define NS_ISUPPORTS_IID \ + { 0x00000000, 0x0000, 0x0000, \ + {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} } + +/** + * Reference count values + * + * This is the return type for AddRef() and Release() in nsISupports. + * IUnknown of COM returns an unsigned long from equivalent functions. + * The following ifdef exists to maintain binary compatibility with + * IUnknown. + */ +#if defined(XP_WIN) && PR_BYTES_PER_LONG == 4 +typedef unsigned long nsrefcnt; +#else +typedef PRUint32 nsrefcnt; +#endif + +/** + * Basic component object model interface. Objects which implement + * this interface support runtime interface discovery (QueryInterface) + * and a reference counted memory model (AddRef/Release). This is + * modelled after the win32 IUnknown API. + */ +class NS_NO_VTABLE nsISupports { +public: + + /** + * @name Methods + */ + + //@{ + /** + * 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 <b>NS_OK</b> if the interface is supported by the associated + * instance, <b>NS_NOINTERFACE</b> if it is not. + * <b>NS_ERROR_INVALID_POINTER</b> if <i>aInstancePtr</i> is <b>NULL</b>. + */ + NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) = 0; + /** + * 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. + */ + NS_IMETHOD_(nsrefcnt) AddRef(void) = 0; + + /** + * 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. + */ + NS_IMETHOD_(nsrefcnt) Release(void) = 0; + + //@} +}; +/*@}*/ +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsImpl.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsImpl.h new file mode 100644 index 00000000..9085a148 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsImpl.h @@ -0,0 +1,1183 @@ +/* ***** 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 XPCOM. + * + * The Initial Developer of the Original Code is Netscape Communications Corp. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + + +#ifndef nsISupportsImpl_h__ +#define nsISupportsImpl_h__ + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +#ifndef nsISupportsBase_h__ +#include "nsISupportsBase.h" +#endif + +#if defined(XPCOM_GLUE) && !defined(XPCOM_GLUE_USE_NSPR) +// If we're being linked as standalone glue, we don't want a dynamic dependency +// on NSPR libs, so we skip the debug thread-safety checks, and we cannot use +// the THREADSAFE_ISUPPORTS macros. + +#define XPCOM_GLUE_AVOID_NSPR + +#endif + + +#if !defined(XPCOM_GLUE_AVOID_NSPR) +#include "prthread.h" /* needed for thread-safety checks */ +#include "pratom.h" /* needed for PR_AtomicIncrement and PR_AtomicDecrement */ +#endif + +#include "nsDebug.h" +#include "nsTraceRefcnt.h" + +//////////////////////////////////////////////////////////////////////////////// +// Macros to help detect thread-safety: + +#if defined(NS_DEBUG) && !defined(XPCOM_GLUE_AVOID_NSPR) + +class nsAutoOwningThread { +public: + nsAutoOwningThread() { mThread = PR_GetCurrentThread(); } + void *GetThread() const { return mThread; } + +private: + void *mThread; +}; + +#define NS_DECL_OWNINGTHREAD nsAutoOwningThread _mOwningThread; +#define NS_ASSERT_OWNINGTHREAD(_class) \ + NS_CheckThreadSafe(_mOwningThread.GetThread(), #_class " not thread-safe") + +#else // !NS_DEBUG + +#define NS_DECL_OWNINGTHREAD /* nothing */ +#define NS_ASSERT_OWNINGTHREAD(_class) ((void)0) + +#endif // NS_DEBUG + +class nsAutoRefCnt { + + public: + nsAutoRefCnt() : mValue(0) {} + nsAutoRefCnt(nsrefcnt aValue) : mValue(aValue) {} + + // only support prefix increment/decrement + nsrefcnt operator++() { return ++mValue; } + nsrefcnt operator--() { return --mValue; } + + nsrefcnt operator=(nsrefcnt aValue) { return (mValue = aValue); } + operator nsrefcnt() const { return mValue; } + nsrefcnt get() const { return mValue; } + private: + // do not define these to enforce the faster prefix notation + nsrefcnt operator++(int); + nsrefcnt operator--(int); + nsrefcnt mValue; +}; + +/////////////////////////////////////////////////////////////////////////////// + +/** + * Declare the reference count variable and the implementations of the + * AddRef and QueryInterface methods. + */ + +#define NS_DECL_ISUPPORTS \ +public: \ + NS_IMETHOD QueryInterface(REFNSIID aIID, \ + void** aInstancePtr); \ + NS_IMETHOD_(nsrefcnt) AddRef(void); \ + NS_IMETHOD_(nsrefcnt) Release(void); \ +protected: \ + nsAutoRefCnt mRefCnt; \ + NS_DECL_OWNINGTHREAD \ +public: + + +/////////////////////////////////////////////////////////////////////////////// + +/** + * Previously used to initialize the reference count, but no longer needed. + * + * DEPRECATED. + */ +#define NS_INIT_ISUPPORTS() ((void)0) + +/** + * Use this macro to implement the AddRef method for a given <i>_class</i> + * @param _class The name of the class implementing the method + */ +#define NS_IMPL_ADDREF(_class) \ +NS_IMETHODIMP_(nsrefcnt) _class::AddRef(void) \ +{ \ + NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt"); \ + NS_ASSERT_OWNINGTHREAD(_class); \ + ++mRefCnt; \ + NS_LOG_ADDREF(this, mRefCnt, #_class, sizeof(*this)); \ + return mRefCnt; \ +} + +/** + * Use this macro to implement the AddRef method for a given <i>_class</i> + * implemented as a wholly owned aggregated object intended to implement + * interface(s) for its owner + * @param _class The name of the class implementing the method + * @param _aggregator the owning/containing object + */ +#define NS_IMPL_ADDREF_USING_AGGREGATOR(_class, _aggregator) \ +NS_IMETHODIMP_(nsrefcnt) _class::AddRef(void) \ +{ \ + NS_PRECONDITION(_aggregator, "null aggregator"); \ + return (_aggregator)->AddRef(); \ +} + +/** + * Use this macro to implement the Release method for a given + * <i>_class</i>. + * @param _class The name of the class implementing the method + * @param _destroy A statement that is executed when the object's + * refcount drops to zero. + * + * For example, + * + * NS_IMPL_RELEASE_WITH_DESTROY(Foo, Destroy(this)) + * + * will cause + * + * Destroy(this); + * + * to be invoked when the object's refcount drops to zero. This + * allows for arbitrary teardown activity to occur (e.g., deallocation + * of object allocated with placement new). + */ +#define NS_IMPL_RELEASE_WITH_DESTROY(_class, _destroy) \ +NS_IMETHODIMP_(nsrefcnt) _class::Release(void) \ +{ \ + NS_PRECONDITION(0 != mRefCnt, "dup release"); \ + NS_ASSERT_OWNINGTHREAD(_class); \ + --mRefCnt; \ + NS_LOG_RELEASE(this, mRefCnt, #_class); \ + if (mRefCnt == 0) { \ + mRefCnt = 1; /* stabilize */ \ + _destroy; \ + return 0; \ + } \ + return mRefCnt; \ +} + +/** + * Use this macro to implement the Release method for a given <i>_class</i> + * @param _class The name of the class implementing the method + * + * A note on the 'stabilization' of the refcnt to one. At that point, + * the object's refcount will have gone to zero. The object's + * destructor may trigger code that attempts to QueryInterface() and + * Release() 'this' again. Doing so will temporarily increment and + * decrement the refcount. (Only a logic error would make one try to + * keep a permanent hold on 'this'.) To prevent re-entering the + * destructor, we make sure that no balanced refcounting can return + * the refcount to |0|. + */ +#define NS_IMPL_RELEASE(_class) \ + NS_IMPL_RELEASE_WITH_DESTROY(_class, NS_DELETEXPCOM(this)) + +/** + * Use this macro to implement the Release method for a given <i>_class</i> + * implemented as a wholly owned aggregated object intended to implement + * interface(s) for its owner + * @param _class The name of the class implementing the method + * @param _aggregator the owning/containing object + */ +#define NS_IMPL_RELEASE_USING_AGGREGATOR(_class, _aggregator) \ +NS_IMETHODIMP_(nsrefcnt) _class::Release(void) \ +{ \ + NS_PRECONDITION(_aggregator, "null aggregator"); \ + return (_aggregator)->Release(); \ +} + + + +/////////////////////////////////////////////////////////////////////////////// + +/* + * Some convenience macros for implementing QueryInterface + */ + +/** + * This implements query interface with two assumptions: First, the + * class in question implements nsISupports and its own interface and + * nothing else. Second, the implementation of the class's primary + * inheritance chain leads to its own interface. + * + * @param _class The name of the class implementing the method + * @param _classiiddef The name of the #define symbol that defines the IID + * for the class (e.g. NS_ISUPPORTS_IID) + */ + +#define NS_IMPL_QUERY_HEAD(_class) \ +NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \ +{ \ + NS_ASSERTION(aInstancePtr, \ + "QueryInterface requires a non-NULL destination!"); \ + nsISupports* foundInterface; + +#define NS_IMPL_QUERY_BODY(_interface) \ + if ( aIID.Equals(NS_GET_IID(_interface)) ) \ + foundInterface = NS_STATIC_CAST(_interface*, this); \ + else + +#define NS_IMPL_QUERY_BODY_CONDITIONAL(_interface, condition) \ + if ( (condition) && aIID.Equals(NS_GET_IID(_interface))) \ + foundInterface = NS_STATIC_CAST(_interface*, this); \ + else + +#define NS_IMPL_QUERY_BODY_AMBIGUOUS(_interface, _implClass) \ + if ( aIID.Equals(NS_GET_IID(_interface)) ) \ + foundInterface = NS_STATIC_CAST(_interface*, \ + NS_STATIC_CAST(_implClass*, this)); \ + else + +#define NS_IMPL_QUERY_BODY_AGGREGATED(_interface, _aggregate) \ + if ( aIID.Equals(NS_GET_IID(_interface)) ) \ + foundInterface = NS_STATIC_CAST(_interface*, _aggregate); \ + else + +#define NS_IMPL_QUERY_TAIL_GUTS \ + foundInterface = 0; \ + nsresult status; \ + if ( !foundInterface ) \ + status = NS_NOINTERFACE; \ + else \ + { \ + NS_ADDREF(foundInterface); \ + status = NS_OK; \ + } \ + *aInstancePtr = foundInterface; \ + return status; \ +} + +#define NS_IMPL_QUERY_TAIL_INHERITING(_baseclass) \ + foundInterface = 0; \ + nsresult status; \ + if ( !foundInterface ) \ + status = _baseclass::QueryInterface(aIID, (void**)&foundInterface); \ + else \ + { \ + NS_ADDREF(foundInterface); \ + status = NS_OK; \ + } \ + *aInstancePtr = foundInterface; \ + return status; \ +} + +#define NS_IMPL_QUERY_TAIL_USING_AGGREGATOR(_aggregator) \ + foundInterface = 0; \ + nsresult status; \ + if ( !foundInterface ) { \ + NS_ASSERTION(_aggregator, "null aggregator"); \ + status = _aggregator->QueryInterface(aIID, (void**)&foundInterface); \ + } else \ + { \ + NS_ADDREF(foundInterface); \ + status = NS_OK; \ + } \ + *aInstancePtr = foundInterface; \ + return status; \ +} + +#define NS_IMPL_QUERY_TAIL(_supports_interface) \ + NS_IMPL_QUERY_BODY_AMBIGUOUS(nsISupports, _supports_interface) \ + NS_IMPL_QUERY_TAIL_GUTS + + + /* + This is the new scheme. Using this notation now will allow us to switch to + a table driven mechanism when it's ready. Note the difference between this + and the (currently) underlying NS_IMPL_QUERY_INTERFACE mechanism. You must + explicitly mention |nsISupports| when using the interface maps. + */ +#define NS_INTERFACE_MAP_BEGIN(_implClass) NS_IMPL_QUERY_HEAD(_implClass) +#define NS_INTERFACE_MAP_ENTRY(_interface) NS_IMPL_QUERY_BODY(_interface) +#define NS_INTERFACE_MAP_ENTRY_CONDITIONAL(_interface, condition) \ + NS_IMPL_QUERY_BODY_CONDITIONAL(_interface, condition) +#define NS_INTERFACE_MAP_ENTRY_AGGREGATED(_interface,_aggregate) \ + NS_IMPL_QUERY_BODY_AGGREGATED(_interface,_aggregate) + +#define NS_INTERFACE_MAP_END NS_IMPL_QUERY_TAIL_GUTS +#define NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_interface, _implClass) \ + NS_IMPL_QUERY_BODY_AMBIGUOUS(_interface, _implClass) +#define NS_INTERFACE_MAP_END_INHERITING(_baseClass) \ + NS_IMPL_QUERY_TAIL_INHERITING(_baseClass) +#define NS_INTERFACE_MAP_END_AGGREGATED(_aggregator) \ + NS_IMPL_QUERY_TAIL_USING_AGGREGATOR(_aggregator) + +#define NS_IMPL_QUERY_INTERFACE0(_class) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(nsISupports) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE1(_class, _i1) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE2(_class, _i1, _i2) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE3(_class, _i1, _i2, _i3) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE4(_class, _i1, _i2, _i3, _i4) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE5(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE8(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE9(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE10(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY(_i10) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE11(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY(_i10) \ + NS_INTERFACE_MAP_ENTRY(_i11) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + + +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE0 NS_IMPL_QUERY_INTERFACE0 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1 NS_IMPL_QUERY_INTERFACE1 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2 NS_IMPL_QUERY_INTERFACE2 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3 NS_IMPL_QUERY_INTERFACE3 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4 NS_IMPL_QUERY_INTERFACE4 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE5 NS_IMPL_QUERY_INTERFACE5 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE6 NS_IMPL_QUERY_INTERFACE6 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE7 NS_IMPL_QUERY_INTERFACE7 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE8 NS_IMPL_QUERY_INTERFACE8 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE9 NS_IMPL_QUERY_INTERFACE9 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE10 NS_IMPL_QUERY_INTERFACE10 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE11 NS_IMPL_QUERY_INTERFACE11 + +/** + * Declare that you're going to inherit from something that already + * implements nsISupports, but also implements an additional interface, thus + * causing an ambiguity. In this case you don't need another mRefCnt, you + * just need to forward the definitions to the appropriate superclass. E.g. + * + * class Bar : public Foo, public nsIBar { // both provide nsISupports + * public: + * NS_DECL_ISUPPORTS_INHERITED + * ...other nsIBar and Bar methods... + * }; + */ +#define NS_DECL_ISUPPORTS_INHERITED \ +public: \ + NS_IMETHOD QueryInterface(REFNSIID aIID, \ + void** aInstancePtr); \ + NS_IMETHOD_(nsrefcnt) AddRef(void); \ + NS_IMETHOD_(nsrefcnt) Release(void); \ + +/** + * These macros can be used in conjunction with NS_DECL_ISUPPORTS_INHERITED + * to implement the nsISupports methods, forwarding the invocations to a + * superclass that already implements nsISupports. + * + * Note that I didn't make these inlined because they're virtual methods. + */ + +#define NS_IMPL_ADDREF_INHERITED(Class, Super) \ +NS_IMETHODIMP_(nsrefcnt) Class::AddRef(void) \ +{ \ + return Super::AddRef(); \ +} \ + +#define NS_IMPL_RELEASE_INHERITED(Class, Super) \ +NS_IMETHODIMP_(nsrefcnt) Class::Release(void) \ +{ \ + return Super::Release(); \ +} \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED0(Class, Super) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED1(Class, Super, i1) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED2(Class, Super, i1, i2) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED3(Class, Super, i1, i2, i3) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_BODY(i3) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED4(Class, Super, i1, i2, i3, i4) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_BODY(i3) \ + NS_IMPL_QUERY_BODY(i4) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED5(Class,Super,i1,i2,i3,i4,i5) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_BODY(i3) \ + NS_IMPL_QUERY_BODY(i4) \ + NS_IMPL_QUERY_BODY(i5) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED6(Class,Super,i1,i2,i3,i4,i5,i6) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_BODY(i3) \ + NS_IMPL_QUERY_BODY(i4) \ + NS_IMPL_QUERY_BODY(i5) \ + NS_IMPL_QUERY_BODY(i6) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +/** + * Convenience macros for implementing all nsISupports methods for + * a simple class. + * @param _class The name of the class implementing the method + * @param _classiiddef The name of the #define symbol that defines the IID + * for the class (e.g. NS_ISUPPORTS_IID) + */ + +#define NS_IMPL_ISUPPORTS0(_class) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE0(_class) + +#define NS_IMPL_ISUPPORTS1(_class, _interface) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE1(_class, _interface) + +#define NS_IMPL_ISUPPORTS2(_class, _i1, _i2) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE2(_class, _i1, _i2) + +#define NS_IMPL_ISUPPORTS3(_class, _i1, _i2, _i3) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE3(_class, _i1, _i2, _i3) + +#define NS_IMPL_ISUPPORTS4(_class, _i1, _i2, _i3, _i4) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE4(_class, _i1, _i2, _i3, _i4) + +#define NS_IMPL_ISUPPORTS5(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE5(_class, _i1, _i2, _i3, _i4, _i5) + +#define NS_IMPL_ISUPPORTS6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE6(_class, _i1, _i2, _i3, _i4, _i5, _i6) + +#define NS_IMPL_ISUPPORTS7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) + +#define NS_IMPL_ISUPPORTS8(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE8(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) + +#define NS_IMPL_ISUPPORTS9(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE9(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, _i9) + +#define NS_IMPL_ISUPPORTS10(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9, _i10) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE10(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9, _i10) + +#define NS_IMPL_ISUPPORTS11(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9, _i10, _i11) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE11(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9, _i10, _i11) + +#define NS_IMPL_ISUPPORTS_INHERITED0(Class, Super) \ + NS_IMPL_QUERY_INTERFACE_INHERITED0(Class, Super) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED1(Class, Super, i1) \ + NS_IMPL_QUERY_INTERFACE_INHERITED1(Class, Super, i1) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED2(Class, Super, i1, i2) \ + NS_IMPL_QUERY_INTERFACE_INHERITED2(Class, Super, i1, i2) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED3(Class, Super, i1, i2, i3) \ + NS_IMPL_QUERY_INTERFACE_INHERITED3(Class, Super, i1, i2, i3) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED4(Class, Super, i1, i2, i3, i4) \ + NS_IMPL_QUERY_INTERFACE_INHERITED4(Class, Super, i1, i2, i3, i4) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED5(Class, Super, i1, i2, i3, i4, i5) \ + NS_IMPL_QUERY_INTERFACE_INHERITED5(Class, Super, i1, i2, i3, i4, i5) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED6(Class, Super, i1, i2, i3, i4, i5, i6) \ + NS_IMPL_QUERY_INTERFACE_INHERITED6(Class, Super, i1, i2, i3, i4, i5, i6) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +/////////////////////////////////////////////////////////////////////////////// +/** + * + * Threadsafe implementations of the ISupports convenience macros. + * + * @note These are not available when linking against the standalone glue, + * because the implementation requires PR_ symbols. + */ + +#if !defined(XPCOM_GLUE_AVOID_NSPR) + +/** + * Use this macro to implement the AddRef method for a given <i>_class</i> + * @param _class The name of the class implementing the method + */ + +#define NS_IMPL_THREADSAFE_ADDREF(_class) \ +NS_IMETHODIMP_(nsrefcnt) _class::AddRef(void) \ +{ \ + NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt"); \ + nsrefcnt count; \ + count = PR_AtomicIncrement((PRInt32*)&mRefCnt); \ + NS_LOG_ADDREF(this, count, #_class, sizeof(*this)); \ + return count; \ +} + +/** + * Use this macro to implement the Release method for a given <i>_class</i> + * @param _class The name of the class implementing the method + */ + +#define NS_IMPL_THREADSAFE_RELEASE(_class) \ +NS_IMETHODIMP_(nsrefcnt) _class::Release(void) \ +{ \ + nsrefcnt count; \ + NS_PRECONDITION(0 != mRefCnt, "dup release"); \ + count = PR_AtomicDecrement((PRInt32 *)&mRefCnt); \ + NS_LOG_RELEASE(this, count, #_class); \ + if (0 == count) { \ + mRefCnt = 1; /* stabilize */ \ + /* enable this to find non-threadsafe destructors: */ \ + /* NS_ASSERT_OWNINGTHREAD(_class); */ \ + NS_DELETEXPCOM(this); \ + return 0; \ + } \ + return count; \ +} + +#else // XPCOM_GLUE_AVOID_NSPR + +#define NS_IMPL_THREADSAFE_ADDREF(_class) \ + THREADSAFE_ISUPPORTS_NOT_AVAILABLE_IN_STANDALONE_GLUE; + +#define NS_IMPL_THREADSAFE_RELEASE(_class) \ + THREADSAFE_ISUPPORTS_NOT_AVAILABLE_IN_STANDALONE_GLUE; + +#endif + +#define NS_IMPL_THREADSAFE_ISUPPORTS0(_class) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE0(_class) + +#define NS_IMPL_THREADSAFE_ISUPPORTS1(_class, _interface) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE1(_class, _interface) + +#define NS_IMPL_THREADSAFE_ISUPPORTS2(_class, _i1, _i2) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE2(_class, _i1, _i2) + +#define NS_IMPL_THREADSAFE_ISUPPORTS3(_class, _i1, _i2, _i3) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE3(_class, _i1, _i2, _i3) + +#define NS_IMPL_THREADSAFE_ISUPPORTS4(_class, _i1, _i2, _i3, _i4) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE4(_class, _i1, _i2, _i3, _i4) + +#define NS_IMPL_THREADSAFE_ISUPPORTS5(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE5(_class, _i1, _i2, _i3, _i4, _i5) + +#define NS_IMPL_THREADSAFE_ISUPPORTS6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE6(_class, _i1, _i2, _i3, _i4, _i5, _i6) + +#define NS_IMPL_THREADSAFE_ISUPPORTS7(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE7(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7) + +#define NS_IMPL_THREADSAFE_ISUPPORTS8(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE8(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) + +#define NS_IMPL_THREADSAFE_ISUPPORTS9(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE9(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) + +#define NS_IMPL_THREADSAFE_ISUPPORTS10(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE10(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) + +#define NS_IMPL_THREADSAFE_ISUPPORTS11(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE11(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) + +/////////////////////////////////////////////////////////////////////////////// +// Macros for implementing nsIClassInfo-related stuff. +/////////////////////////////////////////////////////////////////////////////// + +// include here instead of at the top because it requires the nsISupport decl +#include "nsIClassInfo.h" + +#define NS_CLASSINFO_NAME(_class) _class##_classInfoGlobal +#define NS_CI_INTERFACE_GETTER_NAME(_class) _class##_GetInterfacesHelper + +#define NS_DECL_CI_INTERFACE_GETTER(_class) \ + extern NS_IMETHODIMP NS_CI_INTERFACE_GETTER_NAME(_class)(PRUint32 *, \ + nsIID ***); + +#define NS_DECL_CLASSINFO(_class) \ + NS_DECL_CI_INTERFACE_GETTER(_class) \ + nsIClassInfo *NS_CLASSINFO_NAME(_class); + +#define NS_IMPL_QUERY_CLASSINFO(_class) \ + if ( aIID.Equals(NS_GET_IID(nsIClassInfo)) ) { \ + extern nsIClassInfo *NS_CLASSINFO_NAME(_class); \ + foundInterface = NS_STATIC_CAST(nsIClassInfo*, NS_CLASSINFO_NAME(_class));\ + } else + +#define NS_CLASSINFO_HELPER_BEGIN(_class, _c) \ +NS_IMETHODIMP \ +NS_CI_INTERFACE_GETTER_NAME(_class)(PRUint32 *count, nsIID ***array) \ +{ \ + *count = _c; \ + *array = (nsIID **)nsMemory::Alloc(sizeof (nsIID *) * _c); + +#define NS_CLASSINFO_HELPER_ENTRY(_i, _interface) \ + (*array)[_i] = (nsIID *)nsMemory::Clone(&NS_GET_IID(_interface), \ + sizeof(nsIID)); + +#define NS_CLASSINFO_HELPER_END \ + return NS_OK; \ +} + +#define NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 1) \ + NS_CLASSINFO_HELPER_ENTRY(0, _interface) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE1_CI(_class, _i1) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS1_CI(_class, _interface) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE1_CI(_class, _interface) \ + NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface) + +#define NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 2) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE2_CI(_class, _i1, _i2) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS2_CI(_class, _i1, _i2) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE2_CI(_class, _i1, _i2) \ + NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2) + +#define NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 3) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \ + NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3) + +#define NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 4) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \ + NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4) + +#define NS_IMPL_CI_INTERFACE_GETTER5(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 5) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE5_CI(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS5_CI(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE5_CI(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_IMPL_CI_INTERFACE_GETTER5(_class, _i1, _i2, _i3, _i4, _i5) + +#define NS_IMPL_CI_INTERFACE_GETTER6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 6) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE6_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS6_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE6_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_IMPL_CI_INTERFACE_GETTER6(_class, _i1, _i2, _i3, _i4, _i5, _i6) + +#define NS_IMPL_CI_INTERFACE_GETTER7(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 7) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE7_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS7_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE7_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ + NS_IMPL_CI_INTERFACE_GETTER7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) + +#define NS_IMPL_CI_INTERFACE_GETTER8(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 8) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_ENTRY(7, _i8) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE8_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS8_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE8_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) \ + NS_IMPL_CI_INTERFACE_GETTER8(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) + +#define NS_IMPL_CI_INTERFACE_GETTER9(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 9) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_ENTRY(7, _i8) \ + NS_CLASSINFO_HELPER_ENTRY(8, _i9) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE9_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS9_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE9_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9) \ + NS_IMPL_CI_INTERFACE_GETTER9(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9) + +#define NS_IMPL_CI_INTERFACE_GETTER10(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 10) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_ENTRY(7, _i8) \ + NS_CLASSINFO_HELPER_ENTRY(8, _i9) \ + NS_CLASSINFO_HELPER_ENTRY(9, _i10) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_CI_INTERFACE_GETTER11(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 11) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_ENTRY(7, _i8) \ + NS_CLASSINFO_HELPER_ENTRY(8, _i9) \ + NS_CLASSINFO_HELPER_ENTRY(9, _i10) \ + NS_CLASSINFO_HELPER_ENTRY(10, _i11) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE10_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY(_i10) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE11_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY(_i10) \ + NS_INTERFACE_MAP_ENTRY(_i11) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS10_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE10_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10) \ + NS_IMPL_CI_INTERFACE_GETTER10(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10) + +#define NS_IMPL_ISUPPORTS11_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10, _i11) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE11_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10, _i11) \ + NS_IMPL_CI_INTERFACE_GETTER11(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10, _i11) + +#define NS_INTERFACE_MAP_END_THREADSAFE NS_IMPL_QUERY_TAIL_GUTS + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsPrimitives.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsPrimitives.h new file mode 100644 index 00000000..d4f3829c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsPrimitives.h @@ -0,0 +1,1787 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/ds/nsISupportsPrimitives.idl + */ + +#ifndef __gen_nsISupportsPrimitives_h__ +#define __gen_nsISupportsPrimitives_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsISupportsPrimitive */ +#define NS_ISUPPORTSPRIMITIVE_IID_STR "d0d4b136-1dd1-11b2-9371-f0727ef827c0" + +#define NS_ISUPPORTSPRIMITIVE_IID \ + {0xd0d4b136, 0x1dd1, 0x11b2, \ + { 0x93, 0x71, 0xf0, 0x72, 0x7e, 0xf8, 0x27, 0xc0 }} + +/** + * Primitive base interface. + * + * These first three are pointer types and do data copying + * using the nsIMemory. Be careful! + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPrimitive : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRIMITIVE_IID) + + enum { TYPE_ID = 1U }; + + enum { TYPE_CSTRING = 2U }; + + enum { TYPE_STRING = 3U }; + + enum { TYPE_PRBOOL = 4U }; + + enum { TYPE_PRUINT8 = 5U }; + + enum { TYPE_PRUINT16 = 6U }; + + enum { TYPE_PRUINT32 = 7U }; + + enum { TYPE_PRUINT64 = 8U }; + + enum { TYPE_PRTIME = 9U }; + + enum { TYPE_CHAR = 10U }; + + enum { TYPE_PRINT16 = 11U }; + + enum { TYPE_PRINT32 = 12U }; + + enum { TYPE_PRINT64 = 13U }; + + enum { TYPE_FLOAT = 14U }; + + enum { TYPE_DOUBLE = 15U }; + + enum { TYPE_VOID = 16U }; + + enum { TYPE_INTERFACE_POINTER = 17U }; + + /* readonly attribute unsigned short type; */ + NS_IMETHOD GetType(PRUint16 *aType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRIMITIVE \ + NS_IMETHOD GetType(PRUint16 *aType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRIMITIVE(_to) \ + NS_IMETHOD GetType(PRUint16 *aType) { return _to GetType(aType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRIMITIVE(_to) \ + NS_IMETHOD GetType(PRUint16 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPrimitive : public nsISupportsPrimitive +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRIMITIVE + + nsSupportsPrimitive(); + +private: + ~nsSupportsPrimitive(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPrimitive, nsISupportsPrimitive) + +nsSupportsPrimitive::nsSupportsPrimitive() +{ + /* member initializers and constructor code */ +} + +nsSupportsPrimitive::~nsSupportsPrimitive() +{ + /* destructor code */ +} + +/* readonly attribute unsigned short type; */ +NS_IMETHODIMP nsSupportsPrimitive::GetType(PRUint16 *aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsID */ +#define NS_ISUPPORTSID_IID_STR "d18290a0-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSID_IID \ + {0xd18290a0, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for nsID structures + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsID : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSID_IID) + + /* attribute nsIDPtr data; */ + NS_IMETHOD GetData(nsID * *aData) = 0; + NS_IMETHOD SetData(const nsID * aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSID \ + NS_IMETHOD GetData(nsID * *aData); \ + NS_IMETHOD SetData(const nsID * aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSID(_to) \ + NS_IMETHOD GetData(nsID * *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(const nsID * aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSID(_to) \ + NS_IMETHOD GetData(nsID * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(const nsID * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsID : public nsISupportsID +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSID + + nsSupportsID(); + +private: + ~nsSupportsID(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsID, nsISupportsID) + +nsSupportsID::nsSupportsID() +{ + /* member initializers and constructor code */ +} + +nsSupportsID::~nsSupportsID() +{ + /* destructor code */ +} + +/* attribute nsIDPtr data; */ +NS_IMETHODIMP nsSupportsID::GetData(nsID * *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsID::SetData(const nsID * aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsID::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsCString */ +#define NS_ISUPPORTSCSTRING_IID_STR "d65ff270-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSCSTRING_IID \ + {0xd65ff270, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for ASCII strings + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsCString : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSCSTRING_IID) + + /* attribute ACString data; */ + NS_IMETHOD GetData(nsACString & aData) = 0; + NS_IMETHOD SetData(const nsACString & aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSCSTRING \ + NS_IMETHOD GetData(nsACString & aData); \ + NS_IMETHOD SetData(const nsACString & aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSCSTRING(_to) \ + NS_IMETHOD GetData(nsACString & aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(const nsACString & aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSCSTRING(_to) \ + NS_IMETHOD GetData(nsACString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(const nsACString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsCString : public nsISupportsCString +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSCSTRING + + nsSupportsCString(); + +private: + ~nsSupportsCString(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsCString, nsISupportsCString) + +nsSupportsCString::nsSupportsCString() +{ + /* member initializers and constructor code */ +} + +nsSupportsCString::~nsSupportsCString() +{ + /* destructor code */ +} + +/* attribute ACString data; */ +NS_IMETHODIMP nsSupportsCString::GetData(nsACString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsCString::SetData(const nsACString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsCString::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsString */ +#define NS_ISUPPORTSSTRING_IID_STR "d79dc970-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSSTRING_IID \ + {0xd79dc970, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for Unicode strings + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsString : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSSTRING_IID) + + /* attribute AString data; */ + NS_IMETHOD GetData(nsAString & aData) = 0; + NS_IMETHOD SetData(const nsAString & aData) = 0; + + /* wstring toString (); */ + NS_IMETHOD ToString(PRUnichar **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSSTRING \ + NS_IMETHOD GetData(nsAString & aData); \ + NS_IMETHOD SetData(const nsAString & aData); \ + NS_IMETHOD ToString(PRUnichar **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSSTRING(_to) \ + NS_IMETHOD GetData(nsAString & aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(const nsAString & aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(PRUnichar **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSSTRING(_to) \ + NS_IMETHOD GetData(nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsString : public nsISupportsString +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSSTRING + + nsSupportsString(); + +private: + ~nsSupportsString(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsString, nsISupportsString) + +nsSupportsString::nsSupportsString() +{ + /* member initializers and constructor code */ +} + +nsSupportsString::~nsSupportsString() +{ + /* destructor code */ +} + +/* attribute AString data; */ +NS_IMETHODIMP nsSupportsString::GetData(nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsString::SetData(const nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* wstring toString (); */ +NS_IMETHODIMP nsSupportsString::ToString(PRUnichar **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRBool */ +#define NS_ISUPPORTSPRBOOL_IID_STR "ddc3b490-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRBOOL_IID \ + {0xddc3b490, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * The rest are truly primitive and are passed by value + */ +/** + * Scriptable storage for booleans + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRBool : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRBOOL_IID) + + /* attribute PRBool data; */ + NS_IMETHOD GetData(PRBool *aData) = 0; + NS_IMETHOD SetData(PRBool aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRBOOL \ + NS_IMETHOD GetData(PRBool *aData); \ + NS_IMETHOD SetData(PRBool aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRBOOL(_to) \ + NS_IMETHOD GetData(PRBool *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRBool aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRBOOL(_to) \ + NS_IMETHOD GetData(PRBool *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRBool aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRBool : public nsISupportsPRBool +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRBOOL + + nsSupportsPRBool(); + +private: + ~nsSupportsPRBool(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRBool, nsISupportsPRBool) + +nsSupportsPRBool::nsSupportsPRBool() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRBool::~nsSupportsPRBool() +{ + /* destructor code */ +} + +/* attribute PRBool data; */ +NS_IMETHODIMP nsSupportsPRBool::GetData(PRBool *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRBool::SetData(PRBool aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRBool::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRUint8 */ +#define NS_ISUPPORTSPRUINT8_IID_STR "dec2e4e0-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRUINT8_IID \ + {0xdec2e4e0, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for 8-bit integers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRUint8 : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRUINT8_IID) + + /* attribute PRUint8 data; */ + NS_IMETHOD GetData(PRUint8 *aData) = 0; + NS_IMETHOD SetData(PRUint8 aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRUINT8 \ + NS_IMETHOD GetData(PRUint8 *aData); \ + NS_IMETHOD SetData(PRUint8 aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRUINT8(_to) \ + NS_IMETHOD GetData(PRUint8 *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRUint8 aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRUINT8(_to) \ + NS_IMETHOD GetData(PRUint8 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRUint8 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRUint8 : public nsISupportsPRUint8 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRUINT8 + + nsSupportsPRUint8(); + +private: + ~nsSupportsPRUint8(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRUint8, nsISupportsPRUint8) + +nsSupportsPRUint8::nsSupportsPRUint8() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRUint8::~nsSupportsPRUint8() +{ + /* destructor code */ +} + +/* attribute PRUint8 data; */ +NS_IMETHODIMP nsSupportsPRUint8::GetData(PRUint8 *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRUint8::SetData(PRUint8 aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRUint8::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRUint16 */ +#define NS_ISUPPORTSPRUINT16_IID_STR "dfacb090-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRUINT16_IID \ + {0xdfacb090, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for unsigned 16-bit integers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRUint16 : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRUINT16_IID) + + /* attribute PRUint16 data; */ + NS_IMETHOD GetData(PRUint16 *aData) = 0; + NS_IMETHOD SetData(PRUint16 aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRUINT16 \ + NS_IMETHOD GetData(PRUint16 *aData); \ + NS_IMETHOD SetData(PRUint16 aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRUINT16(_to) \ + NS_IMETHOD GetData(PRUint16 *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRUint16 aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRUINT16(_to) \ + NS_IMETHOD GetData(PRUint16 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRUint16 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRUint16 : public nsISupportsPRUint16 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRUINT16 + + nsSupportsPRUint16(); + +private: + ~nsSupportsPRUint16(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRUint16, nsISupportsPRUint16) + +nsSupportsPRUint16::nsSupportsPRUint16() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRUint16::~nsSupportsPRUint16() +{ + /* destructor code */ +} + +/* attribute PRUint16 data; */ +NS_IMETHODIMP nsSupportsPRUint16::GetData(PRUint16 *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRUint16::SetData(PRUint16 aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRUint16::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRUint32 */ +#define NS_ISUPPORTSPRUINT32_IID_STR "e01dc470-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRUINT32_IID \ + {0xe01dc470, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for unsigned 32-bit integers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRUint32 : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRUINT32_IID) + + /* attribute PRUint32 data; */ + NS_IMETHOD GetData(PRUint32 *aData) = 0; + NS_IMETHOD SetData(PRUint32 aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRUINT32 \ + NS_IMETHOD GetData(PRUint32 *aData); \ + NS_IMETHOD SetData(PRUint32 aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRUINT32(_to) \ + NS_IMETHOD GetData(PRUint32 *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRUint32 aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRUINT32(_to) \ + NS_IMETHOD GetData(PRUint32 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRUint32 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRUint32 : public nsISupportsPRUint32 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRUINT32 + + nsSupportsPRUint32(); + +private: + ~nsSupportsPRUint32(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRUint32, nsISupportsPRUint32) + +nsSupportsPRUint32::nsSupportsPRUint32() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRUint32::~nsSupportsPRUint32() +{ + /* destructor code */ +} + +/* attribute PRUint32 data; */ +NS_IMETHODIMP nsSupportsPRUint32::GetData(PRUint32 *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRUint32::SetData(PRUint32 aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRUint32::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRUint64 */ +#define NS_ISUPPORTSPRUINT64_IID_STR "e13567c0-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRUINT64_IID \ + {0xe13567c0, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for 64-bit integers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRUint64 : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRUINT64_IID) + + /* attribute PRUint64 data; */ + NS_IMETHOD GetData(PRUint64 *aData) = 0; + NS_IMETHOD SetData(PRUint64 aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRUINT64 \ + NS_IMETHOD GetData(PRUint64 *aData); \ + NS_IMETHOD SetData(PRUint64 aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRUINT64(_to) \ + NS_IMETHOD GetData(PRUint64 *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRUint64 aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRUINT64(_to) \ + NS_IMETHOD GetData(PRUint64 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRUint64 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRUint64 : public nsISupportsPRUint64 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRUINT64 + + nsSupportsPRUint64(); + +private: + ~nsSupportsPRUint64(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRUint64, nsISupportsPRUint64) + +nsSupportsPRUint64::nsSupportsPRUint64() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRUint64::~nsSupportsPRUint64() +{ + /* destructor code */ +} + +/* attribute PRUint64 data; */ +NS_IMETHODIMP nsSupportsPRUint64::GetData(PRUint64 *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRUint64::SetData(PRUint64 aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRUint64::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRTime */ +#define NS_ISUPPORTSPRTIME_IID_STR "e2563630-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRTIME_IID \ + {0xe2563630, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for NSPR date/time values + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRTime : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRTIME_IID) + + /* attribute PRTime data; */ + NS_IMETHOD GetData(PRTime *aData) = 0; + NS_IMETHOD SetData(PRTime aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRTIME \ + NS_IMETHOD GetData(PRTime *aData); \ + NS_IMETHOD SetData(PRTime aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRTIME(_to) \ + NS_IMETHOD GetData(PRTime *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRTime aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRTIME(_to) \ + NS_IMETHOD GetData(PRTime *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRTime aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRTime : public nsISupportsPRTime +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRTIME + + nsSupportsPRTime(); + +private: + ~nsSupportsPRTime(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRTime, nsISupportsPRTime) + +nsSupportsPRTime::nsSupportsPRTime() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRTime::~nsSupportsPRTime() +{ + /* destructor code */ +} + +/* attribute PRTime data; */ +NS_IMETHODIMP nsSupportsPRTime::GetData(PRTime *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRTime::SetData(PRTime aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRTime::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsChar */ +#define NS_ISUPPORTSCHAR_IID_STR "e2b05e40-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSCHAR_IID \ + {0xe2b05e40, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for single character values + * (often used to store an ASCII character) + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsChar : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSCHAR_IID) + + /* attribute char data; */ + NS_IMETHOD GetData(char *aData) = 0; + NS_IMETHOD SetData(char aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSCHAR \ + NS_IMETHOD GetData(char *aData); \ + NS_IMETHOD SetData(char aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSCHAR(_to) \ + NS_IMETHOD GetData(char *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(char aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSCHAR(_to) \ + NS_IMETHOD GetData(char *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(char aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsChar : public nsISupportsChar +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSCHAR + + nsSupportsChar(); + +private: + ~nsSupportsChar(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsChar, nsISupportsChar) + +nsSupportsChar::nsSupportsChar() +{ + /* member initializers and constructor code */ +} + +nsSupportsChar::~nsSupportsChar() +{ + /* destructor code */ +} + +/* attribute char data; */ +NS_IMETHODIMP nsSupportsChar::GetData(char *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsChar::SetData(char aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsChar::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRInt16 */ +#define NS_ISUPPORTSPRINT16_IID_STR "e30d94b0-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRINT16_IID \ + {0xe30d94b0, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for 16-bit integers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRInt16 : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRINT16_IID) + + /* attribute PRInt16 data; */ + NS_IMETHOD GetData(PRInt16 *aData) = 0; + NS_IMETHOD SetData(PRInt16 aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRINT16 \ + NS_IMETHOD GetData(PRInt16 *aData); \ + NS_IMETHOD SetData(PRInt16 aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRINT16(_to) \ + NS_IMETHOD GetData(PRInt16 *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRInt16 aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRINT16(_to) \ + NS_IMETHOD GetData(PRInt16 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRInt16 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRInt16 : public nsISupportsPRInt16 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRINT16 + + nsSupportsPRInt16(); + +private: + ~nsSupportsPRInt16(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRInt16, nsISupportsPRInt16) + +nsSupportsPRInt16::nsSupportsPRInt16() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRInt16::~nsSupportsPRInt16() +{ + /* destructor code */ +} + +/* attribute PRInt16 data; */ +NS_IMETHODIMP nsSupportsPRInt16::GetData(PRInt16 *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRInt16::SetData(PRInt16 aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRInt16::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRInt32 */ +#define NS_ISUPPORTSPRINT32_IID_STR "e36c5250-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRINT32_IID \ + {0xe36c5250, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for 32-bit integers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRInt32 : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRINT32_IID) + + /* attribute PRInt32 data; */ + NS_IMETHOD GetData(PRInt32 *aData) = 0; + NS_IMETHOD SetData(PRInt32 aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRINT32 \ + NS_IMETHOD GetData(PRInt32 *aData); \ + NS_IMETHOD SetData(PRInt32 aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRINT32(_to) \ + NS_IMETHOD GetData(PRInt32 *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRInt32 aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRINT32(_to) \ + NS_IMETHOD GetData(PRInt32 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRInt32 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRInt32 : public nsISupportsPRInt32 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRINT32 + + nsSupportsPRInt32(); + +private: + ~nsSupportsPRInt32(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRInt32, nsISupportsPRInt32) + +nsSupportsPRInt32::nsSupportsPRInt32() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRInt32::~nsSupportsPRInt32() +{ + /* destructor code */ +} + +/* attribute PRInt32 data; */ +NS_IMETHODIMP nsSupportsPRInt32::GetData(PRInt32 *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRInt32::SetData(PRInt32 aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRInt32::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsPRInt64 */ +#define NS_ISUPPORTSPRINT64_IID_STR "e3cb0ff0-4a1c-11d3-9890-006008962422" + +#define NS_ISUPPORTSPRINT64_IID \ + {0xe3cb0ff0, 0x4a1c, 0x11d3, \ + { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }} + +/** + * Scriptable storage for 64-bit integers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsPRInt64 : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRINT64_IID) + + /* attribute PRInt64 data; */ + NS_IMETHOD GetData(PRInt64 *aData) = 0; + NS_IMETHOD SetData(PRInt64 aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSPRINT64 \ + NS_IMETHOD GetData(PRInt64 *aData); \ + NS_IMETHOD SetData(PRInt64 aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSPRINT64(_to) \ + NS_IMETHOD GetData(PRInt64 *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(PRInt64 aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSPRINT64(_to) \ + NS_IMETHOD GetData(PRInt64 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(PRInt64 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsPRInt64 : public nsISupportsPRInt64 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSPRINT64 + + nsSupportsPRInt64(); + +private: + ~nsSupportsPRInt64(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsPRInt64, nsISupportsPRInt64) + +nsSupportsPRInt64::nsSupportsPRInt64() +{ + /* member initializers and constructor code */ +} + +nsSupportsPRInt64::~nsSupportsPRInt64() +{ + /* destructor code */ +} + +/* attribute PRInt64 data; */ +NS_IMETHODIMP nsSupportsPRInt64::GetData(PRInt64 *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsPRInt64::SetData(PRInt64 aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsPRInt64::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsFloat */ +#define NS_ISUPPORTSFLOAT_IID_STR "abeaa390-4ac0-11d3-baea-00805f8a5dd7" + +#define NS_ISUPPORTSFLOAT_IID \ + {0xabeaa390, 0x4ac0, 0x11d3, \ + { 0xba, 0xea, 0x00, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 }} + +/** + * Scriptable storage for floating point numbers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsFloat : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSFLOAT_IID) + + /* attribute float data; */ + NS_IMETHOD GetData(float *aData) = 0; + NS_IMETHOD SetData(float aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSFLOAT \ + NS_IMETHOD GetData(float *aData); \ + NS_IMETHOD SetData(float aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSFLOAT(_to) \ + NS_IMETHOD GetData(float *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(float aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSFLOAT(_to) \ + NS_IMETHOD GetData(float *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(float aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsFloat : public nsISupportsFloat +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSFLOAT + + nsSupportsFloat(); + +private: + ~nsSupportsFloat(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsFloat, nsISupportsFloat) + +nsSupportsFloat::nsSupportsFloat() +{ + /* member initializers and constructor code */ +} + +nsSupportsFloat::~nsSupportsFloat() +{ + /* destructor code */ +} + +/* attribute float data; */ +NS_IMETHODIMP nsSupportsFloat::GetData(float *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsFloat::SetData(float aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsFloat::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsDouble */ +#define NS_ISUPPORTSDOUBLE_IID_STR "b32523a0-4ac0-11d3-baea-00805f8a5dd7" + +#define NS_ISUPPORTSDOUBLE_IID \ + {0xb32523a0, 0x4ac0, 0x11d3, \ + { 0xba, 0xea, 0x00, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 }} + +/** + * Scriptable storage for doubles + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsDouble : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSDOUBLE_IID) + + /* attribute double data; */ + NS_IMETHOD GetData(double *aData) = 0; + NS_IMETHOD SetData(double aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSDOUBLE \ + NS_IMETHOD GetData(double *aData); \ + NS_IMETHOD SetData(double aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSDOUBLE(_to) \ + NS_IMETHOD GetData(double *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(double aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSDOUBLE(_to) \ + NS_IMETHOD GetData(double *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(double aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsDouble : public nsISupportsDouble +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSDOUBLE + + nsSupportsDouble(); + +private: + ~nsSupportsDouble(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsDouble, nsISupportsDouble) + +nsSupportsDouble::nsSupportsDouble() +{ + /* member initializers and constructor code */ +} + +nsSupportsDouble::~nsSupportsDouble() +{ + /* destructor code */ +} + +/* attribute double data; */ +NS_IMETHODIMP nsSupportsDouble::GetData(double *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsDouble::SetData(double aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsDouble::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsVoid */ +#define NS_ISUPPORTSVOID_IID_STR "464484f0-568d-11d3-baf8-00805f8a5dd7" + +#define NS_ISUPPORTSVOID_IID \ + {0x464484f0, 0x568d, 0x11d3, \ + { 0xba, 0xf8, 0x00, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 }} + +/** + * Scriptable storage for generic pointers + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsVoid : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSVOID_IID) + + /* [noscript] attribute voidPtr data; */ + NS_IMETHOD GetData(void * *aData) = 0; + NS_IMETHOD SetData(void * aData) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSVOID \ + NS_IMETHOD GetData(void * *aData); \ + NS_IMETHOD SetData(void * aData); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSVOID(_to) \ + NS_IMETHOD GetData(void * *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(void * aData) { return _to SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSVOID(_to) \ + NS_IMETHOD GetData(void * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(void * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsVoid : public nsISupportsVoid +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSVOID + + nsSupportsVoid(); + +private: + ~nsSupportsVoid(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsVoid, nsISupportsVoid) + +nsSupportsVoid::nsSupportsVoid() +{ + /* member initializers and constructor code */ +} + +nsSupportsVoid::~nsSupportsVoid() +{ + /* destructor code */ +} + +/* [noscript] attribute voidPtr data; */ +NS_IMETHODIMP nsSupportsVoid::GetData(void * *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsVoid::SetData(void * aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsVoid::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsInterfacePointer */ +#define NS_ISUPPORTSINTERFACEPOINTER_IID_STR "995ea724-1dd1-11b2-9211-c21bdd3e7ed0" + +#define NS_ISUPPORTSINTERFACEPOINTER_IID \ + {0x995ea724, 0x1dd1, 0x11b2, \ + { 0x92, 0x11, 0xc2, 0x1b, 0xdd, 0x3e, 0x7e, 0xd0 }} + +/** + * Scriptable storage for other XPCOM objects + * + * @status FROZEN + */ +class NS_NO_VTABLE nsISupportsInterfacePointer : public nsISupportsPrimitive { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSINTERFACEPOINTER_IID) + + /* attribute nsISupports data; */ + NS_IMETHOD GetData(nsISupports * *aData) = 0; + NS_IMETHOD SetData(nsISupports * aData) = 0; + + /* attribute nsIDPtr dataIID; */ + NS_IMETHOD GetDataIID(nsID * *aDataIID) = 0; + NS_IMETHOD SetDataIID(const nsID * aDataIID) = 0; + + /* string toString (); */ + NS_IMETHOD ToString(char **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSINTERFACEPOINTER \ + NS_IMETHOD GetData(nsISupports * *aData); \ + NS_IMETHOD SetData(nsISupports * aData); \ + NS_IMETHOD GetDataIID(nsID * *aDataIID); \ + NS_IMETHOD SetDataIID(const nsID * aDataIID); \ + NS_IMETHOD ToString(char **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSINTERFACEPOINTER(_to) \ + NS_IMETHOD GetData(nsISupports * *aData) { return _to GetData(aData); } \ + NS_IMETHOD SetData(nsISupports * aData) { return _to SetData(aData); } \ + NS_IMETHOD GetDataIID(nsID * *aDataIID) { return _to GetDataIID(aDataIID); } \ + NS_IMETHOD SetDataIID(const nsID * aDataIID) { return _to SetDataIID(aDataIID); } \ + NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSINTERFACEPOINTER(_to) \ + NS_IMETHOD GetData(nsISupports * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \ + NS_IMETHOD SetData(nsISupports * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \ + NS_IMETHOD GetDataIID(nsID * *aDataIID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDataIID(aDataIID); } \ + NS_IMETHOD SetDataIID(const nsID * aDataIID) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDataIID(aDataIID); } \ + NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsInterfacePointer : public nsISupportsInterfacePointer +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSINTERFACEPOINTER + + nsSupportsInterfacePointer(); + +private: + ~nsSupportsInterfacePointer(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsInterfacePointer, nsISupportsInterfacePointer) + +nsSupportsInterfacePointer::nsSupportsInterfacePointer() +{ + /* member initializers and constructor code */ +} + +nsSupportsInterfacePointer::~nsSupportsInterfacePointer() +{ + /* destructor code */ +} + +/* attribute nsISupports data; */ +NS_IMETHODIMP nsSupportsInterfacePointer::GetData(nsISupports * *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsInterfacePointer::SetData(nsISupports * aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIDPtr dataIID; */ +NS_IMETHODIMP nsSupportsInterfacePointer::GetDataIID(nsID * *aDataIID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsSupportsInterfacePointer::SetDataIID(const nsID * aDataIID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string toString (); */ +NS_IMETHODIMP nsSupportsInterfacePointer::ToString(char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsISupportsPrimitives_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsUtils.h b/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsUtils.h new file mode 100644 index 00000000..d8d002b1 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsISupportsUtils.h @@ -0,0 +1,230 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Pierre Phaneuf <pp@ludusdesign.com> + * Scott Collins <scc@ScottCollins.net> + * Dan Mosedale <dmose@mozilla.org> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsISupportsUtils_h__ +#define nsISupportsUtils_h__ + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +#ifndef nsISupportsBase_h__ +#include "nsISupportsBase.h" +#endif + +#ifndef nsError_h__ +#include "nsError.h" +#endif + +#ifndef nsDebug_h___ +#include "nsDebug.h" +#endif + +#ifndef nsISupportsImpl_h__ +#include "nsISupportsImpl.h" +#endif + +/** + * Macro for instantiating a new object that implements nsISupports. + * Note that you can only use this if you adhere to the no arguments + * constructor com policy (which you really should!). + * @param _result Where the new instance pointer is stored + * @param _type The type of object to call "new" with. + */ +#define NS_NEWXPCOM(_result,_type) \ + PR_BEGIN_MACRO \ + _result = new _type(); \ + PR_END_MACRO + +/** + * Macro for deleting an object that implements nsISupports. + * @param _ptr The object to delete. + */ +#define NS_DELETEXPCOM(_ptr) \ + PR_BEGIN_MACRO \ + delete (_ptr); \ + PR_END_MACRO + +/** + * Macro for adding a reference to an interface. + * @param _ptr The interface pointer. + */ +#define NS_ADDREF(_ptr) \ + (_ptr)->AddRef() + +/** + * Macro for adding a reference to this. This macro should be used + * because NS_ADDREF (when tracing) may require an ambiguous cast + * from the pointers primary type to nsISupports. This macro sidesteps + * that entire problem. + */ +#define NS_ADDREF_THIS() \ + AddRef() + + +extern "C++" { +// ...because some one is accidentally including this file inside +// an |extern "C"| + + +// Making this a |inline| |template| allows |expr| to be evaluated only once, +// yet still denies you the ability to |AddRef()| an |nsCOMPtr|. +template <class T> +inline +nsrefcnt +ns_if_addref( T expr ) +{ + return expr ? expr->AddRef() : 0; +} + +} /* extern "C++" */ + +/** + * Macro for adding a reference to an interface that checks for NULL. + * @param _expr The interface pointer. + */ +#define NS_IF_ADDREF(_expr) ns_if_addref(_expr) + +/* + * Given these declarations, it explicitly OK and efficient to end a `getter' with: + * + * NS_IF_ADDREF(*result = mThing); + * + * even if |mThing| is an |nsCOMPtr|. If |mThing| is an |nsCOMPtr|, however, it is still + * _illegal_ to say |NS_IF_ADDREF(mThing)|. + */ + +/** + * Macro for releasing a reference to an interface. + * @param _ptr The interface pointer. + */ +#define NS_RELEASE(_ptr) \ + PR_BEGIN_MACRO \ + (_ptr)->Release(); \ + (_ptr) = 0; \ + PR_END_MACRO + +/** + * Macro for releasing a reference to an interface. + * @param _ptr The interface pointer. + */ +#define NS_RELEASE_THIS() \ + Release() + +/** + * Macro for releasing a reference to an interface, except that this + * macro preserves the return value from the underlying Release call. + * The interface pointer argument will only be NULLed if the reference count + * goes to zero. + * + * @param _ptr The interface pointer. + */ +#define NS_RELEASE2(_ptr,_rv) \ + PR_BEGIN_MACRO \ + _rv = (_ptr)->Release(); \ + if (0 == (_rv)) (_ptr) = 0; \ + PR_END_MACRO + +/** + * Macro for releasing a reference to an interface that checks for NULL; + * @param _ptr The interface pointer. + */ +#define NS_IF_RELEASE(_ptr) \ + PR_BEGIN_MACRO \ + if (_ptr) { \ + (_ptr)->Release(); \ + (_ptr) = 0; \ + } \ + PR_END_MACRO + +/* + * Often you have to cast an implementation pointer, e.g., |this|, to an + * |nsISupports*|, but because you have multiple inheritance, a simple cast + * is ambiguous. One could simply say, e.g., (given a base |nsIBase|), + * |NS_STATIC_CAST(nsIBase*, this)|; but that disguises the fact that what + * you are really doing is disambiguating the |nsISupports|. You could make + * that more obvious with a double cast, e.g., |NS_STATIC_CAST(nsISupports*, + * NS_STATIC_CAST(nsIBase*, this))|, but that is bulky and harder to read... + * + * The following macro is clean, short, and obvious. In the example above, + * you would use it like this: |NS_ISUPPORTS_CAST(nsIBase*, this)|. + */ + +#define NS_ISUPPORTS_CAST(__unambiguousBase, __expr) \ + NS_STATIC_CAST(nsISupports*, NS_STATIC_CAST(__unambiguousBase, __expr)) + +extern "C++" { +// ...because some one is accidentally including this file inside +// an |extern "C"| + +class nsISupports; + +template <class T> +struct nsCOMTypeInfo +{ + static const nsIID& GetIID() { return T::GetIID(); } +}; + +NS_SPECIALIZE_TEMPLATE +struct nsCOMTypeInfo<nsISupports> +{ + static const nsIID& GetIID() { + static const nsIID iid_NS_ISUPPORTS_IID = NS_ISUPPORTS_IID; return iid_NS_ISUPPORTS_IID; + } +}; + +#define NS_GET_IID(T) nsCOMTypeInfo<T>::GetIID() + +// a type-safe shortcut for calling the |QueryInterface()| member function +template <class T, class DestinationType> +inline +nsresult +CallQueryInterface( T* aSource, DestinationType** aDestination ) +{ + NS_PRECONDITION(aSource, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return aSource->QueryInterface(NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +} // extern "C++" + +#endif /* __nsISupportsUtils_h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsITooltipListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsITooltipListener.h new file mode 100644 index 00000000..351d561c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsITooltipListener.h @@ -0,0 +1,131 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsITooltipListener.idl + */ + +#ifndef __gen_nsITooltipListener_h__ +#define __gen_nsITooltipListener_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsITooltipListener */ +#define NS_ITOOLTIPLISTENER_IID_STR "44b78386-1dd2-11b2-9ad2-e4eee2ca1916" + +#define NS_ITOOLTIPLISTENER_IID \ + {0x44b78386, 0x1dd2, 0x11b2, \ + { 0x9a, 0xd2, 0xe4, 0xee, 0xe2, 0xca, 0x19, 0x16 }} + +/** + * An optional interface for embedding clients wishing to receive + * notifications for when a tooltip should be displayed or removed. + * The embedder implements this interface on the web browser chrome + * object associated with the window that notifications are required + * for. + * + * @see nsITooltipTextProvider + * + * @status FROZEN + */ +class NS_NO_VTABLE nsITooltipListener : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOOLTIPLISTENER_IID) + + /** + * Called when a tooltip should be displayed. + * + * @param aXCoords The tooltip left edge X coordinate. + * @param aYCoords The tooltip top edge Y coordinate. + * @param aTipText The text to display in the tooltip, typically obtained + * from the TITLE attribute of the node (or containing parent) + * over which the pointer has been positioned. + * + * @note + * Coordinates are specified in pixels, relative to the top-left + * corner of the browser area. + * + * @return <code>NS_OK</code> if the tooltip was displayed. + */ + /* void onShowTooltip (in long aXCoords, in long aYCoords, in wstring aTipText); */ + NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) = 0; + + /** + * Called when the tooltip should be hidden, either because the pointer + * has moved or the tooltip has timed out. + */ + /* void onHideTooltip (); */ + NS_IMETHOD OnHideTooltip(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSITOOLTIPLISTENER \ + NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText); \ + NS_IMETHOD OnHideTooltip(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSITOOLTIPLISTENER(_to) \ + NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) { return _to OnShowTooltip(aXCoords, aYCoords, aTipText); } \ + NS_IMETHOD OnHideTooltip(void) { return _to OnHideTooltip(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSITOOLTIPLISTENER(_to) \ + NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnShowTooltip(aXCoords, aYCoords, aTipText); } \ + NS_IMETHOD OnHideTooltip(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHideTooltip(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsTooltipListener : public nsITooltipListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSITOOLTIPLISTENER + + nsTooltipListener(); + +private: + ~nsTooltipListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsTooltipListener, nsITooltipListener) + +nsTooltipListener::nsTooltipListener() +{ + /* member initializers and constructor code */ +} + +nsTooltipListener::~nsTooltipListener() +{ + /* destructor code */ +} + +/* void onShowTooltip (in long aXCoords, in long aYCoords, in wstring aTipText); */ +NS_IMETHODIMP nsTooltipListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onHideTooltip (); */ +NS_IMETHODIMP nsTooltipListener::OnHideTooltip() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsITooltipListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsITooltipTextProvider.h b/Src/nprt_plugin/gecko/1.8/win/include/nsITooltipTextProvider.h new file mode 100644 index 00000000..b6f1ef03 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsITooltipTextProvider.h @@ -0,0 +1,122 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsITooltipTextProvider.idl + */ + +#ifndef __gen_nsITooltipTextProvider_h__ +#define __gen_nsITooltipTextProvider_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMNode; /* forward declaration */ + + +/* starting interface: nsITooltipTextProvider */ +#define NS_ITOOLTIPTEXTPROVIDER_IID_STR "b128a1e6-44f3-4331-8fbe-5af360ff21ee" + +#define NS_ITOOLTIPTEXTPROVIDER_IID \ + {0xb128a1e6, 0x44f3, 0x4331, \ + { 0x8f, 0xbe, 0x5a, 0xf3, 0x60, 0xff, 0x21, 0xee }} + +/** + * An interface implemented by a tooltip text provider service. This + * service is called to discover what tooltip text is associated + * with the node that the pointer is positioned over. + * + * Embedders may implement and register their own tooltip text provider + * service if they wish to provide different tooltip text. + * + * The default service returns the text stored in the TITLE + * attribute of the node or a containing parent. + * + * @note + * The tooltip text provider service is registered with the contract + * defined in NS_TOOLTIPTEXTPROVIDER_CONTRACTID. + * + * @see nsITooltipListener + * @see nsIComponentManager + * @see nsIDOMNode + * + * @status FROZEN + */ +class NS_NO_VTABLE nsITooltipTextProvider : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOOLTIPTEXTPROVIDER_IID) + + /** + * Called to obtain the tooltip text for a node. + * + * @arg aNode The node to obtain the text from. + * @arg aText The tooltip text. + * + * @return <CODE>PR_TRUE</CODE> if tooltip text is associated + * with the node and was returned in the aText argument; + * <CODE>PR_FALSE</CODE> otherwise. + */ + /* boolean getNodeText (in nsIDOMNode aNode, out wstring aText); */ + NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSITOOLTIPTEXTPROVIDER \ + NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSITOOLTIPTEXTPROVIDER(_to) \ + NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) { return _to GetNodeText(aNode, aText, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSITOOLTIPTEXTPROVIDER(_to) \ + NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNodeText(aNode, aText, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsTooltipTextProvider : public nsITooltipTextProvider +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSITOOLTIPTEXTPROVIDER + + nsTooltipTextProvider(); + +private: + ~nsTooltipTextProvider(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsTooltipTextProvider, nsITooltipTextProvider) + +nsTooltipTextProvider::nsTooltipTextProvider() +{ + /* member initializers and constructor code */ +} + +nsTooltipTextProvider::~nsTooltipTextProvider() +{ + /* destructor code */ +} + +/* boolean getNodeText (in nsIDOMNode aNode, out wstring aText); */ +NS_IMETHODIMP nsTooltipTextProvider::GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsITooltipTextProvider_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsITraceRefcnt.h b/Src/nprt_plugin/gecko/1.8/win/include/nsITraceRefcnt.h new file mode 100644 index 00000000..cb0d288d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsITraceRefcnt.h @@ -0,0 +1,156 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsITraceRefcnt.idl + */ + +#ifndef __gen_nsITraceRefcnt_h__ +#define __gen_nsITraceRefcnt_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsITraceRefcnt */ +#define NS_ITRACEREFCNT_IID_STR "273dc92f-0fe6-4545-96a9-21be77828039" + +#define NS_ITRACEREFCNT_IID \ + {0x273dc92f, 0x0fe6, 0x4545, \ + { 0x96, 0xa9, 0x21, 0xbe, 0x77, 0x82, 0x80, 0x39 }} + +/** + * nsITraceRefcnt is an interface between XPCOM Glue and XPCOM. Users should + * access the nsITraceRefcnt interface through the static class nsTraceRefcnt. + * @see nsTraceRefcnt.h + * + * @status UNDER_REVIEW + */ +class NS_NO_VTABLE nsITraceRefcnt : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITRACEREFCNT_IID) + + /* void logAddRef (in voidPtr aPtr, in nsrefcnt aNewRefcnt, in string aTypeName, in unsigned long aInstanceSize); */ + NS_IMETHOD LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize) = 0; + + /* void logRelease (in voidPtr aPtr, in nsrefcnt aNewRefcnt, in string aTypeName); */ + NS_IMETHOD LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName) = 0; + + /* void logCtor (in voidPtr aPtr, in string aTypeName, in unsigned long aInstanceSize); */ + NS_IMETHOD LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) = 0; + + /* void logDtor (in voidPtr aPtr, in string aTypeName, in unsigned long aInstanceSize); */ + NS_IMETHOD LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) = 0; + + /* void logAddCOMPtr (in voidPtr aPtr, in nsISupports aObject); */ + NS_IMETHOD LogAddCOMPtr(void * aPtr, nsISupports *aObject) = 0; + + /* void logReleaseCOMPtr (in voidPtr aPtr, in nsISupports aObject); */ + NS_IMETHOD LogReleaseCOMPtr(void * aPtr, nsISupports *aObject) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSITRACEREFCNT \ + NS_IMETHOD LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize); \ + NS_IMETHOD LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName); \ + NS_IMETHOD LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize); \ + NS_IMETHOD LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize); \ + NS_IMETHOD LogAddCOMPtr(void * aPtr, nsISupports *aObject); \ + NS_IMETHOD LogReleaseCOMPtr(void * aPtr, nsISupports *aObject); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSITRACEREFCNT(_to) \ + NS_IMETHOD LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize) { return _to LogAddRef(aPtr, aNewRefcnt, aTypeName, aInstanceSize); } \ + NS_IMETHOD LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName) { return _to LogRelease(aPtr, aNewRefcnt, aTypeName); } \ + NS_IMETHOD LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { return _to LogCtor(aPtr, aTypeName, aInstanceSize); } \ + NS_IMETHOD LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { return _to LogDtor(aPtr, aTypeName, aInstanceSize); } \ + NS_IMETHOD LogAddCOMPtr(void * aPtr, nsISupports *aObject) { return _to LogAddCOMPtr(aPtr, aObject); } \ + NS_IMETHOD LogReleaseCOMPtr(void * aPtr, nsISupports *aObject) { return _to LogReleaseCOMPtr(aPtr, aObject); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSITRACEREFCNT(_to) \ + NS_IMETHOD LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogAddRef(aPtr, aNewRefcnt, aTypeName, aInstanceSize); } \ + NS_IMETHOD LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogRelease(aPtr, aNewRefcnt, aTypeName); } \ + NS_IMETHOD LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogCtor(aPtr, aTypeName, aInstanceSize); } \ + NS_IMETHOD LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogDtor(aPtr, aTypeName, aInstanceSize); } \ + NS_IMETHOD LogAddCOMPtr(void * aPtr, nsISupports *aObject) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogAddCOMPtr(aPtr, aObject); } \ + NS_IMETHOD LogReleaseCOMPtr(void * aPtr, nsISupports *aObject) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogReleaseCOMPtr(aPtr, aObject); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsTraceRefcnt : public nsITraceRefcnt +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSITRACEREFCNT + + nsTraceRefcnt(); + +private: + ~nsTraceRefcnt(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsTraceRefcnt, nsITraceRefcnt) + +nsTraceRefcnt::nsTraceRefcnt() +{ + /* member initializers and constructor code */ +} + +nsTraceRefcnt::~nsTraceRefcnt() +{ + /* destructor code */ +} + +/* void logAddRef (in voidPtr aPtr, in nsrefcnt aNewRefcnt, in string aTypeName, in unsigned long aInstanceSize); */ +NS_IMETHODIMP nsTraceRefcnt::LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void logRelease (in voidPtr aPtr, in nsrefcnt aNewRefcnt, in string aTypeName); */ +NS_IMETHODIMP nsTraceRefcnt::LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void logCtor (in voidPtr aPtr, in string aTypeName, in unsigned long aInstanceSize); */ +NS_IMETHODIMP nsTraceRefcnt::LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void logDtor (in voidPtr aPtr, in string aTypeName, in unsigned long aInstanceSize); */ +NS_IMETHODIMP nsTraceRefcnt::LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void logAddCOMPtr (in voidPtr aPtr, in nsISupports aObject); */ +NS_IMETHODIMP nsTraceRefcnt::LogAddCOMPtr(void * aPtr, nsISupports *aObject) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void logReleaseCOMPtr (in voidPtr aPtr, in nsISupports aObject); */ +NS_IMETHODIMP nsTraceRefcnt::LogReleaseCOMPtr(void * aPtr, nsISupports *aObject) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsITraceRefcnt_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIURI.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIURI.h new file mode 100644 index 00000000..ccb94fdc --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIURI.h @@ -0,0 +1,499 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIURI.idl + */ + +#ifndef __gen_nsIURI_h__ +#define __gen_nsIURI_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#undef GetPort // XXX Windows! +#undef SetPort // XXX Windows! + +/* starting interface: nsIURI */ +#define NS_IURI_IID_STR "07a22cc0-0ce5-11d3-9331-00104ba0fd40" + +#define NS_IURI_IID \ + {0x07a22cc0, 0x0ce5, 0x11d3, \ + { 0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }} + +/** + * URIs are essentially structured names for things -- anything. This interface + * provides accessors to set and query the most basic components of an URI. + * Subclasses, including nsIURL, impose greater structure on the URI. + * + * This interface follows Tim Berners-Lee's URI spec (RFC2396) [1], where the + * basic URI components are defined as such: + * + * ftp://username:password@hostname:portnumber/pathname + * \ / \ / \ / \ /\ / + * - --------------- ------ -------- ------- + * | | | | | + * | | | | Path + * | | | Port + * | | Host / + * | UserPass / + * Scheme / + * \ / + * -------------------------------- + * | + * PrePath + * + * The definition of the URI components has been extended to allow for + * internationalized domain names [2] and the more generic IRI structure [3]. + * + * [1] http://www.ietf.org/rfc/rfc2396.txt + * [2] http://www.ietf.org/internet-drafts/draft-ietf-idn-idna-06.txt + * [3] http://www.ietf.org/internet-drafts/draft-masinter-url-i18n-08.txt + */ +/** + * nsIURI - interface for an uniform resource identifier w/ i18n support. + * + * AUTF8String attributes may contain unescaped UTF-8 characters. + * Consumers should be careful to escape the UTF-8 strings as necessary, but + * should always try to "display" the UTF-8 version as provided by this + * interface. + * + * AUTF8String attributes may also contain escaped characters. + * + * Unescaping URI segments is unadvised unless there is intimate + * knowledge of the underlying charset or there is no plan to display (or + * otherwise enforce a charset on) the resulting URI substring. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIURI : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IURI_IID) + + /************************************************************************ + * The URI is broken down into the following principal components: + */ +/** + * Returns a string representation of the URI. Setting the spec causes + * the new spec to be parsed, initializing the URI. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String spec; */ + NS_IMETHOD GetSpec(nsACString & aSpec) = 0; + NS_IMETHOD SetSpec(const nsACString & aSpec) = 0; + + /** + * The prePath (eg. scheme://user:password@host:port) returns the string + * before the path. This is useful for authentication or managing sessions. + * + * Some characters may be escaped. + */ + /* readonly attribute AUTF8String prePath; */ + NS_IMETHOD GetPrePath(nsACString & aPrePath) = 0; + + /** + * The Scheme is the protocol to which this URI refers. The scheme is + * restricted to the US-ASCII charset per RFC2396. + */ + /* attribute ACString scheme; */ + NS_IMETHOD GetScheme(nsACString & aScheme) = 0; + NS_IMETHOD SetScheme(const nsACString & aScheme) = 0; + + /** + * The username:password (or username only if value doesn't contain a ':') + * + * Some characters may be escaped. + */ + /* attribute AUTF8String userPass; */ + NS_IMETHOD GetUserPass(nsACString & aUserPass) = 0; + NS_IMETHOD SetUserPass(const nsACString & aUserPass) = 0; + + /** + * The optional username and password, assuming the preHost consists of + * username:password. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String username; */ + NS_IMETHOD GetUsername(nsACString & aUsername) = 0; + NS_IMETHOD SetUsername(const nsACString & aUsername) = 0; + + /* attribute AUTF8String password; */ + NS_IMETHOD GetPassword(nsACString & aPassword) = 0; + NS_IMETHOD SetPassword(const nsACString & aPassword) = 0; + + /** + * The host:port (or simply the host, if port == -1). + * + * Characters are NOT escaped. + */ + /* attribute AUTF8String hostPort; */ + NS_IMETHOD GetHostPort(nsACString & aHostPort) = 0; + NS_IMETHOD SetHostPort(const nsACString & aHostPort) = 0; + + /** + * The host is the internet domain name to which this URI refers. It could + * be an IPv4 (or IPv6) address literal. If supported, it could be a + * non-ASCII internationalized domain name. + * + * Characters are NOT escaped. + */ + /* attribute AUTF8String host; */ + NS_IMETHOD GetHost(nsACString & aHost) = 0; + NS_IMETHOD SetHost(const nsACString & aHost) = 0; + + /** + * A port value of -1 corresponds to the protocol's default port (eg. -1 + * implies port 80 for http URIs). + */ + /* attribute long port; */ + NS_IMETHOD GetPort(PRInt32 *aPort) = 0; + NS_IMETHOD SetPort(PRInt32 aPort) = 0; + + /** + * The path, typically including at least a leading '/' (but may also be + * empty, depending on the protocol). + * + * Some characters may be escaped. + */ + /* attribute AUTF8String path; */ + NS_IMETHOD GetPath(nsACString & aPath) = 0; + NS_IMETHOD SetPath(const nsACString & aPath) = 0; + + /************************************************************************ + * An URI supports the following methods: + */ +/** + * URI equivalence test (not a strict string comparison). + * + * eg. http://foo.com:80/ == http://foo.com/ + */ + /* boolean equals (in nsIURI other); */ + NS_IMETHOD Equals(nsIURI *other, PRBool *_retval) = 0; + + /** + * An optimization to do scheme checks without requiring the users of nsIURI + * to GetScheme, thereby saving extra allocating and freeing. Returns true if + * the schemes match (case ignored). + */ + /* boolean schemeIs (in string scheme); */ + NS_IMETHOD SchemeIs(const char *scheme, PRBool *_retval) = 0; + + /** + * Clones the current URI. For some protocols, this is more than just an + * optimization. For example, under MacOS, the spec of a file URL does not + * necessarily uniquely identify a file since two volumes could share the + * same name. + */ + /* nsIURI clone (); */ + NS_IMETHOD Clone(nsIURI **_retval) = 0; + + /** + * This method resolves a relative string into an absolute URI string, + * using this URI as the base. + * + * NOTE: some implementations may have no concept of a relative URI. + */ + /* AUTF8String resolve (in AUTF8String relativePath); */ + NS_IMETHOD Resolve(const nsACString & relativePath, nsACString & _retval) = 0; + + /************************************************************************ + * Additional attributes: + */ +/** + * The URI spec with an ASCII compatible encoding. Host portion follows + * the IDNA draft spec. Other parts are URL-escaped per the rules of + * RFC2396. The result is strictly ASCII. + */ + /* readonly attribute ACString asciiSpec; */ + NS_IMETHOD GetAsciiSpec(nsACString & aAsciiSpec) = 0; + + /** + * The URI host with an ASCII compatible encoding. Follows the IDNA + * draft spec for converting internationalized domain names (UTF-8) to + * ASCII for compatibility with existing internet infrasture. + */ + /* readonly attribute ACString asciiHost; */ + NS_IMETHOD GetAsciiHost(nsACString & aAsciiHost) = 0; + + /** + * The charset of the document from which this URI originated. An empty + * value implies UTF-8. + * + * If this value is something other than UTF-8 then the URI components + * (e.g., spec, prePath, username, etc.) will all be fully URL-escaped. + * Otherwise, the URI components may contain unescaped multibyte UTF-8 + * characters. + */ + /* readonly attribute ACString originCharset; */ + NS_IMETHOD GetOriginCharset(nsACString & aOriginCharset) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIURI \ + NS_IMETHOD GetSpec(nsACString & aSpec); \ + NS_IMETHOD SetSpec(const nsACString & aSpec); \ + NS_IMETHOD GetPrePath(nsACString & aPrePath); \ + NS_IMETHOD GetScheme(nsACString & aScheme); \ + NS_IMETHOD SetScheme(const nsACString & aScheme); \ + NS_IMETHOD GetUserPass(nsACString & aUserPass); \ + NS_IMETHOD SetUserPass(const nsACString & aUserPass); \ + NS_IMETHOD GetUsername(nsACString & aUsername); \ + NS_IMETHOD SetUsername(const nsACString & aUsername); \ + NS_IMETHOD GetPassword(nsACString & aPassword); \ + NS_IMETHOD SetPassword(const nsACString & aPassword); \ + NS_IMETHOD GetHostPort(nsACString & aHostPort); \ + NS_IMETHOD SetHostPort(const nsACString & aHostPort); \ + NS_IMETHOD GetHost(nsACString & aHost); \ + NS_IMETHOD SetHost(const nsACString & aHost); \ + NS_IMETHOD GetPort(PRInt32 *aPort); \ + NS_IMETHOD SetPort(PRInt32 aPort); \ + NS_IMETHOD GetPath(nsACString & aPath); \ + NS_IMETHOD SetPath(const nsACString & aPath); \ + NS_IMETHOD Equals(nsIURI *other, PRBool *_retval); \ + NS_IMETHOD SchemeIs(const char *scheme, PRBool *_retval); \ + NS_IMETHOD Clone(nsIURI **_retval); \ + NS_IMETHOD Resolve(const nsACString & relativePath, nsACString & _retval); \ + NS_IMETHOD GetAsciiSpec(nsACString & aAsciiSpec); \ + NS_IMETHOD GetAsciiHost(nsACString & aAsciiHost); \ + NS_IMETHOD GetOriginCharset(nsACString & aOriginCharset); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIURI(_to) \ + NS_IMETHOD GetSpec(nsACString & aSpec) { return _to GetSpec(aSpec); } \ + NS_IMETHOD SetSpec(const nsACString & aSpec) { return _to SetSpec(aSpec); } \ + NS_IMETHOD GetPrePath(nsACString & aPrePath) { return _to GetPrePath(aPrePath); } \ + NS_IMETHOD GetScheme(nsACString & aScheme) { return _to GetScheme(aScheme); } \ + NS_IMETHOD SetScheme(const nsACString & aScheme) { return _to SetScheme(aScheme); } \ + NS_IMETHOD GetUserPass(nsACString & aUserPass) { return _to GetUserPass(aUserPass); } \ + NS_IMETHOD SetUserPass(const nsACString & aUserPass) { return _to SetUserPass(aUserPass); } \ + NS_IMETHOD GetUsername(nsACString & aUsername) { return _to GetUsername(aUsername); } \ + NS_IMETHOD SetUsername(const nsACString & aUsername) { return _to SetUsername(aUsername); } \ + NS_IMETHOD GetPassword(nsACString & aPassword) { return _to GetPassword(aPassword); } \ + NS_IMETHOD SetPassword(const nsACString & aPassword) { return _to SetPassword(aPassword); } \ + NS_IMETHOD GetHostPort(nsACString & aHostPort) { return _to GetHostPort(aHostPort); } \ + NS_IMETHOD SetHostPort(const nsACString & aHostPort) { return _to SetHostPort(aHostPort); } \ + NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \ + NS_IMETHOD SetHost(const nsACString & aHost) { return _to SetHost(aHost); } \ + NS_IMETHOD GetPort(PRInt32 *aPort) { return _to GetPort(aPort); } \ + NS_IMETHOD SetPort(PRInt32 aPort) { return _to SetPort(aPort); } \ + NS_IMETHOD GetPath(nsACString & aPath) { return _to GetPath(aPath); } \ + NS_IMETHOD SetPath(const nsACString & aPath) { return _to SetPath(aPath); } \ + NS_IMETHOD Equals(nsIURI *other, PRBool *_retval) { return _to Equals(other, _retval); } \ + NS_IMETHOD SchemeIs(const char *scheme, PRBool *_retval) { return _to SchemeIs(scheme, _retval); } \ + NS_IMETHOD Clone(nsIURI **_retval) { return _to Clone(_retval); } \ + NS_IMETHOD Resolve(const nsACString & relativePath, nsACString & _retval) { return _to Resolve(relativePath, _retval); } \ + NS_IMETHOD GetAsciiSpec(nsACString & aAsciiSpec) { return _to GetAsciiSpec(aAsciiSpec); } \ + NS_IMETHOD GetAsciiHost(nsACString & aAsciiHost) { return _to GetAsciiHost(aAsciiHost); } \ + NS_IMETHOD GetOriginCharset(nsACString & aOriginCharset) { return _to GetOriginCharset(aOriginCharset); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIURI(_to) \ + NS_IMETHOD GetSpec(nsACString & aSpec) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSpec(aSpec); } \ + NS_IMETHOD SetSpec(const nsACString & aSpec) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSpec(aSpec); } \ + NS_IMETHOD GetPrePath(nsACString & aPrePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrePath(aPrePath); } \ + NS_IMETHOD GetScheme(nsACString & aScheme) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \ + NS_IMETHOD SetScheme(const nsACString & aScheme) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScheme(aScheme); } \ + NS_IMETHOD GetUserPass(nsACString & aUserPass) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserPass(aUserPass); } \ + NS_IMETHOD SetUserPass(const nsACString & aUserPass) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUserPass(aUserPass); } \ + NS_IMETHOD GetUsername(nsACString & aUsername) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsername(aUsername); } \ + NS_IMETHOD SetUsername(const nsACString & aUsername) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUsername(aUsername); } \ + NS_IMETHOD GetPassword(nsACString & aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPassword(aPassword); } \ + NS_IMETHOD SetPassword(const nsACString & aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPassword(aPassword); } \ + NS_IMETHOD GetHostPort(nsACString & aHostPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHostPort(aHostPort); } \ + NS_IMETHOD SetHostPort(const nsACString & aHostPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHostPort(aHostPort); } \ + NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \ + NS_IMETHOD SetHost(const nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHost(aHost); } \ + NS_IMETHOD GetPort(PRInt32 *aPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \ + NS_IMETHOD SetPort(PRInt32 aPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPort(aPort); } \ + NS_IMETHOD GetPath(nsACString & aPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPath(aPath); } \ + NS_IMETHOD SetPath(const nsACString & aPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPath(aPath); } \ + NS_IMETHOD Equals(nsIURI *other, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(other, _retval); } \ + NS_IMETHOD SchemeIs(const char *scheme, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SchemeIs(scheme, _retval); } \ + NS_IMETHOD Clone(nsIURI **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Clone(_retval); } \ + NS_IMETHOD Resolve(const nsACString & relativePath, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(relativePath, _retval); } \ + NS_IMETHOD GetAsciiSpec(nsACString & aAsciiSpec) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsciiSpec(aAsciiSpec); } \ + NS_IMETHOD GetAsciiHost(nsACString & aAsciiHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsciiHost(aAsciiHost); } \ + NS_IMETHOD GetOriginCharset(nsACString & aOriginCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginCharset(aOriginCharset); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsURI : public nsIURI +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIURI + + nsURI(); + +private: + ~nsURI(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsURI, nsIURI) + +nsURI::nsURI() +{ + /* member initializers and constructor code */ +} + +nsURI::~nsURI() +{ + /* destructor code */ +} + +/* attribute AUTF8String spec; */ +NS_IMETHODIMP nsURI::GetSpec(nsACString & aSpec) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetSpec(const nsACString & aSpec) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AUTF8String prePath; */ +NS_IMETHODIMP nsURI::GetPrePath(nsACString & aPrePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute ACString scheme; */ +NS_IMETHODIMP nsURI::GetScheme(nsACString & aScheme) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetScheme(const nsACString & aScheme) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String userPass; */ +NS_IMETHODIMP nsURI::GetUserPass(nsACString & aUserPass) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetUserPass(const nsACString & aUserPass) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String username; */ +NS_IMETHODIMP nsURI::GetUsername(nsACString & aUsername) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetUsername(const nsACString & aUsername) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String password; */ +NS_IMETHODIMP nsURI::GetPassword(nsACString & aPassword) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetPassword(const nsACString & aPassword) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String hostPort; */ +NS_IMETHODIMP nsURI::GetHostPort(nsACString & aHostPort) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetHostPort(const nsACString & aHostPort) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String host; */ +NS_IMETHODIMP nsURI::GetHost(nsACString & aHost) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetHost(const nsACString & aHost) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long port; */ +NS_IMETHODIMP nsURI::GetPort(PRInt32 *aPort) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetPort(PRInt32 aPort) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String path; */ +NS_IMETHODIMP nsURI::GetPath(nsACString & aPath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURI::SetPath(const nsACString & aPath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean equals (in nsIURI other); */ +NS_IMETHODIMP nsURI::Equals(nsIURI *other, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean schemeIs (in string scheme); */ +NS_IMETHODIMP nsURI::SchemeIs(const char *scheme, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIURI clone (); */ +NS_IMETHODIMP nsURI::Clone(nsIURI **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* AUTF8String resolve (in AUTF8String relativePath); */ +NS_IMETHODIMP nsURI::Resolve(const nsACString & relativePath, nsACString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute ACString asciiSpec; */ +NS_IMETHODIMP nsURI::GetAsciiSpec(nsACString & aAsciiSpec) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute ACString asciiHost; */ +NS_IMETHODIMP nsURI::GetAsciiHost(nsACString & aAsciiHost) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute ACString originCharset; */ +NS_IMETHODIMP nsURI::GetOriginCharset(nsACString & aOriginCharset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIURI_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIURIContentListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIURIContentListener.h new file mode 100644 index 00000000..032b5b0c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIURIContentListener.h @@ -0,0 +1,274 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/uriloader/base/nsIURIContentListener.idl + */ + +#ifndef __gen_nsIURIContentListener_h__ +#define __gen_nsIURIContentListener_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIRequest; /* forward declaration */ + +class nsIStreamListener; /* forward declaration */ + +class nsIURI; /* forward declaration */ + + +/* starting interface: nsIURIContentListener */ +#define NS_IURICONTENTLISTENER_IID_STR "94928ab3-8b63-11d3-989d-001083010e9b" + +#define NS_IURICONTENTLISTENER_IID \ + {0x94928ab3, 0x8b63, 0x11d3, \ + { 0x98, 0x9d, 0x00, 0x10, 0x83, 0x01, 0x0e, 0x9b }} + +/** + * nsIURIContentListener is an interface used by components which + * want to know (and have a chance to handle) a particular content type. + * Typical usage scenarios will include running applications which register + * a nsIURIContentListener for each of its content windows with the uri + * dispatcher service. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIURIContentListener : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IURICONTENTLISTENER_IID) + + /** + * Gives the original content listener first crack at stopping a load before + * it happens. + * + * @param aURI URI that is being opened. + * + * @return <code>false</code> if the load can continue; + * <code>true</code> if the open should be aborted. + */ + /* boolean onStartURIOpen (in nsIURI aURI); */ + NS_IMETHOD OnStartURIOpen(nsIURI *aURI, PRBool *_retval) = 0; + + /** + * Notifies the content listener to hook up an nsIStreamListener capable of + * consuming the data stream. + * + * @param aContentType Content type of the data. + * @param aIsContentPreferred Indicates whether the content should be + * preferred by this listener. + * @param aRequest Request that is providing the data. + * @param aContentHandler nsIStreamListener that will consume the data. + * This should be set to <code>nsnull</code> if + * this content listener can't handle the content + * type. + * + * @return <code>true</code> if the consumer wants to + * handle the load completely by itself. This + * causes the URI Loader do nothing else... + * <code>false</code> if the URI Loader should + * continue handling the load and call the + * returned streamlistener's methods. + */ + /* boolean doContent (in string aContentType, in boolean aIsContentPreferred, in nsIRequest aRequest, out nsIStreamListener aContentHandler); */ + NS_IMETHOD DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest, nsIStreamListener **aContentHandler, PRBool *_retval) = 0; + + /** + * When given a uri to dispatch, if the URI is specified as 'preferred + * content' then the uri loader tries to find a preferred content handler + * for the content type. The thought is that many content listeners may + * be able to handle the same content type if they have to. i.e. the mail + * content window can handle text/html just like a browser window content + * listener. However, if the user clicks on a link with text/html content, + * then the browser window should handle that content and not the mail + * window where the user may have clicked the link. This is the difference + * between isPreferred and canHandleContent. + * + * @param aContentType Content type of the data. + * @param aDesiredContentType Indicates that aContentType must be converted + * to aDesiredContentType before processing the + * data. This causes a stream converted to be + * inserted into the nsIStreamListener chain. + * This argument can be <code>nsnull</code> if + * the content should be consumed directly as + * aContentType. + * + * @return <code>true</code> if this is a preferred + * content handler for aContentType; + * <code>false<code> otherwise. + */ + /* boolean isPreferred (in string aContentType, out string aDesiredContentType); */ + NS_IMETHOD IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval) = 0; + + /** + * When given a uri to dispatch, if the URI is not specified as 'preferred + * content' then the uri loader calls canHandleContent to see if the content + * listener is capable of handling the content. + * + * @param aContentType Content type of the data. + * @param aIsContentPreferred Indicates whether the content should be + * preferred by this listener. + * @param aDesiredContentType Indicates that aContentType must be converted + * to aDesiredContentType before processing the + * data. This causes a stream converted to be + * inserted into the nsIStreamListener chain. + * This argument can be <code>nsnull</code> if + * the content should be consumed directly as + * aContentType. + * + * @return <code>true</code> if the data can be consumed. + * <code>false</code> otherwise. + * + * Note: I really envision canHandleContent as a method implemented + * by the docshell as the implementation is generic to all doc + * shells. The isPreferred decision is a decision made by a top level + * application content listener that sits at the top of the docshell + * hierarchy. + */ + /* boolean canHandleContent (in string aContentType, in boolean aIsContentPreferred, out string aDesiredContentType); */ + NS_IMETHOD CanHandleContent(const char *aContentType, PRBool aIsContentPreferred, char **aDesiredContentType, PRBool *_retval) = 0; + + /** + * The load context associated with a particular content listener. + * The URI Loader stores and accesses this value as needed. + */ + /* attribute nsISupports loadCookie; */ + NS_IMETHOD GetLoadCookie(nsISupports * *aLoadCookie) = 0; + NS_IMETHOD SetLoadCookie(nsISupports * aLoadCookie) = 0; + + /** + * The parent content listener if this particular listener is part of a chain + * of content listeners (i.e. a docshell!) + * + * @note If this attribute is set to an object that implements + * nsISupportsWeakReference, the implementation should get the + * nsIWeakReference and hold that. Otherwise, the implementation + * should not refcount this interface; it should assume that a non + * null value is always valid. In that case, the caller is + * responsible for explicitly setting this value back to null if the + * parent content listener is destroyed. + */ + /* attribute nsIURIContentListener parentContentListener; */ + NS_IMETHOD GetParentContentListener(nsIURIContentListener * *aParentContentListener) = 0; + NS_IMETHOD SetParentContentListener(nsIURIContentListener * aParentContentListener) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIURICONTENTLISTENER \ + NS_IMETHOD OnStartURIOpen(nsIURI *aURI, PRBool *_retval); \ + NS_IMETHOD DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest, nsIStreamListener **aContentHandler, PRBool *_retval); \ + NS_IMETHOD IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval); \ + NS_IMETHOD CanHandleContent(const char *aContentType, PRBool aIsContentPreferred, char **aDesiredContentType, PRBool *_retval); \ + NS_IMETHOD GetLoadCookie(nsISupports * *aLoadCookie); \ + NS_IMETHOD SetLoadCookie(nsISupports * aLoadCookie); \ + NS_IMETHOD GetParentContentListener(nsIURIContentListener * *aParentContentListener); \ + NS_IMETHOD SetParentContentListener(nsIURIContentListener * aParentContentListener); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIURICONTENTLISTENER(_to) \ + NS_IMETHOD OnStartURIOpen(nsIURI *aURI, PRBool *_retval) { return _to OnStartURIOpen(aURI, _retval); } \ + NS_IMETHOD DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest, nsIStreamListener **aContentHandler, PRBool *_retval) { return _to DoContent(aContentType, aIsContentPreferred, aRequest, aContentHandler, _retval); } \ + NS_IMETHOD IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval) { return _to IsPreferred(aContentType, aDesiredContentType, _retval); } \ + NS_IMETHOD CanHandleContent(const char *aContentType, PRBool aIsContentPreferred, char **aDesiredContentType, PRBool *_retval) { return _to CanHandleContent(aContentType, aIsContentPreferred, aDesiredContentType, _retval); } \ + NS_IMETHOD GetLoadCookie(nsISupports * *aLoadCookie) { return _to GetLoadCookie(aLoadCookie); } \ + NS_IMETHOD SetLoadCookie(nsISupports * aLoadCookie) { return _to SetLoadCookie(aLoadCookie); } \ + NS_IMETHOD GetParentContentListener(nsIURIContentListener * *aParentContentListener) { return _to GetParentContentListener(aParentContentListener); } \ + NS_IMETHOD SetParentContentListener(nsIURIContentListener * aParentContentListener) { return _to SetParentContentListener(aParentContentListener); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIURICONTENTLISTENER(_to) \ + NS_IMETHOD OnStartURIOpen(nsIURI *aURI, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartURIOpen(aURI, _retval); } \ + NS_IMETHOD DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest, nsIStreamListener **aContentHandler, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoContent(aContentType, aIsContentPreferred, aRequest, aContentHandler, _retval); } \ + NS_IMETHOD IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsPreferred(aContentType, aDesiredContentType, _retval); } \ + NS_IMETHOD CanHandleContent(const char *aContentType, PRBool aIsContentPreferred, char **aDesiredContentType, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanHandleContent(aContentType, aIsContentPreferred, aDesiredContentType, _retval); } \ + NS_IMETHOD GetLoadCookie(nsISupports * *aLoadCookie) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadCookie(aLoadCookie); } \ + NS_IMETHOD SetLoadCookie(nsISupports * aLoadCookie) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoadCookie(aLoadCookie); } \ + NS_IMETHOD GetParentContentListener(nsIURIContentListener * *aParentContentListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentContentListener(aParentContentListener); } \ + NS_IMETHOD SetParentContentListener(nsIURIContentListener * aParentContentListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetParentContentListener(aParentContentListener); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsURIContentListener : public nsIURIContentListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIURICONTENTLISTENER + + nsURIContentListener(); + +private: + ~nsURIContentListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsURIContentListener, nsIURIContentListener) + +nsURIContentListener::nsURIContentListener() +{ + /* member initializers and constructor code */ +} + +nsURIContentListener::~nsURIContentListener() +{ + /* destructor code */ +} + +/* boolean onStartURIOpen (in nsIURI aURI); */ +NS_IMETHODIMP nsURIContentListener::OnStartURIOpen(nsIURI *aURI, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean doContent (in string aContentType, in boolean aIsContentPreferred, in nsIRequest aRequest, out nsIStreamListener aContentHandler); */ +NS_IMETHODIMP nsURIContentListener::DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest, nsIStreamListener **aContentHandler, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isPreferred (in string aContentType, out string aDesiredContentType); */ +NS_IMETHODIMP nsURIContentListener::IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean canHandleContent (in string aContentType, in boolean aIsContentPreferred, out string aDesiredContentType); */ +NS_IMETHODIMP nsURIContentListener::CanHandleContent(const char *aContentType, PRBool aIsContentPreferred, char **aDesiredContentType, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsISupports loadCookie; */ +NS_IMETHODIMP nsURIContentListener::GetLoadCookie(nsISupports * *aLoadCookie) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURIContentListener::SetLoadCookie(nsISupports * aLoadCookie) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIURIContentListener parentContentListener; */ +NS_IMETHODIMP nsURIContentListener::GetParentContentListener(nsIURIContentListener * *aParentContentListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURIContentListener::SetParentContentListener(nsIURIContentListener * aParentContentListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIURIContentListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIURL.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIURL.h new file mode 100644 index 00000000..24f31a00 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIURL.h @@ -0,0 +1,374 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIURL.idl + */ + +#ifndef __gen_nsIURL_h__ +#define __gen_nsIURL_h__ + + +#ifndef __gen_nsIURI_h__ +#include "nsIURI.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIURL */ +#define NS_IURL_IID_STR "d6116970-8034-11d3-9399-00104ba0fd40" + +#define NS_IURL_IID \ + {0xd6116970, 0x8034, 0x11d3, \ + { 0x93, 0x99, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }} + +/** + * The nsIURL interface provides convenience methods that further + * break down the path portion of nsIURI: + * + * http://directory/fileBaseName.fileExtension?query + * http://directory/fileBaseName.fileExtension#ref + * http://directory/fileBaseName.fileExtension;param + * \ \ / + * \ ----------------------- + * \ | / + * \ fileName / + * ---------------------------- + * | + * filePath + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIURL : public nsIURI { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IURL_IID) + + /************************************************************************* + * The URL path is broken down into the following principal components: + */ +/** + * Returns a path including the directory and file portions of a + * URL. For example, the filePath of "http://foo/bar.html#baz" is + * "/foo/bar.html". + * + * Some characters may be escaped. + */ + /* attribute AUTF8String filePath; */ + NS_IMETHOD GetFilePath(nsACString & aFilePath) = 0; + NS_IMETHOD SetFilePath(const nsACString & aFilePath) = 0; + + /** + * Returns the parameters specified after the ; in the URL. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String param; */ + NS_IMETHOD GetParam(nsACString & aParam) = 0; + NS_IMETHOD SetParam(const nsACString & aParam) = 0; + + /** + * Returns the query portion (the part after the "?") of the URL. + * If there isn't one, an empty string is returned. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String query; */ + NS_IMETHOD GetQuery(nsACString & aQuery) = 0; + NS_IMETHOD SetQuery(const nsACString & aQuery) = 0; + + /** + * Returns the reference portion (the part after the "#") of the URL. + * If there isn't one, an empty string is returned. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String ref; */ + NS_IMETHOD GetRef(nsACString & aRef) = 0; + NS_IMETHOD SetRef(const nsACString & aRef) = 0; + + /************************************************************************* + * The URL filepath is broken down into the following sub-components: + */ +/** + * Returns the directory portion of a URL. + * If the URL denotes a path to a directory and not a file, + * e.g. http://foo/bar/, then the Directory attribute accesses + * the complete /foo/bar/ portion, and the FileName is the + * empty string. If the trailing slash is omitted, then the + * Directory is /foo/ and the file is bar (i.e. this is a + * syntactic, not a semantic breakdown of the Path). + * And hence dont rely on this for something to be a definitely + * be a file. But you can get just the leading directory portion + * for sure. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String directory; */ + NS_IMETHOD GetDirectory(nsACString & aDirectory) = 0; + NS_IMETHOD SetDirectory(const nsACString & aDirectory) = 0; + + /** + * Returns the file name portion of a URL. + * If the URL denotes a path to a directory and not a file, + * e.g. http://foo/bar/, then the Directory attribute accesses + * the complete /foo/bar/ portion, and the FileName is the + * empty string. Note that this is purely based on searching + * for the last trailing slash. And hence dont rely on this to + * be a definite file. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String fileName; */ + NS_IMETHOD GetFileName(nsACString & aFileName) = 0; + NS_IMETHOD SetFileName(const nsACString & aFileName) = 0; + + /************************************************************************* + * The URL filename is broken down even further: + */ +/** + * Returns the file basename portion of a filename in a url. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String fileBaseName; */ + NS_IMETHOD GetFileBaseName(nsACString & aFileBaseName) = 0; + NS_IMETHOD SetFileBaseName(const nsACString & aFileBaseName) = 0; + + /** + * Returns the file extension portion of a filename in a url. If a file + * extension does not exist, the empty string is returned. + * + * Some characters may be escaped. + */ + /* attribute AUTF8String fileExtension; */ + NS_IMETHOD GetFileExtension(nsACString & aFileExtension) = 0; + NS_IMETHOD SetFileExtension(const nsACString & aFileExtension) = 0; + + /** + * This method takes a uri and compares the two. The common uri portion + * is returned as a string. The minimum common uri portion is the + * protocol, and any of these if present: login, password, host and port + * If no commonality is found, "" is returned. If they are identical, the + * whole path with file/ref/etc. is returned. For file uris, it is + * expected that the common spec would be at least "file:///" since '/' is + * a shared common root. + * + * Examples: + * this.spec aURIToCompare.spec result + * 1) http://mozilla.org/ http://www.mozilla.org/ "" + * 2) http://foo.com/bar/ ftp://foo.com/bar/ "" + * 3) http://foo.com:8080/ http://foo.com/bar/ "" + * 4) ftp://user@foo.com/ ftp://user:pw@foo.com/ "" + * 5) ftp://foo.com/bar/ ftp://foo.com/bar ftp://foo.com/ + * 6) ftp://foo.com/bar/ ftp://foo.com/bar/b.html ftp://foo.com/bar/ + * 7) http://foo.com/a.htm#i http://foo.com/b.htm http://foo.com/ + * 8) ftp://foo.com/c.htm#i ftp://foo.com/c.htm ftp://foo.com/c.htm + * 9) file:///a/b/c.html file:///d/e/c.html file:/// + */ + /* AUTF8String getCommonBaseSpec (in nsIURI aURIToCompare); */ + NS_IMETHOD GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString & _retval) = 0; + + /** + * This method takes a uri and returns a substring of this if it can be + * made relative to the uri passed in. If no commonality is found, the + * entire uri spec is returned. If they are identical, "" is returned. + * Filename, query, etc are always returned except when uris are identical. + */ + /* AUTF8String getRelativeSpec (in nsIURI aURIToCompare); */ + NS_IMETHOD GetRelativeSpec(nsIURI *aURIToCompare, nsACString & _retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIURL \ + NS_IMETHOD GetFilePath(nsACString & aFilePath); \ + NS_IMETHOD SetFilePath(const nsACString & aFilePath); \ + NS_IMETHOD GetParam(nsACString & aParam); \ + NS_IMETHOD SetParam(const nsACString & aParam); \ + NS_IMETHOD GetQuery(nsACString & aQuery); \ + NS_IMETHOD SetQuery(const nsACString & aQuery); \ + NS_IMETHOD GetRef(nsACString & aRef); \ + NS_IMETHOD SetRef(const nsACString & aRef); \ + NS_IMETHOD GetDirectory(nsACString & aDirectory); \ + NS_IMETHOD SetDirectory(const nsACString & aDirectory); \ + NS_IMETHOD GetFileName(nsACString & aFileName); \ + NS_IMETHOD SetFileName(const nsACString & aFileName); \ + NS_IMETHOD GetFileBaseName(nsACString & aFileBaseName); \ + NS_IMETHOD SetFileBaseName(const nsACString & aFileBaseName); \ + NS_IMETHOD GetFileExtension(nsACString & aFileExtension); \ + NS_IMETHOD SetFileExtension(const nsACString & aFileExtension); \ + NS_IMETHOD GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString & _retval); \ + NS_IMETHOD GetRelativeSpec(nsIURI *aURIToCompare, nsACString & _retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIURL(_to) \ + NS_IMETHOD GetFilePath(nsACString & aFilePath) { return _to GetFilePath(aFilePath); } \ + NS_IMETHOD SetFilePath(const nsACString & aFilePath) { return _to SetFilePath(aFilePath); } \ + NS_IMETHOD GetParam(nsACString & aParam) { return _to GetParam(aParam); } \ + NS_IMETHOD SetParam(const nsACString & aParam) { return _to SetParam(aParam); } \ + NS_IMETHOD GetQuery(nsACString & aQuery) { return _to GetQuery(aQuery); } \ + NS_IMETHOD SetQuery(const nsACString & aQuery) { return _to SetQuery(aQuery); } \ + NS_IMETHOD GetRef(nsACString & aRef) { return _to GetRef(aRef); } \ + NS_IMETHOD SetRef(const nsACString & aRef) { return _to SetRef(aRef); } \ + NS_IMETHOD GetDirectory(nsACString & aDirectory) { return _to GetDirectory(aDirectory); } \ + NS_IMETHOD SetDirectory(const nsACString & aDirectory) { return _to SetDirectory(aDirectory); } \ + NS_IMETHOD GetFileName(nsACString & aFileName) { return _to GetFileName(aFileName); } \ + NS_IMETHOD SetFileName(const nsACString & aFileName) { return _to SetFileName(aFileName); } \ + NS_IMETHOD GetFileBaseName(nsACString & aFileBaseName) { return _to GetFileBaseName(aFileBaseName); } \ + NS_IMETHOD SetFileBaseName(const nsACString & aFileBaseName) { return _to SetFileBaseName(aFileBaseName); } \ + NS_IMETHOD GetFileExtension(nsACString & aFileExtension) { return _to GetFileExtension(aFileExtension); } \ + NS_IMETHOD SetFileExtension(const nsACString & aFileExtension) { return _to SetFileExtension(aFileExtension); } \ + NS_IMETHOD GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString & _retval) { return _to GetCommonBaseSpec(aURIToCompare, _retval); } \ + NS_IMETHOD GetRelativeSpec(nsIURI *aURIToCompare, nsACString & _retval) { return _to GetRelativeSpec(aURIToCompare, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIURL(_to) \ + NS_IMETHOD GetFilePath(nsACString & aFilePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilePath(aFilePath); } \ + NS_IMETHOD SetFilePath(const nsACString & aFilePath) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFilePath(aFilePath); } \ + NS_IMETHOD GetParam(nsACString & aParam) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParam(aParam); } \ + NS_IMETHOD SetParam(const nsACString & aParam) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetParam(aParam); } \ + NS_IMETHOD GetQuery(nsACString & aQuery) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetQuery(aQuery); } \ + NS_IMETHOD SetQuery(const nsACString & aQuery) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetQuery(aQuery); } \ + NS_IMETHOD GetRef(nsACString & aRef) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRef(aRef); } \ + NS_IMETHOD SetRef(const nsACString & aRef) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRef(aRef); } \ + NS_IMETHOD GetDirectory(nsACString & aDirectory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDirectory(aDirectory); } \ + NS_IMETHOD SetDirectory(const nsACString & aDirectory) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDirectory(aDirectory); } \ + NS_IMETHOD GetFileName(nsACString & aFileName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileName(aFileName); } \ + NS_IMETHOD SetFileName(const nsACString & aFileName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFileName(aFileName); } \ + NS_IMETHOD GetFileBaseName(nsACString & aFileBaseName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileBaseName(aFileBaseName); } \ + NS_IMETHOD SetFileBaseName(const nsACString & aFileBaseName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFileBaseName(aFileBaseName); } \ + NS_IMETHOD GetFileExtension(nsACString & aFileExtension) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileExtension(aFileExtension); } \ + NS_IMETHOD SetFileExtension(const nsACString & aFileExtension) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFileExtension(aFileExtension); } \ + NS_IMETHOD GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommonBaseSpec(aURIToCompare, _retval); } \ + NS_IMETHOD GetRelativeSpec(nsIURI *aURIToCompare, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRelativeSpec(aURIToCompare, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsURL : public nsIURL +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIURL + + nsURL(); + +private: + ~nsURL(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsURL, nsIURL) + +nsURL::nsURL() +{ + /* member initializers and constructor code */ +} + +nsURL::~nsURL() +{ + /* destructor code */ +} + +/* attribute AUTF8String filePath; */ +NS_IMETHODIMP nsURL::GetFilePath(nsACString & aFilePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURL::SetFilePath(const nsACString & aFilePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String param; */ +NS_IMETHODIMP nsURL::GetParam(nsACString & aParam) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURL::SetParam(const nsACString & aParam) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String query; */ +NS_IMETHODIMP nsURL::GetQuery(nsACString & aQuery) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURL::SetQuery(const nsACString & aQuery) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String ref; */ +NS_IMETHODIMP nsURL::GetRef(nsACString & aRef) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURL::SetRef(const nsACString & aRef) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String directory; */ +NS_IMETHODIMP nsURL::GetDirectory(nsACString & aDirectory) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURL::SetDirectory(const nsACString & aDirectory) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String fileName; */ +NS_IMETHODIMP nsURL::GetFileName(nsACString & aFileName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURL::SetFileName(const nsACString & aFileName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String fileBaseName; */ +NS_IMETHODIMP nsURL::GetFileBaseName(nsACString & aFileBaseName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURL::SetFileBaseName(const nsACString & aFileBaseName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute AUTF8String fileExtension; */ +NS_IMETHODIMP nsURL::GetFileExtension(nsACString & aFileExtension) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsURL::SetFileExtension(const nsACString & aFileExtension) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* AUTF8String getCommonBaseSpec (in nsIURI aURIToCompare); */ +NS_IMETHODIMP nsURL::GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* AUTF8String getRelativeSpec (in nsIURI aURIToCompare); */ +NS_IMETHODIMP nsURL::GetRelativeSpec(nsIURI *aURIToCompare, nsACString & _retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIURL_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIUnicharStreamListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIUnicharStreamListener.h new file mode 100644 index 00000000..43bee4e8 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIUnicharStreamListener.h @@ -0,0 +1,110 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIUnicharStreamListener.idl + */ + +#ifndef __gen_nsIUnicharStreamListener_h__ +#define __gen_nsIUnicharStreamListener_h__ + + +#ifndef __gen_nsIRequestObserver_h__ +#include "nsIRequestObserver.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIUnicharStreamListener */ +#define NS_IUNICHARSTREAMLISTENER_IID_STR "4a7e9b62-fef8-400d-9865-d6820f630b4c" + +#define NS_IUNICHARSTREAMLISTENER_IID \ + {0x4a7e9b62, 0xfef8, 0x400d, \ + { 0x98, 0x65, 0xd6, 0x82, 0x0f, 0x63, 0x0b, 0x4c }} + +/** + * nsIUnicharStreamListener is very similar to nsIStreamListener with + * the difference being that this interface gives notifications about + * data being available after the raw data has been converted to + * UTF-16. + * + * nsIUnicharStreamListener + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIUnicharStreamListener : public nsIRequestObserver { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICHARSTREAMLISTENER_IID) + + /** + * Called when the next chunk of data (corresponding to the + * request) is available. + * + * @param aRequest request corresponding to the source of the data + * @param aContext user defined context + * @param aData the data chunk + * + * An exception thrown from onUnicharDataAvailable has the + * side-effect of causing the request to be canceled. + */ + /* void onUnicharDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in AString aData); */ + NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIUNICHARSTREAMLISTENER \ + NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIUNICHARSTREAMLISTENER(_to) \ + NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) { return _to OnUnicharDataAvailable(aRequest, aContext, aData); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIUNICHARSTREAMLISTENER(_to) \ + NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnicharDataAvailable(aRequest, aContext, aData); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsUnicharStreamListener : public nsIUnicharStreamListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIUNICHARSTREAMLISTENER + + nsUnicharStreamListener(); + +private: + ~nsUnicharStreamListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsUnicharStreamListener, nsIUnicharStreamListener) + +nsUnicharStreamListener::nsUnicharStreamListener() +{ + /* member initializers and constructor code */ +} + +nsUnicharStreamListener::~nsUnicharStreamListener() +{ + /* destructor code */ +} + +/* void onUnicharDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in AString aData); */ +NS_IMETHODIMP nsUnicharStreamListener::OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIUnicharStreamListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIUploadChannel.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIUploadChannel.h new file mode 100644 index 00000000..e2701bc0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIUploadChannel.h @@ -0,0 +1,143 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIUploadChannel.idl + */ + +#ifndef __gen_nsIUploadChannel_h__ +#define __gen_nsIUploadChannel_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIInputStream; /* forward declaration */ + + +/* starting interface: nsIUploadChannel */ +#define NS_IUPLOADCHANNEL_IID_STR "ddf633d8-e9a4-439d-ad88-de636fd9bb75" + +#define NS_IUPLOADCHANNEL_IID \ + {0xddf633d8, 0xe9a4, 0x439d, \ + { 0xad, 0x88, 0xde, 0x63, 0x6f, 0xd9, 0xbb, 0x75 }} + +/** + * nsIUploadChannel + * + * A channel may optionally implement this interface if it supports the + * notion of uploading a data stream. The upload stream may only be set + * prior to the invocation of asyncOpen on the channel. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIUploadChannel : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUPLOADCHANNEL_IID) + + /** + * Sets a stream to be uploaded by this channel. + * + * Most implementations of this interface require that the stream: + * (1) implement threadsafe addRef and release + * (2) implement nsIInputStream::readSegments + * (3) implement nsISeekableStream::seek + * + * History here is that we need to support both streams that already have + * headers (e.g., Content-Type and Content-Length) information prepended to + * the stream (by plugins) as well as clients (composer, uploading + * application) that want to upload data streams without any knowledge of + * protocol specifications. For this reason, we have a special meaning + * for the aContentType parameter (see below). + * + * @param aStream + * The stream to be uploaded by this channel. + * @param aContentType + * If aContentType is empty, the protocol will assume that no + * content headers are to be added to the uploaded stream and that + * any required headers are already encoded in the stream. In the + * case of HTTP, if this parameter is non-empty, then its value will + * replace any existing Content-Type header on the HTTP request. + * In the case of FTP and FILE, this parameter is ignored. + * @param aContentLength + * A value of -1 indicates that the length of the stream should be + * determined by calling the stream's |available| method. + */ + /* void setUploadStream (in nsIInputStream aStream, in ACString aContentType, in long aContentLength); */ + NS_IMETHOD SetUploadStream(nsIInputStream *aStream, const nsACString & aContentType, PRInt32 aContentLength) = 0; + + /** + * Get the stream (to be) uploaded by this channel. + */ + /* readonly attribute nsIInputStream uploadStream; */ + NS_IMETHOD GetUploadStream(nsIInputStream * *aUploadStream) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIUPLOADCHANNEL \ + NS_IMETHOD SetUploadStream(nsIInputStream *aStream, const nsACString & aContentType, PRInt32 aContentLength); \ + NS_IMETHOD GetUploadStream(nsIInputStream * *aUploadStream); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIUPLOADCHANNEL(_to) \ + NS_IMETHOD SetUploadStream(nsIInputStream *aStream, const nsACString & aContentType, PRInt32 aContentLength) { return _to SetUploadStream(aStream, aContentType, aContentLength); } \ + NS_IMETHOD GetUploadStream(nsIInputStream * *aUploadStream) { return _to GetUploadStream(aUploadStream); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIUPLOADCHANNEL(_to) \ + NS_IMETHOD SetUploadStream(nsIInputStream *aStream, const nsACString & aContentType, PRInt32 aContentLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUploadStream(aStream, aContentType, aContentLength); } \ + NS_IMETHOD GetUploadStream(nsIInputStream * *aUploadStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUploadStream(aUploadStream); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsUploadChannel : public nsIUploadChannel +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIUPLOADCHANNEL + + nsUploadChannel(); + +private: + ~nsUploadChannel(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsUploadChannel, nsIUploadChannel) + +nsUploadChannel::nsUploadChannel() +{ + /* member initializers and constructor code */ +} + +nsUploadChannel::~nsUploadChannel() +{ + /* destructor code */ +} + +/* void setUploadStream (in nsIInputStream aStream, in ACString aContentType, in long aContentLength); */ +NS_IMETHODIMP nsUploadChannel::SetUploadStream(nsIInputStream *aStream, const nsACString & aContentType, PRInt32 aContentLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIInputStream uploadStream; */ +NS_IMETHODIMP nsUploadChannel::GetUploadStream(nsIInputStream * *aUploadStream) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIUploadChannel_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWeakReference.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWeakReference.h new file mode 100644 index 00000000..52a88764 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWeakReference.h @@ -0,0 +1,203 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsIWeakReference.idl + */ + +#ifndef __gen_nsIWeakReference_h__ +#define __gen_nsIWeakReference_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIWeakReference */ +#define NS_IWEAKREFERENCE_IID_STR "9188bc85-f92e-11d2-81ef-0060083a0bcf" + +#define NS_IWEAKREFERENCE_IID \ + {0x9188bc85, 0xf92e, 0x11d2, \ + { 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf }} + +/** + * An instance of |nsIWeakReference| is a proxy object that cooperates with + * its referent to give clients a non-owning, non-dangling reference. Clients + * own the proxy, and should generally manage it with an |nsCOMPtr| (see the + * type |nsWeakPtr| for a |typedef| name that stands out) as they would any + * other XPCOM object. The |QueryReferent| member function provides a + * (hopefully short-lived) owning reference on demand, through which clients + * can get useful access to the referent, while it still exists. + * + * @status FROZEN + * @version 1.0 + * @see nsISupportsWeakReference + * @see nsWeakReference + * @see nsWeakPtr + */ +class NS_NO_VTABLE nsIWeakReference : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEAKREFERENCE_IID) + + /** + * |QueryReferent| queries the referent, if it exists, and like |QueryInterface|, produces + * an owning reference to the desired interface. It is designed to look and act exactly + * like (a proxied) |QueryInterface|. Don't hold on to the produced interface permanently; + * that would defeat the purpose of using a non-owning |nsIWeakReference| in the first place. + */ + /* void QueryReferent (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ + NS_IMETHOD QueryReferent(const nsIID & uuid, void * *result) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEAKREFERENCE \ + NS_IMETHOD QueryReferent(const nsIID & uuid, void * *result); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEAKREFERENCE(_to) \ + NS_IMETHOD QueryReferent(const nsIID & uuid, void * *result) { return _to QueryReferent(uuid, result); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEAKREFERENCE(_to) \ + NS_IMETHOD QueryReferent(const nsIID & uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryReferent(uuid, result); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWeakReference : public nsIWeakReference +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEAKREFERENCE + + nsWeakReference(); + +private: + ~nsWeakReference(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWeakReference, nsIWeakReference) + +nsWeakReference::nsWeakReference() +{ + /* member initializers and constructor code */ +} + +nsWeakReference::~nsWeakReference() +{ + /* destructor code */ +} + +/* void QueryReferent (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ +NS_IMETHODIMP nsWeakReference::QueryReferent(const nsIID & uuid, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISupportsWeakReference */ +#define NS_ISUPPORTSWEAKREFERENCE_IID_STR "9188bc86-f92e-11d2-81ef-0060083a0bcf" + +#define NS_ISUPPORTSWEAKREFERENCE_IID \ + {0x9188bc86, 0xf92e, 0x11d2, \ + { 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf }} + +/** + * |nsISupportsWeakReference| is a factory interface which produces appropriate + * instances of |nsIWeakReference|. Weak references in this scheme can only be + * produced for objects that implement this interface. + * + * @status FROZEN + * @version 1.0 + * @see nsIWeakReference + * @see nsSupportsWeakReference + */ +class NS_NO_VTABLE nsISupportsWeakReference : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSWEAKREFERENCE_IID) + + /** + * |GetWeakReference| produces an appropriate instance of |nsIWeakReference|. + * As with all good XPCOM `getters', you own the resulting interface and should + * manage it with an |nsCOMPtr|. + * + * @see nsIWeakReference + * @see nsWeakPtr + * @see nsCOMPtr + */ + /* nsIWeakReference GetWeakReference (); */ + NS_IMETHOD GetWeakReference(nsIWeakReference **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTSWEAKREFERENCE \ + NS_IMETHOD GetWeakReference(nsIWeakReference **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTSWEAKREFERENCE(_to) \ + NS_IMETHOD GetWeakReference(nsIWeakReference **_retval) { return _to GetWeakReference(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTSWEAKREFERENCE(_to) \ + NS_IMETHOD GetWeakReference(nsIWeakReference **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWeakReference(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupportsWeakReference : public nsISupportsWeakReference +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTSWEAKREFERENCE + + nsSupportsWeakReference(); + +private: + ~nsSupportsWeakReference(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupportsWeakReference, nsISupportsWeakReference) + +nsSupportsWeakReference::nsSupportsWeakReference() +{ + /* member initializers and constructor code */ +} + +nsSupportsWeakReference::~nsSupportsWeakReference() +{ + /* destructor code */ +} + +/* nsIWeakReference GetWeakReference (); */ +NS_IMETHODIMP nsSupportsWeakReference::GetWeakReference(nsIWeakReference **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#ifdef MOZILLA_INTERNAL_API +#include "nsIWeakReferenceUtils.h" +#endif + +#endif /* __gen_nsIWeakReference_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWeakReferenceUtils.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWeakReferenceUtils.h new file mode 100644 index 00000000..30cb321e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWeakReferenceUtils.h @@ -0,0 +1,142 @@ +/* -*- Mode: IDL; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Scott Collins <scc@mozilla.org> (Original Author) + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsIWeakReferenceUtils_h__ +#define nsIWeakReferenceUtils_h__ + +#ifndef nsCOMPtr_h__ +#include "nsCOMPtr.h" +#endif + +typedef nsCOMPtr<nsIWeakReference> nsWeakPtr; + +/** + * + */ + +// a type-safe shortcut for calling the |QueryReferent()| member function +// T must inherit from nsIWeakReference, but the cast may be ambiguous. +template <class T, class DestinationType> +inline +nsresult +CallQueryReferent( T* aSource, DestinationType** aDestination ) + { + NS_PRECONDITION(aSource, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return aSource->QueryReferent(NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); + } + + +class NS_COM_GLUE nsQueryReferent : public nsCOMPtr_helper + { + public: + nsQueryReferent( nsIWeakReference* aWeakPtr, nsresult* error ) + : mWeakPtr(aWeakPtr), + mErrorPtr(error) + { + // nothing else to do here + } + + virtual nsresult NS_FASTCALL operator()( const nsIID& aIID, void** ) const; + + private: + nsIWeakReference* mWeakPtr; + nsresult* mErrorPtr; + }; + +inline +const nsQueryReferent +do_QueryReferent( nsIWeakReference* aRawPtr, nsresult* error = 0 ) + { + return nsQueryReferent(aRawPtr, error); + } + + + /** + * Deprecated, use |do_GetWeakReference| instead. + */ +extern NS_COM_GLUE +nsIWeakReference* +NS_GetWeakReference( nsISupports* , nsresult* aResult=0 ); + + /** + * |do_GetWeakReference| is a convenience function that bundles up all the work needed + * to get a weak reference to an arbitrary object, i.e., the |QueryInterface|, test, and + * call through to |GetWeakReference|, and put it into your |nsCOMPtr|. + * It is specifically designed to cooperate with |nsCOMPtr| (or |nsWeakPtr|) like so: + * |nsWeakPtr myWeakPtr = do_GetWeakReference(aPtr);|. + */ +inline +already_AddRefed<nsIWeakReference> +do_GetWeakReference( nsISupports* aRawPtr, nsresult* error = 0 ) + { + return NS_GetWeakReference(aRawPtr, error); + } + +inline +void +do_GetWeakReference( nsIWeakReference* aRawPtr, nsresult* error = 0 ) + { + // This signature exists soley to _stop_ you from doing a bad thing. + // Saying |do_GetWeakReference()| on a weak reference itself, + // is very likely to be a programmer error. + } + +template <class T> +inline +void +do_GetWeakReference( already_AddRefed<T>& ) + { + // This signature exists soley to _stop_ you from doing the bad thing. + // Saying |do_GetWeakReference()| on a pointer that is not otherwise owned by + // someone else is an automatic leak. See <http://bugzilla.mozilla.org/show_bug.cgi?id=8221>. + } + +template <class T> +inline +void +do_GetWeakReference( already_AddRefed<T>&, nsresult* ) + { + // This signature exists soley to _stop_ you from doing the bad thing. + // Saying |do_GetWeakReference()| on a pointer that is not otherwise owned by + // someone else is an automatic leak. See <http://bugzilla.mozilla.org/show_bug.cgi?id=8221>. + } + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowser.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowser.h new file mode 100644 index 00000000..edbaa781 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowser.h @@ -0,0 +1,273 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowser.idl + */ + +#ifndef __gen_nsIWebBrowser_h__ +#define __gen_nsIWebBrowser_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIInterfaceRequestor; /* forward declaration */ + +class nsIWebBrowserChrome; /* forward declaration */ + +class nsIURIContentListener; /* forward declaration */ + +class nsIDOMWindow; /* forward declaration */ + +class nsIWeakReference; /* forward declaration */ + + +/* starting interface: nsIWebBrowser */ +#define NS_IWEBBROWSER_IID_STR "69e5df00-7b8b-11d3-af61-00a024ffc08c" + +#define NS_IWEBBROWSER_IID \ + {0x69e5df00, 0x7b8b, 0x11d3, \ + { 0xaf, 0x61, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }} + +/** + * The nsIWebBrowser interface is implemented by web browser objects. + * Embedders use this interface during initialisation to associate + * the new web browser instance with the embedders chrome and + * to register any listeners. The interface may also be used at runtime + * to obtain the content DOM window and from that the rest of the DOM. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowser : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSER_IID) + + /** + * Registers a listener of the type specified by the iid to receive + * callbacks. The browser stores a weak reference to the listener + * to avoid any circular dependencies. + * Typically this method will be called to register an object + * to receive <CODE>nsIWebProgressListener</CODE> or + * <CODE>nsISHistoryListener</CODE> notifications in which case the + * the IID is that of the interface. + * + * @param aListener The listener to be added. + * @param aIID The IID of the interface that will be called + * on the listener as appropriate. + * @return <CODE>NS_OK</CODE> for successful registration; + * <CODE>NS_ERROR_INVALID_ARG</CODE> if aIID is not + * supposed to be registered using this method; + * <CODE>NS_ERROR_FAILURE</CODE> either aListener did not + * expose the interface specified by the IID, or some + * other internal error occurred. + * + * @see removeWebBrowserListener + * @see nsIWeakReference + * @see nsIWebProgressListener + * @see nsISHistoryListener + * + * @return <CODE>NS_OK</CODE>, listener was successfully added; + * <CODE>NS_ERROR_INVALID_ARG</CODE>, one of the arguments was + * invalid or the object did not implement the interface + * specified by the IID. + */ + /* void addWebBrowserListener (in nsIWeakReference aListener, in nsIIDRef aIID); */ + NS_IMETHOD AddWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID) = 0; + + /** + * Removes a previously registered listener. + * + * @param aListener The listener to be removed. + * @param aIID The IID of the interface on the listener that will + * no longer be called. + * + * @return <CODE>NS_OK</CODE>, listener was successfully removed; + * <CODE>NS_ERROR_INVALID_ARG</CODE> arguments was invalid or + * the object did not implement the interface specified by the IID. + * + * @see addWebBrowserListener + * @see nsIWeakReference + */ + /* void removeWebBrowserListener (in nsIWeakReference aListener, in nsIIDRef aIID); */ + NS_IMETHOD RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID) = 0; + + /** + * The chrome object associated with the browser instance. The embedder + * must create one chrome object for <I>each</I> browser object + * that is instantiated. The embedder must associate the two by setting + * this property to point to the chrome object before creating the browser + * window via the browser's <CODE>nsIBaseWindow</CODE> interface. + * + * The chrome object must also implement <CODE>nsIEmbeddingSiteWindow</CODE>. + * + * The chrome may optionally implement <CODE>nsIInterfaceRequestor</CODE>, + * <CODE>nsIWebBrowserChromeFocus</CODE>, + * <CODE>nsIContextMenuListener</CODE> and + * <CODE>nsITooltipListener</CODE> to receive additional notifications + * from the browser object. + * + * The chrome object may optionally implement <CODE>nsIWebProgressListener</CODE> + * instead of explicitly calling <CODE>addWebBrowserListener</CODE> and + * <CODE>removeWebBrowserListener</CODE> to register a progress listener + * object. If the implementation does this, it must also implement + * <CODE>nsIWeakReference</CODE>. + * + * @note The implementation should not refcount the supplied chrome + * object; it should assume that a non <CODE>nsnull</CODE> value is + * always valid. The embedder must explicitly set this value back + * to nsnull if the chrome object is destroyed before the browser + * object. + * + * @see nsIBaseWindow + * @see nsIWebBrowserChrome + * @see nsIEmbeddingSiteWindow + * @see nsIInterfaceRequestor + * @see nsIWebBrowserChromeFocus + * @see nsIContextMenuListener + * @see nsITooltipListener + * @see nsIWeakReference + * @see nsIWebProgressListener + */ + /* attribute nsIWebBrowserChrome containerWindow; */ + NS_IMETHOD GetContainerWindow(nsIWebBrowserChrome * *aContainerWindow) = 0; + NS_IMETHOD SetContainerWindow(nsIWebBrowserChrome * aContainerWindow) = 0; + + /** + * URI content listener parent. The embedder may set this property to + * their own implementation if they intend to override or prevent + * how certain kinds of content are loaded. + * + * @note If this attribute is set to an object that implements + * nsISupportsWeakReference, the implementation should get the + * nsIWeakReference and hold that. Otherwise, the implementation + * should not refcount this interface; it should assume that a non + * null value is always valid. In that case, the embedder should + * explicitly set this value back to null if the parent content + * listener is destroyed before the browser object. + * + * @see nsIURIContentListener + */ + /* attribute nsIURIContentListener parentURIContentListener; */ + NS_IMETHOD GetParentURIContentListener(nsIURIContentListener * *aParentURIContentListener) = 0; + NS_IMETHOD SetParentURIContentListener(nsIURIContentListener * aParentURIContentListener) = 0; + + /** + * The top-level DOM window. The embedder may walk the entire + * DOM starting from this value. + * + * @see nsIDOMWindow + */ + /* readonly attribute nsIDOMWindow contentDOMWindow; */ + NS_IMETHOD GetContentDOMWindow(nsIDOMWindow * *aContentDOMWindow) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSER \ + NS_IMETHOD AddWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID); \ + NS_IMETHOD RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID); \ + NS_IMETHOD GetContainerWindow(nsIWebBrowserChrome * *aContainerWindow); \ + NS_IMETHOD SetContainerWindow(nsIWebBrowserChrome * aContainerWindow); \ + NS_IMETHOD GetParentURIContentListener(nsIURIContentListener * *aParentURIContentListener); \ + NS_IMETHOD SetParentURIContentListener(nsIURIContentListener * aParentURIContentListener); \ + NS_IMETHOD GetContentDOMWindow(nsIDOMWindow * *aContentDOMWindow); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSER(_to) \ + NS_IMETHOD AddWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID) { return _to AddWebBrowserListener(aListener, aIID); } \ + NS_IMETHOD RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID) { return _to RemoveWebBrowserListener(aListener, aIID); } \ + NS_IMETHOD GetContainerWindow(nsIWebBrowserChrome * *aContainerWindow) { return _to GetContainerWindow(aContainerWindow); } \ + NS_IMETHOD SetContainerWindow(nsIWebBrowserChrome * aContainerWindow) { return _to SetContainerWindow(aContainerWindow); } \ + NS_IMETHOD GetParentURIContentListener(nsIURIContentListener * *aParentURIContentListener) { return _to GetParentURIContentListener(aParentURIContentListener); } \ + NS_IMETHOD SetParentURIContentListener(nsIURIContentListener * aParentURIContentListener) { return _to SetParentURIContentListener(aParentURIContentListener); } \ + NS_IMETHOD GetContentDOMWindow(nsIDOMWindow * *aContentDOMWindow) { return _to GetContentDOMWindow(aContentDOMWindow); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSER(_to) \ + NS_IMETHOD AddWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddWebBrowserListener(aListener, aIID); } \ + NS_IMETHOD RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveWebBrowserListener(aListener, aIID); } \ + NS_IMETHOD GetContainerWindow(nsIWebBrowserChrome * *aContainerWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContainerWindow(aContainerWindow); } \ + NS_IMETHOD SetContainerWindow(nsIWebBrowserChrome * aContainerWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContainerWindow(aContainerWindow); } \ + NS_IMETHOD GetParentURIContentListener(nsIURIContentListener * *aParentURIContentListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentURIContentListener(aParentURIContentListener); } \ + NS_IMETHOD SetParentURIContentListener(nsIURIContentListener * aParentURIContentListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetParentURIContentListener(aParentURIContentListener); } \ + NS_IMETHOD GetContentDOMWindow(nsIDOMWindow * *aContentDOMWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentDOMWindow(aContentDOMWindow); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowser : public nsIWebBrowser +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSER + + nsWebBrowser(); + +private: + ~nsWebBrowser(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowser, nsIWebBrowser) + +nsWebBrowser::nsWebBrowser() +{ + /* member initializers and constructor code */ +} + +nsWebBrowser::~nsWebBrowser() +{ + /* destructor code */ +} + +/* void addWebBrowserListener (in nsIWeakReference aListener, in nsIIDRef aIID); */ +NS_IMETHODIMP nsWebBrowser::AddWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeWebBrowserListener (in nsIWeakReference aListener, in nsIIDRef aIID); */ +NS_IMETHODIMP nsWebBrowser::RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID & aIID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIWebBrowserChrome containerWindow; */ +NS_IMETHODIMP nsWebBrowser::GetContainerWindow(nsIWebBrowserChrome * *aContainerWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowser::SetContainerWindow(nsIWebBrowserChrome * aContainerWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIURIContentListener parentURIContentListener; */ +NS_IMETHODIMP nsWebBrowser::GetParentURIContentListener(nsIURIContentListener * *aParentURIContentListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowser::SetParentURIContentListener(nsIURIContentListener * aParentURIContentListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMWindow contentDOMWindow; */ +NS_IMETHODIMP nsWebBrowser::GetContentDOMWindow(nsIDOMWindow * *aContentDOMWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebBrowser_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserChrome.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserChrome.h new file mode 100644 index 00000000..e7375ed5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserChrome.h @@ -0,0 +1,299 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowserChrome.idl + */ + +#ifndef __gen_nsIWebBrowserChrome_h__ +#define __gen_nsIWebBrowserChrome_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIWebBrowser; /* forward declaration */ + +class nsIDocShellTreeItem; /* forward declaration */ + + +/* starting interface: nsIWebBrowserChrome */ +#define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c" + +#define NS_IWEBBROWSERCHROME_IID \ + {0xba434c60, 0x9d52, 0x11d3, \ + { 0xaf, 0xb0, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }} + +/** + * nsIWebBrowserChrome corresponds to the top-level, outermost window + * containing an embedded Gecko web browser. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowserChrome : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERCHROME_IID) + + enum { STATUS_SCRIPT = 1U }; + + enum { STATUS_SCRIPT_DEFAULT = 2U }; + + enum { STATUS_LINK = 3U }; + + /** + * Called when the status text in the chrome needs to be updated. + * @param statusType indicates what is setting the text + * @param status status string. null is an acceptable value meaning + * no status. + */ + /* void setStatus (in unsigned long statusType, in wstring status); */ + NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) = 0; + + /** + * The currently loaded WebBrowser. The browser chrome may be + * told to set the WebBrowser object to a new object by setting this + * attribute. In this case the implementer is responsible for taking the + * new WebBrowser object and doing any necessary initialization or setup + * as if it had created the WebBrowser itself. This includes positioning + * setting up listeners etc. + */ + /* attribute nsIWebBrowser webBrowser; */ + NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) = 0; + NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) = 0; + + /** + * Definitions for the chrome flags + */ + enum { CHROME_DEFAULT = 1U }; + + enum { CHROME_WINDOW_BORDERS = 2U }; + + enum { CHROME_WINDOW_CLOSE = 4U }; + + enum { CHROME_WINDOW_RESIZE = 8U }; + + enum { CHROME_MENUBAR = 16U }; + + enum { CHROME_TOOLBAR = 32U }; + + enum { CHROME_LOCATIONBAR = 64U }; + + enum { CHROME_STATUSBAR = 128U }; + + enum { CHROME_PERSONAL_TOOLBAR = 256U }; + + enum { CHROME_SCROLLBARS = 512U }; + + enum { CHROME_TITLEBAR = 1024U }; + + enum { CHROME_EXTRA = 2048U }; + + enum { CHROME_WITH_SIZE = 4096U }; + + enum { CHROME_WITH_POSITION = 8192U }; + + enum { CHROME_WINDOW_MIN = 16384U }; + + enum { CHROME_WINDOW_POPUP = 32768U }; + + enum { CHROME_WINDOW_RAISED = 33554432U }; + + enum { CHROME_WINDOW_LOWERED = 67108864U }; + + enum { CHROME_CENTER_SCREEN = 134217728U }; + + enum { CHROME_DEPENDENT = 268435456U }; + + enum { CHROME_MODAL = 536870912U }; + + enum { CHROME_OPENAS_DIALOG = 1073741824U }; + + enum { CHROME_OPENAS_CHROME = 2147483648U }; + + enum { CHROME_ALL = 4094U }; + + /** + * The chrome flags for this browser chrome. The implementation should + * reflect the value of this attribute by hiding or showing its chrome + * appropriately. + */ + /* attribute unsigned long chromeFlags; */ + NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) = 0; + NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) = 0; + + /** + * Asks the implementer to destroy the window associated with this + * WebBrowser object. + */ + /* void destroyBrowserWindow (); */ + NS_IMETHOD DestroyBrowserWindow(void) = 0; + + /** + * Tells the chrome to size itself such that the browser will be the + * specified size. + * @param aCX new width of the browser + * @param aCY new height of the browser + */ + /* void sizeBrowserTo (in long aCX, in long aCY); */ + NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) = 0; + + /** + * Shows the window as a modal window. + * @return (the function error code) the status value specified by + * in exitModalEventLoop. + */ + /* void showAsModal (); */ + NS_IMETHOD ShowAsModal(void) = 0; + + /** + * Is the window modal (that is, currently executing a modal loop)? + * @return true if it's a modal window + */ + /* boolean isWindowModal (); */ + NS_IMETHOD IsWindowModal(PRBool *_retval) = 0; + + /** + * Exit a modal event loop if we're in one. The implementation + * should also exit out of the loop if the window is destroyed. + * @param aStatus - the result code to return from showAsModal + */ + /* void exitModalEventLoop (in nsresult aStatus); */ + NS_IMETHOD ExitModalEventLoop(nsresult aStatus) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSERCHROME \ + NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status); \ + NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser); \ + NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser); \ + NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags); \ + NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags); \ + NS_IMETHOD DestroyBrowserWindow(void); \ + NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY); \ + NS_IMETHOD ShowAsModal(void); \ + NS_IMETHOD IsWindowModal(PRBool *_retval); \ + NS_IMETHOD ExitModalEventLoop(nsresult aStatus); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSERCHROME(_to) \ + NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) { return _to SetStatus(statusType, status); } \ + NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) { return _to GetWebBrowser(aWebBrowser); } \ + NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) { return _to SetWebBrowser(aWebBrowser); } \ + NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) { return _to GetChromeFlags(aChromeFlags); } \ + NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) { return _to SetChromeFlags(aChromeFlags); } \ + NS_IMETHOD DestroyBrowserWindow(void) { return _to DestroyBrowserWindow(); } \ + NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) { return _to SizeBrowserTo(aCX, aCY); } \ + NS_IMETHOD ShowAsModal(void) { return _to ShowAsModal(); } \ + NS_IMETHOD IsWindowModal(PRBool *_retval) { return _to IsWindowModal(_retval); } \ + NS_IMETHOD ExitModalEventLoop(nsresult aStatus) { return _to ExitModalEventLoop(aStatus); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSERCHROME(_to) \ + NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStatus(statusType, status); } \ + NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWebBrowser(aWebBrowser); } \ + NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWebBrowser(aWebBrowser); } \ + NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromeFlags(aChromeFlags); } \ + NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChromeFlags(aChromeFlags); } \ + NS_IMETHOD DestroyBrowserWindow(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DestroyBrowserWindow(); } \ + NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeBrowserTo(aCX, aCY); } \ + NS_IMETHOD ShowAsModal(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowAsModal(); } \ + NS_IMETHOD IsWindowModal(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsWindowModal(_retval); } \ + NS_IMETHOD ExitModalEventLoop(nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExitModalEventLoop(aStatus); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowserChrome : public nsIWebBrowserChrome +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSERCHROME + + nsWebBrowserChrome(); + +private: + ~nsWebBrowserChrome(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowserChrome, nsIWebBrowserChrome) + +nsWebBrowserChrome::nsWebBrowserChrome() +{ + /* member initializers and constructor code */ +} + +nsWebBrowserChrome::~nsWebBrowserChrome() +{ + /* destructor code */ +} + +/* void setStatus (in unsigned long statusType, in wstring status); */ +NS_IMETHODIMP nsWebBrowserChrome::SetStatus(PRUint32 statusType, const PRUnichar *status) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIWebBrowser webBrowser; */ +NS_IMETHODIMP nsWebBrowserChrome::GetWebBrowser(nsIWebBrowser * *aWebBrowser) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserChrome::SetWebBrowser(nsIWebBrowser * aWebBrowser) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute unsigned long chromeFlags; */ +NS_IMETHODIMP nsWebBrowserChrome::GetChromeFlags(PRUint32 *aChromeFlags) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserChrome::SetChromeFlags(PRUint32 aChromeFlags) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void destroyBrowserWindow (); */ +NS_IMETHODIMP nsWebBrowserChrome::DestroyBrowserWindow() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void sizeBrowserTo (in long aCX, in long aCY); */ +NS_IMETHODIMP nsWebBrowserChrome::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void showAsModal (); */ +NS_IMETHODIMP nsWebBrowserChrome::ShowAsModal() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isWindowModal (); */ +NS_IMETHODIMP nsWebBrowserChrome::IsWindowModal(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void exitModalEventLoop (in nsresult aStatus); */ +NS_IMETHODIMP nsWebBrowserChrome::ExitModalEventLoop(nsresult aStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebBrowserChrome_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserChromeFocus.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserChromeFocus.h new file mode 100644 index 00000000..95bc1ca3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserChromeFocus.h @@ -0,0 +1,114 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowserChromeFocus.idl + */ + +#ifndef __gen_nsIWebBrowserChromeFocus_h__ +#define __gen_nsIWebBrowserChromeFocus_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIWebBrowserChromeFocus */ +#define NS_IWEBBROWSERCHROMEFOCUS_IID_STR "d2206418-1dd1-11b2-8e55-acddcd2bcfb8" + +#define NS_IWEBBROWSERCHROMEFOCUS_IID \ + {0xd2206418, 0x1dd1, 0x11b2, \ + { 0x8e, 0x55, 0xac, 0xdd, 0xcd, 0x2b, 0xcf, 0xb8 }} + +/** + * The nsIWebBrowserChromeFocus is implemented by the same object as the + * nsIEmbeddingSiteWindow. It represents the focus up-calls from mozilla + * to the embedding chrome. See mozilla bug #70224 for gratuitous info. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowserChromeFocus : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERCHROMEFOCUS_IID) + + /** + * Set the focus at the next focusable element in the chrome. + */ + /* void focusNextElement (); */ + NS_IMETHOD FocusNextElement(void) = 0; + + /** + * Set the focus at the previous focusable element in the chrome. + */ + /* void focusPrevElement (); */ + NS_IMETHOD FocusPrevElement(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSERCHROMEFOCUS \ + NS_IMETHOD FocusNextElement(void); \ + NS_IMETHOD FocusPrevElement(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSERCHROMEFOCUS(_to) \ + NS_IMETHOD FocusNextElement(void) { return _to FocusNextElement(); } \ + NS_IMETHOD FocusPrevElement(void) { return _to FocusPrevElement(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSERCHROMEFOCUS(_to) \ + NS_IMETHOD FocusNextElement(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FocusNextElement(); } \ + NS_IMETHOD FocusPrevElement(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FocusPrevElement(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowserChromeFocus : public nsIWebBrowserChromeFocus +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSERCHROMEFOCUS + + nsWebBrowserChromeFocus(); + +private: + ~nsWebBrowserChromeFocus(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowserChromeFocus, nsIWebBrowserChromeFocus) + +nsWebBrowserChromeFocus::nsWebBrowserChromeFocus() +{ + /* member initializers and constructor code */ +} + +nsWebBrowserChromeFocus::~nsWebBrowserChromeFocus() +{ + /* destructor code */ +} + +/* void focusNextElement (); */ +NS_IMETHODIMP nsWebBrowserChromeFocus::FocusNextElement() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void focusPrevElement (); */ +NS_IMETHODIMP nsWebBrowserChromeFocus::FocusPrevElement() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebBrowserChromeFocus_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserFind.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserFind.h new file mode 100644 index 00000000..8c985007 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserFind.h @@ -0,0 +1,453 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/components/find/public/nsIWebBrowserFind.idl + */ + +#ifndef __gen_nsIWebBrowserFind_h__ +#define __gen_nsIWebBrowserFind_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_domstubs_h__ +#include "domstubs.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIWebBrowserFind */ +#define NS_IWEBBROWSERFIND_IID_STR "2f977d44-5485-11d4-87e2-0010a4e75ef2" + +#define NS_IWEBBROWSERFIND_IID \ + {0x2f977d44, 0x5485, 0x11d4, \ + { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 }} + +/** + * nsIWebBrowserFind + * + * Searches for text in a web browser. + * + * Get one by doing a GetInterface on an nsIWebBrowser. + * + * By default, the implementation will search the focussed frame, or + * if there is no focussed frame, the web browser content area. It + * does not by default search subframes or iframes. To change this + * behaviour, and to explicitly set the frame to search, + * QueryInterface to nsIWebBrowserFindInFrames. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowserFind : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERFIND_IID) + + /** + * findNext + * + * Finds, highlights, and scrolls into view the next occurrence of the + * search string, using the current search settings. Fails if the + * search string is empty. + * + * @return Whether an occurrence was found + */ + /* boolean findNext (); */ + NS_IMETHOD FindNext(PRBool *_retval) = 0; + + /** + * searchString + * + * The string to search for. This must be non-empty to search. + */ + /* attribute wstring searchString; */ + NS_IMETHOD GetSearchString(PRUnichar * *aSearchString) = 0; + NS_IMETHOD SetSearchString(const PRUnichar * aSearchString) = 0; + + /** + * findBackwards + * + * Whether to find backwards (towards the beginning of the document). + * Default is false (search forward). + */ + /* attribute boolean findBackwards; */ + NS_IMETHOD GetFindBackwards(PRBool *aFindBackwards) = 0; + NS_IMETHOD SetFindBackwards(PRBool aFindBackwards) = 0; + + /** + * wrapFind + * + * Whether the search wraps around to the start (or end) of the document + * if no match was found between the current position and the end (or + * beginning). Works correctly when searching backwards. Default is + * false. + */ + /* attribute boolean wrapFind; */ + NS_IMETHOD GetWrapFind(PRBool *aWrapFind) = 0; + NS_IMETHOD SetWrapFind(PRBool aWrapFind) = 0; + + /** + * entireWord + * + * Whether to match entire words only. Default is false. + */ + /* attribute boolean entireWord; */ + NS_IMETHOD GetEntireWord(PRBool *aEntireWord) = 0; + NS_IMETHOD SetEntireWord(PRBool aEntireWord) = 0; + + /** + * matchCase + * + * Whether to match case (case sensitive) when searching. Default is false. + */ + /* attribute boolean matchCase; */ + NS_IMETHOD GetMatchCase(PRBool *aMatchCase) = 0; + NS_IMETHOD SetMatchCase(PRBool aMatchCase) = 0; + + /** + * searchFrames + * + * Whether to search through all frames in the content area. Default is true. + * + * Note that you can control whether the search propagates into child or + * parent frames explicitly using nsIWebBrowserFindInFrames, but if one, + * but not both, of searchSubframes and searchParentFrames are set, this + * returns false. + */ + /* attribute boolean searchFrames; */ + NS_IMETHOD GetSearchFrames(PRBool *aSearchFrames) = 0; + NS_IMETHOD SetSearchFrames(PRBool aSearchFrames) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSERFIND \ + NS_IMETHOD FindNext(PRBool *_retval); \ + NS_IMETHOD GetSearchString(PRUnichar * *aSearchString); \ + NS_IMETHOD SetSearchString(const PRUnichar * aSearchString); \ + NS_IMETHOD GetFindBackwards(PRBool *aFindBackwards); \ + NS_IMETHOD SetFindBackwards(PRBool aFindBackwards); \ + NS_IMETHOD GetWrapFind(PRBool *aWrapFind); \ + NS_IMETHOD SetWrapFind(PRBool aWrapFind); \ + NS_IMETHOD GetEntireWord(PRBool *aEntireWord); \ + NS_IMETHOD SetEntireWord(PRBool aEntireWord); \ + NS_IMETHOD GetMatchCase(PRBool *aMatchCase); \ + NS_IMETHOD SetMatchCase(PRBool aMatchCase); \ + NS_IMETHOD GetSearchFrames(PRBool *aSearchFrames); \ + NS_IMETHOD SetSearchFrames(PRBool aSearchFrames); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSERFIND(_to) \ + NS_IMETHOD FindNext(PRBool *_retval) { return _to FindNext(_retval); } \ + NS_IMETHOD GetSearchString(PRUnichar * *aSearchString) { return _to GetSearchString(aSearchString); } \ + NS_IMETHOD SetSearchString(const PRUnichar * aSearchString) { return _to SetSearchString(aSearchString); } \ + NS_IMETHOD GetFindBackwards(PRBool *aFindBackwards) { return _to GetFindBackwards(aFindBackwards); } \ + NS_IMETHOD SetFindBackwards(PRBool aFindBackwards) { return _to SetFindBackwards(aFindBackwards); } \ + NS_IMETHOD GetWrapFind(PRBool *aWrapFind) { return _to GetWrapFind(aWrapFind); } \ + NS_IMETHOD SetWrapFind(PRBool aWrapFind) { return _to SetWrapFind(aWrapFind); } \ + NS_IMETHOD GetEntireWord(PRBool *aEntireWord) { return _to GetEntireWord(aEntireWord); } \ + NS_IMETHOD SetEntireWord(PRBool aEntireWord) { return _to SetEntireWord(aEntireWord); } \ + NS_IMETHOD GetMatchCase(PRBool *aMatchCase) { return _to GetMatchCase(aMatchCase); } \ + NS_IMETHOD SetMatchCase(PRBool aMatchCase) { return _to SetMatchCase(aMatchCase); } \ + NS_IMETHOD GetSearchFrames(PRBool *aSearchFrames) { return _to GetSearchFrames(aSearchFrames); } \ + NS_IMETHOD SetSearchFrames(PRBool aSearchFrames) { return _to SetSearchFrames(aSearchFrames); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSERFIND(_to) \ + NS_IMETHOD FindNext(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindNext(_retval); } \ + NS_IMETHOD GetSearchString(PRUnichar * *aSearchString) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSearchString(aSearchString); } \ + NS_IMETHOD SetSearchString(const PRUnichar * aSearchString) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSearchString(aSearchString); } \ + NS_IMETHOD GetFindBackwards(PRBool *aFindBackwards) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFindBackwards(aFindBackwards); } \ + NS_IMETHOD SetFindBackwards(PRBool aFindBackwards) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFindBackwards(aFindBackwards); } \ + NS_IMETHOD GetWrapFind(PRBool *aWrapFind) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWrapFind(aWrapFind); } \ + NS_IMETHOD SetWrapFind(PRBool aWrapFind) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWrapFind(aWrapFind); } \ + NS_IMETHOD GetEntireWord(PRBool *aEntireWord) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntireWord(aEntireWord); } \ + NS_IMETHOD SetEntireWord(PRBool aEntireWord) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEntireWord(aEntireWord); } \ + NS_IMETHOD GetMatchCase(PRBool *aMatchCase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMatchCase(aMatchCase); } \ + NS_IMETHOD SetMatchCase(PRBool aMatchCase) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMatchCase(aMatchCase); } \ + NS_IMETHOD GetSearchFrames(PRBool *aSearchFrames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSearchFrames(aSearchFrames); } \ + NS_IMETHOD SetSearchFrames(PRBool aSearchFrames) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSearchFrames(aSearchFrames); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowserFind : public nsIWebBrowserFind +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSERFIND + + nsWebBrowserFind(); + +private: + ~nsWebBrowserFind(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowserFind, nsIWebBrowserFind) + +nsWebBrowserFind::nsWebBrowserFind() +{ + /* member initializers and constructor code */ +} + +nsWebBrowserFind::~nsWebBrowserFind() +{ + /* destructor code */ +} + +/* boolean findNext (); */ +NS_IMETHODIMP nsWebBrowserFind::FindNext(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute wstring searchString; */ +NS_IMETHODIMP nsWebBrowserFind::GetSearchString(PRUnichar * *aSearchString) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFind::SetSearchString(const PRUnichar * aSearchString) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean findBackwards; */ +NS_IMETHODIMP nsWebBrowserFind::GetFindBackwards(PRBool *aFindBackwards) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFind::SetFindBackwards(PRBool aFindBackwards) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean wrapFind; */ +NS_IMETHODIMP nsWebBrowserFind::GetWrapFind(PRBool *aWrapFind) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFind::SetWrapFind(PRBool aWrapFind) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean entireWord; */ +NS_IMETHODIMP nsWebBrowserFind::GetEntireWord(PRBool *aEntireWord) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFind::SetEntireWord(PRBool aEntireWord) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean matchCase; */ +NS_IMETHODIMP nsWebBrowserFind::GetMatchCase(PRBool *aMatchCase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFind::SetMatchCase(PRBool aMatchCase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean searchFrames; */ +NS_IMETHODIMP nsWebBrowserFind::GetSearchFrames(PRBool *aSearchFrames) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFind::SetSearchFrames(PRBool aSearchFrames) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsIWebBrowserFindInFrames */ +#define NS_IWEBBROWSERFINDINFRAMES_IID_STR "e0f5d182-34bc-11d5-be5b-b760676c6ebc" + +#define NS_IWEBBROWSERFINDINFRAMES_IID \ + {0xe0f5d182, 0x34bc, 0x11d5, \ + { 0xbe, 0x5b, 0xb7, 0x60, 0x67, 0x6c, 0x6e, 0xbc }} + +/** + * nsIWebBrowserFindInFrames + * + * Controls how find behaves when multiple frames or iframes are present. + * + * Get by doing a QueryInterface from nsIWebBrowserFind. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowserFindInFrames : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERFINDINFRAMES_IID) + + /** + * currentSearchFrame + * + * Frame at which to start the search. Once the search is done, this will + * be set to be the last frame searched, whether or not a result was found. + * Has to be equal to or contained within the rootSearchFrame. + */ + /* attribute nsIDOMWindow currentSearchFrame; */ + NS_IMETHOD GetCurrentSearchFrame(nsIDOMWindow * *aCurrentSearchFrame) = 0; + NS_IMETHOD SetCurrentSearchFrame(nsIDOMWindow * aCurrentSearchFrame) = 0; + + /** + * rootSearchFrame + * + * Frame within which to confine the search (normally the content area frame). + * Set this to only search a subtree of the frame hierarchy. + */ + /* attribute nsIDOMWindow rootSearchFrame; */ + NS_IMETHOD GetRootSearchFrame(nsIDOMWindow * *aRootSearchFrame) = 0; + NS_IMETHOD SetRootSearchFrame(nsIDOMWindow * aRootSearchFrame) = 0; + + /** + * searchSubframes + * + * Whether to recurse down into subframes while searching. Default is true. + * + * Setting nsIWebBrowserfind.searchFrames to true sets this to true. + */ + /* attribute boolean searchSubframes; */ + NS_IMETHOD GetSearchSubframes(PRBool *aSearchSubframes) = 0; + NS_IMETHOD SetSearchSubframes(PRBool aSearchSubframes) = 0; + + /** + * searchParentFrames + * + * Whether to allow the search to propagate out of the currentSearchFrame into its + * parent frame(s). Search is always confined within the rootSearchFrame. Default + * is true. + * + * Setting nsIWebBrowserfind.searchFrames to true sets this to true. + */ + /* attribute boolean searchParentFrames; */ + NS_IMETHOD GetSearchParentFrames(PRBool *aSearchParentFrames) = 0; + NS_IMETHOD SetSearchParentFrames(PRBool aSearchParentFrames) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSERFINDINFRAMES \ + NS_IMETHOD GetCurrentSearchFrame(nsIDOMWindow * *aCurrentSearchFrame); \ + NS_IMETHOD SetCurrentSearchFrame(nsIDOMWindow * aCurrentSearchFrame); \ + NS_IMETHOD GetRootSearchFrame(nsIDOMWindow * *aRootSearchFrame); \ + NS_IMETHOD SetRootSearchFrame(nsIDOMWindow * aRootSearchFrame); \ + NS_IMETHOD GetSearchSubframes(PRBool *aSearchSubframes); \ + NS_IMETHOD SetSearchSubframes(PRBool aSearchSubframes); \ + NS_IMETHOD GetSearchParentFrames(PRBool *aSearchParentFrames); \ + NS_IMETHOD SetSearchParentFrames(PRBool aSearchParentFrames); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSERFINDINFRAMES(_to) \ + NS_IMETHOD GetCurrentSearchFrame(nsIDOMWindow * *aCurrentSearchFrame) { return _to GetCurrentSearchFrame(aCurrentSearchFrame); } \ + NS_IMETHOD SetCurrentSearchFrame(nsIDOMWindow * aCurrentSearchFrame) { return _to SetCurrentSearchFrame(aCurrentSearchFrame); } \ + NS_IMETHOD GetRootSearchFrame(nsIDOMWindow * *aRootSearchFrame) { return _to GetRootSearchFrame(aRootSearchFrame); } \ + NS_IMETHOD SetRootSearchFrame(nsIDOMWindow * aRootSearchFrame) { return _to SetRootSearchFrame(aRootSearchFrame); } \ + NS_IMETHOD GetSearchSubframes(PRBool *aSearchSubframes) { return _to GetSearchSubframes(aSearchSubframes); } \ + NS_IMETHOD SetSearchSubframes(PRBool aSearchSubframes) { return _to SetSearchSubframes(aSearchSubframes); } \ + NS_IMETHOD GetSearchParentFrames(PRBool *aSearchParentFrames) { return _to GetSearchParentFrames(aSearchParentFrames); } \ + NS_IMETHOD SetSearchParentFrames(PRBool aSearchParentFrames) { return _to SetSearchParentFrames(aSearchParentFrames); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSERFINDINFRAMES(_to) \ + NS_IMETHOD GetCurrentSearchFrame(nsIDOMWindow * *aCurrentSearchFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentSearchFrame(aCurrentSearchFrame); } \ + NS_IMETHOD SetCurrentSearchFrame(nsIDOMWindow * aCurrentSearchFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentSearchFrame(aCurrentSearchFrame); } \ + NS_IMETHOD GetRootSearchFrame(nsIDOMWindow * *aRootSearchFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRootSearchFrame(aRootSearchFrame); } \ + NS_IMETHOD SetRootSearchFrame(nsIDOMWindow * aRootSearchFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRootSearchFrame(aRootSearchFrame); } \ + NS_IMETHOD GetSearchSubframes(PRBool *aSearchSubframes) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSearchSubframes(aSearchSubframes); } \ + NS_IMETHOD SetSearchSubframes(PRBool aSearchSubframes) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSearchSubframes(aSearchSubframes); } \ + NS_IMETHOD GetSearchParentFrames(PRBool *aSearchParentFrames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSearchParentFrames(aSearchParentFrames); } \ + NS_IMETHOD SetSearchParentFrames(PRBool aSearchParentFrames) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSearchParentFrames(aSearchParentFrames); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowserFindInFrames : public nsIWebBrowserFindInFrames +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSERFINDINFRAMES + + nsWebBrowserFindInFrames(); + +private: + ~nsWebBrowserFindInFrames(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowserFindInFrames, nsIWebBrowserFindInFrames) + +nsWebBrowserFindInFrames::nsWebBrowserFindInFrames() +{ + /* member initializers and constructor code */ +} + +nsWebBrowserFindInFrames::~nsWebBrowserFindInFrames() +{ + /* destructor code */ +} + +/* attribute nsIDOMWindow currentSearchFrame; */ +NS_IMETHODIMP nsWebBrowserFindInFrames::GetCurrentSearchFrame(nsIDOMWindow * *aCurrentSearchFrame) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFindInFrames::SetCurrentSearchFrame(nsIDOMWindow * aCurrentSearchFrame) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIDOMWindow rootSearchFrame; */ +NS_IMETHODIMP nsWebBrowserFindInFrames::GetRootSearchFrame(nsIDOMWindow * *aRootSearchFrame) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFindInFrames::SetRootSearchFrame(nsIDOMWindow * aRootSearchFrame) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean searchSubframes; */ +NS_IMETHODIMP nsWebBrowserFindInFrames::GetSearchSubframes(PRBool *aSearchSubframes) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFindInFrames::SetSearchSubframes(PRBool aSearchSubframes) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute boolean searchParentFrames; */ +NS_IMETHODIMP nsWebBrowserFindInFrames::GetSearchParentFrames(PRBool *aSearchParentFrames) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFindInFrames::SetSearchParentFrames(PRBool aSearchParentFrames) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebBrowserFind_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserFocus.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserFocus.h new file mode 100644 index 00000000..56c721ff --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserFocus.h @@ -0,0 +1,220 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowserFocus.idl + */ + +#ifndef __gen_nsIWebBrowserFocus_h__ +#define __gen_nsIWebBrowserFocus_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMWindow; /* forward declaration */ + +class nsIDOMElement; /* forward declaration */ + + +/* starting interface: nsIWebBrowserFocus */ +#define NS_IWEBBROWSERFOCUS_IID_STR "9c5d3c58-1dd1-11b2-a1c9-f3699284657a" + +#define NS_IWEBBROWSERFOCUS_IID \ + {0x9c5d3c58, 0x1dd1, 0x11b2, \ + { 0xa1, 0xc9, 0xf3, 0x69, 0x92, 0x84, 0x65, 0x7a }} + +/** + * nsIWebBrowserFocus + * Interface that embedders use for controlling and interacting + * with the browser focus management. The embedded browser can be focused by + * clicking in it or tabbing into it. If the browser is currently focused and + * the embedding application's top level window is disabled, deactivate() must + * be called, and activate() called again when the top level window is + * reactivated for the browser's focus memory to work correctly. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowserFocus : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERFOCUS_IID) + + /** + * MANDATORY + * activate() is a mandatory call that must be made to the browser + * when the embedding application's window is activated *and* the + * browser area was the last thing in focus. This method can also be called + * if the embedding application wishes to give the browser area focus, + * without affecting the currently focused element within the browser. + * + * @note + * If you fail to make this call, mozilla focus memory will not work + * correctly. + */ + /* void activate (); */ + NS_IMETHOD Activate(void) = 0; + + /** + * MANDATORY + * deactivate() is a mandatory call that must be made to the browser + * when the embedding application's window is deactivated *and* the + * browser area was the last thing in focus. On non-windows platforms, + * deactivate() should also be called when focus moves from the browser + * to the embedding chrome. + * + * @note + * If you fail to make this call, mozilla focus memory will not work + * correctly. + */ + /* void deactivate (); */ + NS_IMETHOD Deactivate(void) = 0; + + /** + * Give the first element focus within mozilla + * (i.e. TAB was pressed and focus should enter mozilla) + */ + /* void setFocusAtFirstElement (); */ + NS_IMETHOD SetFocusAtFirstElement(void) = 0; + + /** + * Give the last element focus within mozilla + * (i.e. SHIFT-TAB was pressed and focus should enter mozilla) + */ + /* void setFocusAtLastElement (); */ + NS_IMETHOD SetFocusAtLastElement(void) = 0; + + /** + * The currently focused nsDOMWindow when the browser is active, + * or the last focused nsDOMWindow when the browser is inactive. + */ + /* attribute nsIDOMWindow focusedWindow; */ + NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) = 0; + NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) = 0; + + /** + * The currently focused nsDOMElement when the browser is active, + * or the last focused nsDOMElement when the browser is inactive. + */ + /* attribute nsIDOMElement focusedElement; */ + NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) = 0; + NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSERFOCUS \ + NS_IMETHOD Activate(void); \ + NS_IMETHOD Deactivate(void); \ + NS_IMETHOD SetFocusAtFirstElement(void); \ + NS_IMETHOD SetFocusAtLastElement(void); \ + NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow); \ + NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow); \ + NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement); \ + NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSERFOCUS(_to) \ + NS_IMETHOD Activate(void) { return _to Activate(); } \ + NS_IMETHOD Deactivate(void) { return _to Deactivate(); } \ + NS_IMETHOD SetFocusAtFirstElement(void) { return _to SetFocusAtFirstElement(); } \ + NS_IMETHOD SetFocusAtLastElement(void) { return _to SetFocusAtLastElement(); } \ + NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return _to GetFocusedWindow(aFocusedWindow); } \ + NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) { return _to SetFocusedWindow(aFocusedWindow); } \ + NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return _to GetFocusedElement(aFocusedElement); } \ + NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) { return _to SetFocusedElement(aFocusedElement); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSERFOCUS(_to) \ + NS_IMETHOD Activate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Activate(); } \ + NS_IMETHOD Deactivate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Deactivate(); } \ + NS_IMETHOD SetFocusAtFirstElement(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusAtFirstElement(); } \ + NS_IMETHOD SetFocusAtLastElement(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusAtLastElement(); } \ + NS_IMETHOD GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedWindow(aFocusedWindow); } \ + NS_IMETHOD SetFocusedWindow(nsIDOMWindow * aFocusedWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusedWindow(aFocusedWindow); } \ + NS_IMETHOD GetFocusedElement(nsIDOMElement * *aFocusedElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedElement(aFocusedElement); } \ + NS_IMETHOD SetFocusedElement(nsIDOMElement * aFocusedElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFocusedElement(aFocusedElement); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowserFocus : public nsIWebBrowserFocus +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSERFOCUS + + nsWebBrowserFocus(); + +private: + ~nsWebBrowserFocus(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowserFocus, nsIWebBrowserFocus) + +nsWebBrowserFocus::nsWebBrowserFocus() +{ + /* member initializers and constructor code */ +} + +nsWebBrowserFocus::~nsWebBrowserFocus() +{ + /* destructor code */ +} + +/* void activate (); */ +NS_IMETHODIMP nsWebBrowserFocus::Activate() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deactivate (); */ +NS_IMETHODIMP nsWebBrowserFocus::Deactivate() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setFocusAtFirstElement (); */ +NS_IMETHODIMP nsWebBrowserFocus::SetFocusAtFirstElement() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setFocusAtLastElement (); */ +NS_IMETHODIMP nsWebBrowserFocus::SetFocusAtLastElement() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIDOMWindow focusedWindow; */ +NS_IMETHODIMP nsWebBrowserFocus::GetFocusedWindow(nsIDOMWindow * *aFocusedWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFocus::SetFocusedWindow(nsIDOMWindow * aFocusedWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIDOMElement focusedElement; */ +NS_IMETHODIMP nsWebBrowserFocus::GetFocusedElement(nsIDOMElement * *aFocusedElement) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWebBrowserFocus::SetFocusedElement(nsIDOMElement * aFocusedElement) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebBrowserFocus_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserPrint.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserPrint.h new file mode 100644 index 00000000..2742749f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserPrint.h @@ -0,0 +1,381 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowserPrint.idl + */ + +#ifndef __gen_nsIWebBrowserPrint_h__ +#define __gen_nsIWebBrowserPrint_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMWindow; /* forward declaration */ + +class nsIPrintSettings; /* forward declaration */ + +class nsIWebProgressListener; /* forward declaration */ + + +/* starting interface: nsIWebBrowserPrint */ +#define NS_IWEBBROWSERPRINT_IID_STR "9a7ca4b0-fbba-11d4-a869-00105a183419" + +#define NS_IWEBBROWSERPRINT_IID \ + {0x9a7ca4b0, 0xfbba, 0x11d4, \ + { 0xa8, 0x69, 0x00, 0x10, 0x5a, 0x18, 0x34, 0x19 }} + +/** + * nsIWebBrowserPrint corresponds to the main interface + * for printing an embedded Gecko web browser window/document + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowserPrint : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERPRINT_IID) + + /** + * PrintPreview Navigation Constants + */ + enum { PRINTPREVIEW_GOTO_PAGENUM = 0 }; + + enum { PRINTPREVIEW_PREV_PAGE = 1 }; + + enum { PRINTPREVIEW_NEXT_PAGE = 2 }; + + enum { PRINTPREVIEW_HOME = 3 }; + + enum { PRINTPREVIEW_END = 4 }; + + /** + * Returns a "global" PrintSettings object + * Creates a new the first time, if one doesn't exist. + * + * Then returns the same object each time after that. + * + * Initializes the globalPrintSettings from the default printer + */ + /* readonly attribute nsIPrintSettings globalPrintSettings; */ + NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) = 0; + + /** + * Returns a pointer to the PrintSettings object that + * that was passed into either "print" or "print preview" + * + * This enables any consumers of the interface to have access + * to the "current" PrintSetting at later points in the execution + */ + /* readonly attribute nsIPrintSettings currentPrintSettings; */ + NS_IMETHOD GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) = 0; + + /** + * Returns a pointer to the current child DOMWindow + * that is being print previewed. (FrameSet Frames) + * + * Returns null if parent document is not a frameset or the entire FrameSet + * document is being print previewed + * + * This enables any consumers of the interface to have access + * to the "current" child DOMWindow at later points in the execution + */ + /* readonly attribute nsIDOMWindow currentChildDOMWindow; */ + NS_IMETHOD GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow) = 0; + + /** + * Returns whether it is in Print mode + */ + /* readonly attribute boolean doingPrint; */ + NS_IMETHOD GetDoingPrint(PRBool *aDoingPrint) = 0; + + /** + * Returns whether it is in Print Preview mode + */ + /* readonly attribute boolean doingPrintPreview; */ + NS_IMETHOD GetDoingPrintPreview(PRBool *aDoingPrintPreview) = 0; + + /** + * This returns whether the current document is a frameset document + */ + /* readonly attribute boolean isFramesetDocument; */ + NS_IMETHOD GetIsFramesetDocument(PRBool *aIsFramesetDocument) = 0; + + /** + * This returns whether the current document is a frameset document + */ + /* readonly attribute boolean isFramesetFrameSelected; */ + NS_IMETHOD GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected) = 0; + + /** + * This returns whether there is an IFrame selected + */ + /* readonly attribute boolean isIFrameSelected; */ + NS_IMETHOD GetIsIFrameSelected(PRBool *aIsIFrameSelected) = 0; + + /** + * This returns whether there is a "range" selection + */ + /* readonly attribute boolean isRangeSelection; */ + NS_IMETHOD GetIsRangeSelection(PRBool *aIsRangeSelection) = 0; + + /** + * This returns the total number of pages for the Print Preview + */ + /* readonly attribute long printPreviewNumPages; */ + NS_IMETHOD GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages) = 0; + + /** + * Print the specified DOM window + * + * @param aThePrintSettings - Printer Settings for the print job, if aThePrintSettings is null + * then the global PS will be used. + * @param aWPListener - is updated during the print + * @return void + */ + /* void print (in nsIPrintSettings aThePrintSettings, in nsIWebProgressListener aWPListener); */ + NS_IMETHOD Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener) = 0; + + /** + * Print Preview the specified DOM window + * + * @param aThePrintSettings - Printer Settings for the print preview, if aThePrintSettings is null + * then the global PS will be used. + * @param aChildDOMWin - DOM Window of the child document to be PP (FrameSet frames) + * @param aWPListener - is updated during the printpreview + * @return void + */ + /* void printPreview (in nsIPrintSettings aThePrintSettings, in nsIDOMWindow aChildDOMWin, in nsIWebProgressListener aWPListener); */ + NS_IMETHOD PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener) = 0; + + /** + * Print Preview - Navigates within the window + * + * @param aNavType - navigation enum + * @param aPageNum - page num to navigate to when aNavType = ePrintPreviewGoToPageNum + * @return void + */ + /* void printPreviewNavigate (in short aNavType, in long aPageNum); */ + NS_IMETHOD PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum) = 0; + + /** + * Cancels the current print + * @return void + */ + /* void cancel (); */ + NS_IMETHOD Cancel(void) = 0; + + /** + * Returns an array of the names of all documents names (Title or URL) + * and sub-documents. This will return a single item if the attr "isFramesetDocument" is false + * and may return any number of items is "isFramesetDocument" is true + * + * @param aCount - returns number of printers returned + * @param aResult - returns array of names + * @return void + */ + /* void enumerateDocumentNames (out PRUint32 aCount, [array, size_is (aCount), retval] out wstring aResult); */ + NS_IMETHOD EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult) = 0; + + /** + * This exists PrintPreview mode and returns browser window to galley mode + * @return void + */ + /* void exitPrintPreview (); */ + NS_IMETHOD ExitPrintPreview(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSERPRINT \ + NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings); \ + NS_IMETHOD GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings); \ + NS_IMETHOD GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow); \ + NS_IMETHOD GetDoingPrint(PRBool *aDoingPrint); \ + NS_IMETHOD GetDoingPrintPreview(PRBool *aDoingPrintPreview); \ + NS_IMETHOD GetIsFramesetDocument(PRBool *aIsFramesetDocument); \ + NS_IMETHOD GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected); \ + NS_IMETHOD GetIsIFrameSelected(PRBool *aIsIFrameSelected); \ + NS_IMETHOD GetIsRangeSelection(PRBool *aIsRangeSelection); \ + NS_IMETHOD GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages); \ + NS_IMETHOD Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener); \ + NS_IMETHOD PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener); \ + NS_IMETHOD PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum); \ + NS_IMETHOD Cancel(void); \ + NS_IMETHOD EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult); \ + NS_IMETHOD ExitPrintPreview(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSERPRINT(_to) \ + NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) { return _to GetGlobalPrintSettings(aGlobalPrintSettings); } \ + NS_IMETHOD GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) { return _to GetCurrentPrintSettings(aCurrentPrintSettings); } \ + NS_IMETHOD GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow) { return _to GetCurrentChildDOMWindow(aCurrentChildDOMWindow); } \ + NS_IMETHOD GetDoingPrint(PRBool *aDoingPrint) { return _to GetDoingPrint(aDoingPrint); } \ + NS_IMETHOD GetDoingPrintPreview(PRBool *aDoingPrintPreview) { return _to GetDoingPrintPreview(aDoingPrintPreview); } \ + NS_IMETHOD GetIsFramesetDocument(PRBool *aIsFramesetDocument) { return _to GetIsFramesetDocument(aIsFramesetDocument); } \ + NS_IMETHOD GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected) { return _to GetIsFramesetFrameSelected(aIsFramesetFrameSelected); } \ + NS_IMETHOD GetIsIFrameSelected(PRBool *aIsIFrameSelected) { return _to GetIsIFrameSelected(aIsIFrameSelected); } \ + NS_IMETHOD GetIsRangeSelection(PRBool *aIsRangeSelection) { return _to GetIsRangeSelection(aIsRangeSelection); } \ + NS_IMETHOD GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages) { return _to GetPrintPreviewNumPages(aPrintPreviewNumPages); } \ + NS_IMETHOD Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener) { return _to Print(aThePrintSettings, aWPListener); } \ + NS_IMETHOD PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener) { return _to PrintPreview(aThePrintSettings, aChildDOMWin, aWPListener); } \ + NS_IMETHOD PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum) { return _to PrintPreviewNavigate(aNavType, aPageNum); } \ + NS_IMETHOD Cancel(void) { return _to Cancel(); } \ + NS_IMETHOD EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult) { return _to EnumerateDocumentNames(aCount, aResult); } \ + NS_IMETHOD ExitPrintPreview(void) { return _to ExitPrintPreview(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSERPRINT(_to) \ + NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGlobalPrintSettings(aGlobalPrintSettings); } \ + NS_IMETHOD GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentPrintSettings(aCurrentPrintSettings); } \ + NS_IMETHOD GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentChildDOMWindow(aCurrentChildDOMWindow); } \ + NS_IMETHOD GetDoingPrint(PRBool *aDoingPrint) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDoingPrint(aDoingPrint); } \ + NS_IMETHOD GetDoingPrintPreview(PRBool *aDoingPrintPreview) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDoingPrintPreview(aDoingPrintPreview); } \ + NS_IMETHOD GetIsFramesetDocument(PRBool *aIsFramesetDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsFramesetDocument(aIsFramesetDocument); } \ + NS_IMETHOD GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsFramesetFrameSelected(aIsFramesetFrameSelected); } \ + NS_IMETHOD GetIsIFrameSelected(PRBool *aIsIFrameSelected) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsIFrameSelected(aIsIFrameSelected); } \ + NS_IMETHOD GetIsRangeSelection(PRBool *aIsRangeSelection) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsRangeSelection(aIsRangeSelection); } \ + NS_IMETHOD GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrintPreviewNumPages(aPrintPreviewNumPages); } \ + NS_IMETHOD Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->Print(aThePrintSettings, aWPListener); } \ + NS_IMETHOD PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrintPreview(aThePrintSettings, aChildDOMWin, aWPListener); } \ + NS_IMETHOD PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrintPreviewNavigate(aNavType, aPageNum); } \ + NS_IMETHOD Cancel(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(); } \ + NS_IMETHOD EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateDocumentNames(aCount, aResult); } \ + NS_IMETHOD ExitPrintPreview(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExitPrintPreview(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowserPrint : public nsIWebBrowserPrint +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSERPRINT + + nsWebBrowserPrint(); + +private: + ~nsWebBrowserPrint(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowserPrint, nsIWebBrowserPrint) + +nsWebBrowserPrint::nsWebBrowserPrint() +{ + /* member initializers and constructor code */ +} + +nsWebBrowserPrint::~nsWebBrowserPrint() +{ + /* destructor code */ +} + +/* readonly attribute nsIPrintSettings globalPrintSettings; */ +NS_IMETHODIMP nsWebBrowserPrint::GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIPrintSettings currentPrintSettings; */ +NS_IMETHODIMP nsWebBrowserPrint::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMWindow currentChildDOMWindow; */ +NS_IMETHODIMP nsWebBrowserPrint::GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean doingPrint; */ +NS_IMETHODIMP nsWebBrowserPrint::GetDoingPrint(PRBool *aDoingPrint) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean doingPrintPreview; */ +NS_IMETHODIMP nsWebBrowserPrint::GetDoingPrintPreview(PRBool *aDoingPrintPreview) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isFramesetDocument; */ +NS_IMETHODIMP nsWebBrowserPrint::GetIsFramesetDocument(PRBool *aIsFramesetDocument) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isFramesetFrameSelected; */ +NS_IMETHODIMP nsWebBrowserPrint::GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isIFrameSelected; */ +NS_IMETHODIMP nsWebBrowserPrint::GetIsIFrameSelected(PRBool *aIsIFrameSelected) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isRangeSelection; */ +NS_IMETHODIMP nsWebBrowserPrint::GetIsRangeSelection(PRBool *aIsRangeSelection) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long printPreviewNumPages; */ +NS_IMETHODIMP nsWebBrowserPrint::GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void print (in nsIPrintSettings aThePrintSettings, in nsIWebProgressListener aWPListener); */ +NS_IMETHODIMP nsWebBrowserPrint::Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void printPreview (in nsIPrintSettings aThePrintSettings, in nsIDOMWindow aChildDOMWin, in nsIWebProgressListener aWPListener); */ +NS_IMETHODIMP nsWebBrowserPrint::PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void printPreviewNavigate (in short aNavType, in long aPageNum); */ +NS_IMETHODIMP nsWebBrowserPrint::PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void cancel (); */ +NS_IMETHODIMP nsWebBrowserPrint::Cancel() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void enumerateDocumentNames (out PRUint32 aCount, [array, size_is (aCount), retval] out wstring aResult); */ +NS_IMETHODIMP nsWebBrowserPrint::EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void exitPrintPreview (); */ +NS_IMETHODIMP nsWebBrowserPrint::ExitPrintPreview() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebBrowserPrint_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserSetup.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserSetup.h new file mode 100644 index 00000000..73af20ce --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserSetup.h @@ -0,0 +1,175 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowserSetup.idl + */ + +#ifndef __gen_nsIWebBrowserSetup_h__ +#define __gen_nsIWebBrowserSetup_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIWebBrowserSetup */ +#define NS_IWEBBROWSERSETUP_IID_STR "f15398a0-8018-11d3-af70-00a024ffc08c" + +#define NS_IWEBBROWSERSETUP_IID \ + {0xf15398a0, 0x8018, 0x11d3, \ + { 0xaf, 0x70, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }} + +/** + * The nsIWebBrowserSetup interface allows certain properties of a new browser + * object to set before the browser window is opened. + * + * @note Unless stated otherwise, settings are presumed to be enabled by + * default. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowserSetup : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERSETUP_IID) + + /** + * Boolean. Enables/disables plugin support for this browser. + * + * @see setProperty + */ + enum { SETUP_ALLOW_PLUGINS = 1U }; + + /** + * Boolean. Enables/disables Javascript support for this browser. + * + * @see setProperty + */ + enum { SETUP_ALLOW_JAVASCRIPT = 2U }; + + /** + * Boolean. Enables/disables meta redirect support for this browser. + * Meta redirect timers will be ignored if this option is disabled. + * + * @see setProperty + */ + enum { SETUP_ALLOW_META_REDIRECTS = 3U }; + + /** + * Boolean. Enables/disables subframes within the browser + * + * @see setProperty + */ + enum { SETUP_ALLOW_SUBFRAMES = 4U }; + + /** + * Boolean. Enables/disables image loading for this browser + * window. If you disable the images, load a page, then enable the images, + * the page will *not* automatically load the images for the previously + * loaded page. This flag controls the state of a webBrowser at load time + * and does not automatically re-load a page when the state is toggled. + * Reloading must be done by hand, or by walking through the DOM tree and + * re-setting the src attributes. + * + * @see setProperty + */ + enum { SETUP_ALLOW_IMAGES = 5U }; + + /** + * Boolean. Enables/disables whether the document as a whole gets focus before + * traversing the document's content, or after traversing its content. + * + * NOTE: this property is obsolete and now has no effect + * + * @see setProperty + */ + enum { SETUP_FOCUS_DOC_BEFORE_CONTENT = 6U }; + + /** + * Boolean. Enables/disables the use of global history in the browser. Visited + * URLs will not be recorded in the global history when it is disabled. + * + * @see setProperty + */ + enum { SETUP_USE_GLOBAL_HISTORY = 256U }; + + /** + * Boolean. A value of PR_TRUE makes the browser a chrome wrapper. + * Default is PR_FALSE. + * + * @since mozilla1.0 + * + * @see setProperty + */ + enum { SETUP_IS_CHROME_WRAPPER = 7U }; + + /** + * Sets an integer or boolean property on the new web browser object. + * Only PR_TRUE and PR_FALSE are legal boolean values. + * + * @param aId The identifier of the property to be set. + * @param aValue The value of the property. + */ + /* void setProperty (in unsigned long aId, in unsigned long aValue); */ + NS_IMETHOD SetProperty(PRUint32 aId, PRUint32 aValue) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSERSETUP \ + NS_IMETHOD SetProperty(PRUint32 aId, PRUint32 aValue); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSERSETUP(_to) \ + NS_IMETHOD SetProperty(PRUint32 aId, PRUint32 aValue) { return _to SetProperty(aId, aValue); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSERSETUP(_to) \ + NS_IMETHOD SetProperty(PRUint32 aId, PRUint32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProperty(aId, aValue); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowserSetup : public nsIWebBrowserSetup +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSERSETUP + + nsWebBrowserSetup(); + +private: + ~nsWebBrowserSetup(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowserSetup, nsIWebBrowserSetup) + +nsWebBrowserSetup::nsWebBrowserSetup() +{ + /* member initializers and constructor code */ +} + +nsWebBrowserSetup::~nsWebBrowserSetup() +{ + /* destructor code */ +} + +/* void setProperty (in unsigned long aId, in unsigned long aValue); */ +NS_IMETHODIMP nsWebBrowserSetup::SetProperty(PRUint32 aId, PRUint32 aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebBrowserSetup_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserStream.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserStream.h new file mode 100644 index 00000000..1de48265 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebBrowserStream.h @@ -0,0 +1,154 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowserStream.idl + */ + +#ifndef __gen_nsIWebBrowserStream_h__ +#define __gen_nsIWebBrowserStream_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIURI; /* forward declaration */ + + +/* starting interface: nsIWebBrowserStream */ +#define NS_IWEBBROWSERSTREAM_IID_STR "86d02f0e-219b-4cfc-9c88-bd98d2cce0b8" + +#define NS_IWEBBROWSERSTREAM_IID \ + {0x86d02f0e, 0x219b, 0x4cfc, \ + { 0x9c, 0x88, 0xbd, 0x98, 0xd2, 0xcc, 0xe0, 0xb8 }} + +/** + * This interface provides a way to stream data to the web browser. This allows + * loading of data from sources which can not be accessed using URIs and + * nsIWebNavigation. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebBrowserStream : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERSTREAM_IID) + + /** + * Prepare to load a stream of data. When this function returns successfully, + * it must be paired by a call to closeStream. + * + * @param aBaseURI + * The base URI of the data. Must not be null. Relative + * URIs will be resolved relative to this URI. + * @param aContentType + * ASCII string giving the content type of the data. If rendering + * content of this type is not supported, this method fails. + * This string may include a charset declaration, for example: + * text/html;charset=ISO-8859-1 + * + * @throw NS_ERROR_NOT_AVAILABLE + * The requested content type is not supported. + * @throw NS_ERROR_IN_PROGRESS + * openStream was called twice without an intermediate closeStream. + */ + /* void openStream (in nsIURI aBaseURI, in ACString aContentType); */ + NS_IMETHOD OpenStream(nsIURI *aBaseURI, const nsACString & aContentType) = 0; + + /** + * Append data to this stream. + * @param aData The data to append + * @param aLen Length of the data to append. + * + * @note To append more than 4 GB of data, call this method multiple times. + */ + /* void appendToStream ([array, size_is (aLen), const] in octet aData, in unsigned long aLen); */ + NS_IMETHOD AppendToStream(const PRUint8 *aData, PRUint32 aLen) = 0; + + /** + * Notifies the browser that all the data has been appended. This may notify + * the user that the browser is "done loading" in some form. + * + * @throw NS_ERROR_UNEXPECTED + * This method was called without a preceding openStream. + */ + /* void closeStream (); */ + NS_IMETHOD CloseStream(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBBROWSERSTREAM \ + NS_IMETHOD OpenStream(nsIURI *aBaseURI, const nsACString & aContentType); \ + NS_IMETHOD AppendToStream(const PRUint8 *aData, PRUint32 aLen); \ + NS_IMETHOD CloseStream(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBBROWSERSTREAM(_to) \ + NS_IMETHOD OpenStream(nsIURI *aBaseURI, const nsACString & aContentType) { return _to OpenStream(aBaseURI, aContentType); } \ + NS_IMETHOD AppendToStream(const PRUint8 *aData, PRUint32 aLen) { return _to AppendToStream(aData, aLen); } \ + NS_IMETHOD CloseStream(void) { return _to CloseStream(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBBROWSERSTREAM(_to) \ + NS_IMETHOD OpenStream(nsIURI *aBaseURI, const nsACString & aContentType) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenStream(aBaseURI, aContentType); } \ + NS_IMETHOD AppendToStream(const PRUint8 *aData, PRUint32 aLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendToStream(aData, aLen); } \ + NS_IMETHOD CloseStream(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseStream(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebBrowserStream : public nsIWebBrowserStream +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBBROWSERSTREAM + + nsWebBrowserStream(); + +private: + ~nsWebBrowserStream(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebBrowserStream, nsIWebBrowserStream) + +nsWebBrowserStream::nsWebBrowserStream() +{ + /* member initializers and constructor code */ +} + +nsWebBrowserStream::~nsWebBrowserStream() +{ + /* destructor code */ +} + +/* void openStream (in nsIURI aBaseURI, in ACString aContentType); */ +NS_IMETHODIMP nsWebBrowserStream::OpenStream(nsIURI *aBaseURI, const nsACString & aContentType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void appendToStream ([array, size_is (aLen), const] in octet aData, in unsigned long aLen); */ +NS_IMETHODIMP nsWebBrowserStream::AppendToStream(const PRUint8 *aData, PRUint32 aLen) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void closeStream (); */ +NS_IMETHODIMP nsWebBrowserStream::CloseStream() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebBrowserStream_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebProgress.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebProgress.h new file mode 100644 index 00000000..74cda74f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebProgress.h @@ -0,0 +1,250 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/uriloader/base/nsIWebProgress.idl + */ + +#ifndef __gen_nsIWebProgress_h__ +#define __gen_nsIWebProgress_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMWindow; /* forward declaration */ + +class nsIWebProgressListener; /* forward declaration */ + + +/* starting interface: nsIWebProgress */ +#define NS_IWEBPROGRESS_IID_STR "570f39d0-efd0-11d3-b093-00a024ffc08c" + +#define NS_IWEBPROGRESS_IID \ + {0x570f39d0, 0xefd0, 0x11d3, \ + { 0xb0, 0x93, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }} + +/** + * The nsIWebProgress interface is used to add or remove nsIWebProgressListener + * instances to observe the loading of asynchronous requests (usually in the + * context of a DOM window). + * + * nsIWebProgress instances may be arranged in a parent-child configuration, + * corresponding to the parent-child configuration of their respective DOM + * windows. However, in some cases a nsIWebProgress instance may not have an + * associated DOM window. The parent-child relationship of nsIWebProgress + * instances is not made explicit by this interface, but the relationship may + * exist in some implementations. + * + * A nsIWebProgressListener instance receives notifications for the + * nsIWebProgress instance to which it added itself, and it may also receive + * notifications from any nsIWebProgress instances that are children of that + * nsIWebProgress instance. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebProgress : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBPROGRESS_IID) + + /** + * The following flags may be combined to form the aNotifyMask parameter for + * the addProgressListener method. They limit the set of events that are + * delivered to an nsIWebProgressListener instance. + */ +/** + * These flags indicate the state transistions to observe, corresponding to + * nsIWebProgressListener::onStateChange. + * + * NOTIFY_STATE_REQUEST + * Only receive the onStateChange event if the aStateFlags parameter + * includes nsIWebProgressListener::STATE_IS_REQUEST. + * + * NOTIFY_STATE_DOCUMENT + * Only receive the onStateChange event if the aStateFlags parameter + * includes nsIWebProgressListener::STATE_IS_DOCUMENT. + * + * NOTIFY_STATE_NETWORK + * Only receive the onStateChange event if the aStateFlags parameter + * includes nsIWebProgressListener::STATE_IS_NETWORK. + * + * NOTIFY_STATE_WINDOW + * Only receive the onStateChange event if the aStateFlags parameter + * includes nsIWebProgressListener::STATE_IS_WINDOW. + * + * NOTIFY_STATE_ALL + * Receive all onStateChange events. + */ + enum { NOTIFY_STATE_REQUEST = 1U }; + + enum { NOTIFY_STATE_DOCUMENT = 2U }; + + enum { NOTIFY_STATE_NETWORK = 4U }; + + enum { NOTIFY_STATE_WINDOW = 8U }; + + enum { NOTIFY_STATE_ALL = 15U }; + + /** + * These flags indicate the other events to observe, corresponding to the + * other four methods defined on nsIWebProgressListener. + * + * NOTIFY_PROGRESS + * Receive onProgressChange events. + * + * NOTIFY_STATUS + * Receive onStatusChange events. + * + * NOTIFY_SECURITY + * Receive onSecurityChange events. + * + * NOTIFY_LOCATION + * Receive onLocationChange events. + */ + enum { NOTIFY_PROGRESS = 16U }; + + enum { NOTIFY_STATUS = 32U }; + + enum { NOTIFY_SECURITY = 64U }; + + enum { NOTIFY_LOCATION = 128U }; + + /** + * This flag enables all notifications. + */ + enum { NOTIFY_ALL = 255U }; + + /** + * Registers a listener to receive web progress events. + * + * @param aListener + * The listener interface to be called when a progress event occurs. + * This object must also implement nsISupportsWeakReference. + * @param aNotifyMask + * The types of notifications to receive. + * + * @throw NS_ERROR_INVALID_ARG + * Indicates that aListener was either null or that it does not + * support weak references. + * @throw NS_ERROR_FAILURE + * Indicates that aListener was already registered. + */ + /* void addProgressListener (in nsIWebProgressListener aListener, in unsigned long aNotifyMask); */ + NS_IMETHOD AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask) = 0; + + /** + * Removes a previously registered listener of progress events. + * + * @param aListener + * The listener interface previously registered with a call to + * addProgressListener. + * + * @throw NS_ERROR_FAILURE + * Indicates that aListener was not registered. + */ + /* void removeProgressListener (in nsIWebProgressListener aListener); */ + NS_IMETHOD RemoveProgressListener(nsIWebProgressListener *aListener) = 0; + + /** + * The DOM window associated with this nsIWebProgress instance. + * + * @throw NS_ERROR_FAILURE + * Indicates that there is no associated DOM window. + */ + /* readonly attribute nsIDOMWindow DOMWindow; */ + NS_IMETHOD GetDOMWindow(nsIDOMWindow * *aDOMWindow) = 0; + + /** + * Indicates whether or not a document is currently being loaded + * in the context of this nsIWebProgress instance. + */ + /* readonly attribute PRBool isLoadingDocument; */ + NS_IMETHOD GetIsLoadingDocument(PRBool *aIsLoadingDocument) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBPROGRESS \ + NS_IMETHOD AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask); \ + NS_IMETHOD RemoveProgressListener(nsIWebProgressListener *aListener); \ + NS_IMETHOD GetDOMWindow(nsIDOMWindow * *aDOMWindow); \ + NS_IMETHOD GetIsLoadingDocument(PRBool *aIsLoadingDocument); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBPROGRESS(_to) \ + NS_IMETHOD AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask) { return _to AddProgressListener(aListener, aNotifyMask); } \ + NS_IMETHOD RemoveProgressListener(nsIWebProgressListener *aListener) { return _to RemoveProgressListener(aListener); } \ + NS_IMETHOD GetDOMWindow(nsIDOMWindow * *aDOMWindow) { return _to GetDOMWindow(aDOMWindow); } \ + NS_IMETHOD GetIsLoadingDocument(PRBool *aIsLoadingDocument) { return _to GetIsLoadingDocument(aIsLoadingDocument); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBPROGRESS(_to) \ + NS_IMETHOD AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddProgressListener(aListener, aNotifyMask); } \ + NS_IMETHOD RemoveProgressListener(nsIWebProgressListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveProgressListener(aListener); } \ + NS_IMETHOD GetDOMWindow(nsIDOMWindow * *aDOMWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMWindow(aDOMWindow); } \ + NS_IMETHOD GetIsLoadingDocument(PRBool *aIsLoadingDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsLoadingDocument(aIsLoadingDocument); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebProgress : public nsIWebProgress +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBPROGRESS + + nsWebProgress(); + +private: + ~nsWebProgress(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebProgress, nsIWebProgress) + +nsWebProgress::nsWebProgress() +{ + /* member initializers and constructor code */ +} + +nsWebProgress::~nsWebProgress() +{ + /* destructor code */ +} + +/* void addProgressListener (in nsIWebProgressListener aListener, in unsigned long aNotifyMask); */ +NS_IMETHODIMP nsWebProgress::AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeProgressListener (in nsIWebProgressListener aListener); */ +NS_IMETHODIMP nsWebProgress::RemoveProgressListener(nsIWebProgressListener *aListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMWindow DOMWindow; */ +NS_IMETHODIMP nsWebProgress::GetDOMWindow(nsIDOMWindow * *aDOMWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRBool isLoadingDocument; */ +NS_IMETHODIMP nsWebProgress::GetIsLoadingDocument(PRBool *aIsLoadingDocument) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebProgress_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWebProgressListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebProgressListener.h new file mode 100644 index 00000000..c13c0eec --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWebProgressListener.h @@ -0,0 +1,434 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/uriloader/base/nsIWebProgressListener.idl + */ + +#ifndef __gen_nsIWebProgressListener_h__ +#define __gen_nsIWebProgressListener_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIWebProgress; /* forward declaration */ + +class nsIRequest; /* forward declaration */ + +class nsIURI; /* forward declaration */ + + +/* starting interface: nsIWebProgressListener */ +#define NS_IWEBPROGRESSLISTENER_IID_STR "570f39d1-efd0-11d3-b093-00a024ffc08c" + +#define NS_IWEBPROGRESSLISTENER_IID \ + {0x570f39d1, 0xefd0, 0x11d3, \ + { 0xb0, 0x93, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }} + +/** + * The nsIWebProgressListener interface is implemented by clients wishing to + * listen in on the progress associated with the loading of asynchronous + * requests in the context of a nsIWebProgress instance as well as any child + * nsIWebProgress instances. nsIWebProgress.idl describes the parent-child + * relationship of nsIWebProgress instances. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIWebProgressListener : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBPROGRESSLISTENER_IID) + + /** + * State Transition Flags + * + * These flags indicate the various states that requests may transition + * through as they are being loaded. These flags are mutually exclusive. + * + * For any given request, onStateChange is called once with the STATE_START + * flag, zero or more times with the STATE_TRANSFERRING flag or once with the + * STATE_REDIRECTING flag, and then finally once with the STATE_STOP flag. + * NOTE: For document requests, a second STATE_STOP is generated (see the + * description of STATE_IS_WINDOW for more details). + * + * STATE_START + * This flag indicates the start of a request. This flag is set when a + * request is initiated. The request is complete when onStateChange is + * called for the same request with the STATE_STOP flag set. + * + * STATE_REDIRECTING + * This flag indicates that a request is being redirected. The request + * passed to onStateChange is the request that is being redirected. When a + * redirect occurs, a new request is generated automatically to process the + * new request. Expect a corresponding STATE_START event for the new + * request, and a STATE_STOP for the redirected request. + * + * STATE_TRANSFERRING + * This flag indicates that data for a request is being transferred to an + * end consumer. This flag indicates that the request has been targeted, + * and that the user may start seeing content corresponding to the request. + * + * STATE_NEGOTIATING + * This flag is not used. + * + * STATE_STOP + * This flag indicates the completion of a request. The aStatus parameter + * to onStateChange indicates the final status of the request. + */ + enum { STATE_START = 1U }; + + enum { STATE_REDIRECTING = 2U }; + + enum { STATE_TRANSFERRING = 4U }; + + enum { STATE_NEGOTIATING = 8U }; + + enum { STATE_STOP = 16U }; + + /** + * State Type Flags + * + * These flags further describe the entity for which the state transition is + * occuring. These flags are NOT mutually exclusive (i.e., an onStateChange + * event may indicate some combination of these flags). + * + * STATE_IS_REQUEST + * This flag indicates that the state transition is for a request, which + * includes but is not limited to document requests. (See below for a + * description of document requests.) Other types of requests, such as + * requests for inline content (e.g., images and stylesheets) are + * considered normal requests. + * + * STATE_IS_DOCUMENT + * This flag indicates that the state transition is for a document request. + * This flag is set in addition to STATE_IS_REQUEST. A document request + * supports the nsIChannel interface and its loadFlags attribute includes + * the nsIChannel::LOAD_DOCUMENT_URI flag. + * + * A document request does not complete until all requests associated with + * the loading of its corresponding document have completed. This includes + * other document requests (e.g., corresponding to HTML <iframe> elements). + * The document corresponding to a document request is available via the + * DOMWindow attribute of onStateChange's aWebProgress parameter. + * + * STATE_IS_NETWORK + * This flag indicates that the state transition corresponds to the start + * or stop of activity in the indicated nsIWebProgress instance. This flag + * is accompanied by either STATE_START or STATE_STOP, and it may be + * combined with other State Type Flags. + * + * Unlike STATE_IS_WINDOW, this flag is only set when activity within the + * nsIWebProgress instance being observed starts or stops. If activity + * only occurs in a child nsIWebProgress instance, then this flag will be + * set to indicate the start and stop of that activity. + * + * For example, in the case of navigation within a single frame of a HTML + * frameset, a nsIWebProgressListener instance attached to the + * nsIWebProgress of the frameset window will receive onStateChange calls + * with the STATE_IS_NETWORK flag set to indicate the start and stop of + * said navigation. In other words, an observer of an outer window can + * determine when activity, that may be constrained to a child window or + * set of child windows, starts and stops. + * + * STATE_IS_WINDOW + * This flag indicates that the state transition corresponds to the start + * or stop of activity in the indicated nsIWebProgress instance. This flag + * is accompanied by either STATE_START or STATE_STOP, and it may be + * combined with other State Type Flags. + * + * This flag is similar to STATE_IS_DOCUMENT. However, when a document + * request completes, two onStateChange calls with STATE_STOP are + * generated. The document request is passed as aRequest to both calls. + * The first has STATE_IS_REQUEST and STATE_IS_DOCUMENT set, and the second + * has the STATE_IS_WINDOW flag set (and possibly the STATE_IS_NETWORK flag + * set as well -- see above for a description of when the STATE_IS_NETWORK + * flag may be set). This second STATE_STOP event may be useful as a way + * to partition the work that occurs when a document request completes. + */ + enum { STATE_IS_REQUEST = 65536U }; + + enum { STATE_IS_DOCUMENT = 131072U }; + + enum { STATE_IS_NETWORK = 262144U }; + + enum { STATE_IS_WINDOW = 524288U }; + + /** + * State Modifier Flags + * + * These flags further describe the transition which is occuring. These + * flags are NOT mutually exclusive (i.e., an onStateChange event may + * indicate some combination of these flags). + * + * STATE_RESTORING + * This flag indicates that the state transition corresponds to the start + * or stop of activity for restoring a previously-rendered presentation. + * As such, there is no actual network activity associated with this + * request, and any modifications made to the document or presentation + * when it was originally loaded will still be present. + */ + enum { STATE_RESTORING = 16777216U }; + + /** + * State Security Flags + * + * These flags describe the security state reported by a call to the + * onSecurityChange method. These flags are mutually exclusive. + * + * STATE_IS_INSECURE + * This flag indicates that the data corresponding to the request + * was received over an insecure channel. + * + * STATE_IS_BROKEN + * This flag indicates an unknown security state. This may mean that the + * request is being loaded as part of a page in which some content was + * received over an insecure channel. + * + * STATE_IS_SECURE + * This flag indicates that the data corresponding to the request was + * received over a secure channel. The degree of security is expressed by + * STATE_SECURE_HIGH, STATE_SECURE_MED, or STATE_SECURE_LOW. + */ + enum { STATE_IS_INSECURE = 4U }; + + enum { STATE_IS_BROKEN = 1U }; + + enum { STATE_IS_SECURE = 2U }; + + /** + * Security Strength Flags + * + * These flags describe the security strength and accompany STATE_IS_SECURE + * in a call to the onSecurityChange method. These flags are mutually + * exclusive. + * + * These flags are not meant to provide a precise description of data + * transfer security. These are instead intended as a rough indicator that + * may be used to, for example, color code a security indicator or otherwise + * provide basic data transfer security feedback to the user. + * + * STATE_SECURE_HIGH + * This flag indicates a high degree of security. + * + * STATE_SECURE_MED + * This flag indicates a medium degree of security. + * + * STATE_SECURE_LOW + * This flag indicates a low degree of security. + */ + enum { STATE_SECURE_HIGH = 262144U }; + + enum { STATE_SECURE_MED = 65536U }; + + enum { STATE_SECURE_LOW = 131072U }; + + /** + * Notification indicating the state has changed for one of the requests + * associated with aWebProgress. + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification + * @param aRequest + * The nsIRequest that has changed state. + * @param aStateFlags + * Flags indicating the new state. This value is a combination of one + * of the State Transition Flags and one or more of the State Type + * Flags defined above. Any undefined bits are reserved for future + * use. + * @param aStatus + * Error status code associated with the state change. This parameter + * should be ignored unless aStateFlags includes the STATE_STOP bit. + * The status code indicates success or failure of the request + * associated with the state change. NOTE: aStatus may be a success + * code even for server generated errors, such as the HTTP 404 error. + * In such cases, the request itself should be queried for extended + * error information (e.g., for HTTP requests see nsIHttpChannel). + */ + /* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus); */ + NS_IMETHOD OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aStateFlags, nsresult aStatus) = 0; + + /** + * Notification that the progress has changed for one of the requests + * associated with aWebProgress. Progress totals are reset to zero when all + * requests in aWebProgress complete (corresponding to onStateChange being + * called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW + * flags). + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification. + * @param aRequest + * The nsIRequest that has new progress. + * @param aCurSelfProgress + * The current progress for aRequest. + * @param aMaxSelfProgress + * The maximum progress for aRequest. + * @param aCurTotalProgress + * The current progress for all requests associated with aWebProgress. + * @param aMaxTotalProgress + * The total progress for all requests associated with aWebProgress. + * + * NOTE: If any progress value is unknown, or if its value would exceed the + * maximum value of type long, then its value is replaced with -1. + * + * NOTE: If the object also implements nsIWebProgressListener2 and the caller + * knows about that interface, this function will not be called. Instead, + * nsIWebProgressListener2::onProgressChange64 will be called. + */ + /* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */ + NS_IMETHOD OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress) = 0; + + /** + * Called when the location of the window being watched changes. This is not + * when a load is requested, but rather once it is verified that the load is + * going to occur in the given window. For instance, a load that starts in a + * window might send progress and status messages for the new site, but it + * will not send the onLocationChange until we are sure that we are loading + * this new page here. + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification. + * @param aRequest + * The associated nsIRequest. This may be null in some cases. + * @param aLocation + * The URI of the location that is being loaded. + */ + /* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI aLocation); */ + NS_IMETHOD OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation) = 0; + + /** + * Notification that the status of a request has changed. The status message + * is intended to be displayed to the user (e.g., in the status bar of the + * browser). + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification. + * @param aRequest + * The nsIRequest that has new status. + * @param aStatus + * This value is not an error code. Instead, it is a numeric value + * that indicates the current status of the request. This interface + * does not define the set of possible status codes. NOTE: Some + * status values are defined by nsITransport and nsISocketTransport. + * @param aMessage + * Localized text corresponding to aStatus. + */ + /* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */ + NS_IMETHOD OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage) = 0; + + /** + * Notification called for security progress. This method will be called on + * security transitions (eg HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and + * after document load completion. It might also be called if an error + * occurs during network loading. + * + * @param aWebProgress + * The nsIWebProgress instance that fired the notification. + * @param aRequest + * The nsIRequest that has new security state. + * @param aState + * A value composed of the Security State Flags and the Security + * Strength Flags listed above. Any undefined bits are reserved for + * future use. + * + * NOTE: These notifications will only occur if a security package is + * installed. + */ + /* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aState); */ + NS_IMETHOD OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aState) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWEBPROGRESSLISTENER \ + NS_IMETHOD OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aStateFlags, nsresult aStatus); \ + NS_IMETHOD OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress); \ + NS_IMETHOD OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation); \ + NS_IMETHOD OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage); \ + NS_IMETHOD OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aState); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWEBPROGRESSLISTENER(_to) \ + NS_IMETHOD OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aStateFlags, nsresult aStatus) { return _to OnStateChange(aWebProgress, aRequest, aStateFlags, aStatus); } \ + NS_IMETHOD OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress) { return _to OnProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress); } \ + NS_IMETHOD OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation) { return _to OnLocationChange(aWebProgress, aRequest, aLocation); } \ + NS_IMETHOD OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage) { return _to OnStatusChange(aWebProgress, aRequest, aStatus, aMessage); } \ + NS_IMETHOD OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aState) { return _to OnSecurityChange(aWebProgress, aRequest, aState); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWEBPROGRESSLISTENER(_to) \ + NS_IMETHOD OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aStateFlags, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStateChange(aWebProgress, aRequest, aStateFlags, aStatus); } \ + NS_IMETHOD OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress); } \ + NS_IMETHOD OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnLocationChange(aWebProgress, aRequest, aLocation); } \ + NS_IMETHOD OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStatusChange(aWebProgress, aRequest, aStatus, aMessage); } \ + NS_IMETHOD OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aState) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSecurityChange(aWebProgress, aRequest, aState); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWebProgressListener : public nsIWebProgressListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWEBPROGRESSLISTENER + + nsWebProgressListener(); + +private: + ~nsWebProgressListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWebProgressListener, nsIWebProgressListener) + +nsWebProgressListener::nsWebProgressListener() +{ + /* member initializers and constructor code */ +} + +nsWebProgressListener::~nsWebProgressListener() +{ + /* destructor code */ +} + +/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus); */ +NS_IMETHODIMP nsWebProgressListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aStateFlags, nsresult aStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */ +NS_IMETHODIMP nsWebProgressListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI aLocation); */ +NS_IMETHODIMP nsWebProgressListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */ +NS_IMETHODIMP nsWebProgressListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aState); */ +NS_IMETHODIMP nsWebProgressListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aState) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIWebProgressListener_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWindowCreator.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWindowCreator.h new file mode 100644 index 00000000..04356b02 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWindowCreator.h @@ -0,0 +1,103 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/base/nsIWindowCreator.idl + */ + +#ifndef __gen_nsIWindowCreator_h__ +#define __gen_nsIWindowCreator_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIWebBrowserChrome; /* forward declaration */ + + +/* starting interface: nsIWindowCreator */ +#define NS_IWINDOWCREATOR_IID_STR "30465632-a777-44cc-90f9-8145475ef999" + +#define NS_IWINDOWCREATOR_IID \ + {0x30465632, 0xa777, 0x44cc, \ + { 0x90, 0xf9, 0x81, 0x45, 0x47, 0x5e, 0xf9, 0x99 }} + +class NS_NO_VTABLE nsIWindowCreator : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWINDOWCREATOR_IID) + + /** Create a new window. Gecko will/may call this method, if made + available to it, to create new windows. + @param parent parent window, if any. null if not. the newly created + window should be made a child/dependent window of + the parent, if any (and if the concept applies + to the underlying OS). + @param chromeFlags chrome features from nsIWebBrowserChrome + @return the new window + */ + /* nsIWebBrowserChrome createChromeWindow (in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); */ + NS_IMETHOD CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags, nsIWebBrowserChrome **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWINDOWCREATOR \ + NS_IMETHOD CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags, nsIWebBrowserChrome **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWINDOWCREATOR(_to) \ + NS_IMETHOD CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags, nsIWebBrowserChrome **_retval) { return _to CreateChromeWindow(parent, chromeFlags, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWINDOWCREATOR(_to) \ + NS_IMETHOD CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags, nsIWebBrowserChrome **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateChromeWindow(parent, chromeFlags, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWindowCreator : public nsIWindowCreator +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWINDOWCREATOR + + nsWindowCreator(); + +private: + ~nsWindowCreator(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWindowCreator, nsIWindowCreator) + +nsWindowCreator::nsWindowCreator() +{ + /* member initializers and constructor code */ +} + +nsWindowCreator::~nsWindowCreator() +{ + /* destructor code */ +} + +/* nsIWebBrowserChrome createChromeWindow (in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); */ +NS_IMETHODIMP nsWindowCreator::CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags, nsIWebBrowserChrome **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +// {30465632-A777-44cc-90F9-8145475EF999} +#define NS_WINDOWCREATOR_IID \ + {0x30465632, 0xa777, 0x44cc, {0x90, 0xf9, 0x81, 0x45, 0x47, 0x5e, 0xf9, 0x99}} + +#endif /* __gen_nsIWindowCreator_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIWindowWatcher.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIWindowWatcher.h new file mode 100644 index 00000000..82041a7b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIWindowWatcher.h @@ -0,0 +1,302 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/components/windowwatcher/public/nsIWindowWatcher.idl + */ + +#ifndef __gen_nsIWindowWatcher_h__ +#define __gen_nsIWindowWatcher_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIDOMWindow; /* forward declaration */ + +class nsIObserver; /* forward declaration */ + +class nsIPrompt; /* forward declaration */ + +class nsIAuthPrompt; /* forward declaration */ + +class nsISimpleEnumerator; /* forward declaration */ + +class nsIWebBrowserChrome; /* forward declaration */ + +class nsIWindowCreator; /* forward declaration */ + + +/* starting interface: nsIWindowWatcher */ +#define NS_IWINDOWWATCHER_IID_STR "002286a8-494b-43b3-8ddd-49e3fc50622b" + +#define NS_IWINDOWWATCHER_IID \ + {0x002286a8, 0x494b, 0x43b3, \ + { 0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b }} + +class NS_NO_VTABLE nsIWindowWatcher : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWINDOWWATCHER_IID) + + /** Create a new window. It will automatically be added to our list + (via addWindow()). + @param aParent parent window, if any. Null if no parent. If it is + impossible to get to an nsIWebBrowserChrome from aParent, this + method will effectively act as if aParent were null. + @param aURL url to which to open the new window. Must already be + escaped, if applicable. can be null. + @param aName window name from JS window.open. can be null. + @param aFeatures window features from JS window.open. can be null. + @param aArguments extra argument(s) to the new window, to be attached + as the |arguments| property. An nsISupportsArray will be + unwound into multiple arguments (but not recursively!). + can be null. + @return the new window + */ + /* nsIDOMWindow openWindow (in nsIDOMWindow aParent, in string aUrl, in string aName, in string aFeatures, in nsISupports aArguments); */ + NS_IMETHOD OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval) = 0; + + /** Clients of this service can register themselves to be notified + when a window is opened or closed (added to or removed from this + service). This method adds an aObserver to the list of objects + to be notified. + @param aObserver the object to be notified when windows are + opened or closed. Its Observe method will be + called with the following parameters: + + aObserver::Observe interprets its parameters so: + aSubject the window being opened or closed, sent as an nsISupports + which can be QIed to an nsIDOMWindow. + aTopic a wstring, either "domwindowopened" or "domwindowclosed". + someData not used. + */ + /* void registerNotification (in nsIObserver aObserver); */ + NS_IMETHOD RegisterNotification(nsIObserver *aObserver) = 0; + + /** Clients of this service can register themselves to be notified + when a window is opened or closed (added to or removed from this + service). This method removes an aObserver from the list of objects + to be notified. + @param aObserver the observer to be removed. + */ + /* void unregisterNotification (in nsIObserver aObserver); */ + NS_IMETHOD UnregisterNotification(nsIObserver *aObserver) = 0; + + /** Get an iterator for currently open windows in the order they were opened, + guaranteeing that each will be visited exactly once. + @return an enumerator which will itself return nsISupports objects which + can be QIed to an nsIDOMWindow + */ + /* nsISimpleEnumerator getWindowEnumerator (); */ + NS_IMETHOD GetWindowEnumerator(nsISimpleEnumerator **_retval) = 0; + + /** Return a newly created nsIPrompt implementation. + @param aParent the parent window used for posing alerts. can be null. + @return a new nsIPrompt object + */ + /* nsIPrompt getNewPrompter (in nsIDOMWindow aParent); */ + NS_IMETHOD GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval) = 0; + + /** Return a newly created nsIAuthPrompt implementation. + @param aParent the parent window used for posing alerts. can be null. + @return a new nsIAuthPrompt object + */ + /* nsIAuthPrompt getNewAuthPrompter (in nsIDOMWindow aParent); */ + NS_IMETHOD GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval) = 0; + + /** Set the window creator callback. It must be filled in by the app. + openWindow will use it to create new windows. + @param creator the callback. if null, the callback will be cleared + and window creation capabilities lost. + */ + /* void setWindowCreator (in nsIWindowCreator creator); */ + NS_IMETHOD SetWindowCreator(nsIWindowCreator *creator) = 0; + + /** Retrieve the chrome window mapped to the given DOM window. Window + Watcher keeps a list of all top-level DOM windows currently open, + along with their corresponding chrome interfaces. Since DOM Windows + lack a (public) means of retrieving their corresponding chrome, + this method will do that. + @param aWindow the DOM window whose chrome window the caller needs + @return the corresponding chrome window + */ + /* nsIWebBrowserChrome getChromeForWindow (in nsIDOMWindow aWindow); */ + NS_IMETHOD GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval) = 0; + + /** + Retrieve an existing window (or frame). + @param aTargetName the window name + @param aCurrentWindow a starting point in the window hierarchy to + begin the search. If null, each toplevel window + will be searched. + + Note: This method will search all open windows for any window or + frame with the given window name. Make sure you understand the + security implications of this before using this method! + */ + /* nsIDOMWindow getWindowByName (in wstring aTargetName, in nsIDOMWindow aCurrentWindow); */ + NS_IMETHOD GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow, nsIDOMWindow **_retval) = 0; + + /** The Watcher serves as a global storage facility for the current active + (frontmost non-floating-palette-type) window, storing and returning + it on demand. Users must keep this attribute current, including after + the topmost window is closed. This attribute obviously can return null + if no windows are open, but should otherwise always return a valid + window. + */ + /* attribute nsIDOMWindow activeWindow; */ + NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) = 0; + NS_IMETHOD SetActiveWindow(nsIDOMWindow * aActiveWindow) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIWINDOWWATCHER \ + NS_IMETHOD OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval); \ + NS_IMETHOD RegisterNotification(nsIObserver *aObserver); \ + NS_IMETHOD UnregisterNotification(nsIObserver *aObserver); \ + NS_IMETHOD GetWindowEnumerator(nsISimpleEnumerator **_retval); \ + NS_IMETHOD GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval); \ + NS_IMETHOD GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval); \ + NS_IMETHOD SetWindowCreator(nsIWindowCreator *creator); \ + NS_IMETHOD GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval); \ + NS_IMETHOD GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow, nsIDOMWindow **_retval); \ + NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow); \ + NS_IMETHOD SetActiveWindow(nsIDOMWindow * aActiveWindow); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIWINDOWWATCHER(_to) \ + NS_IMETHOD OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval) { return _to OpenWindow(aParent, aUrl, aName, aFeatures, aArguments, _retval); } \ + NS_IMETHOD RegisterNotification(nsIObserver *aObserver) { return _to RegisterNotification(aObserver); } \ + NS_IMETHOD UnregisterNotification(nsIObserver *aObserver) { return _to UnregisterNotification(aObserver); } \ + NS_IMETHOD GetWindowEnumerator(nsISimpleEnumerator **_retval) { return _to GetWindowEnumerator(_retval); } \ + NS_IMETHOD GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval) { return _to GetNewPrompter(aParent, _retval); } \ + NS_IMETHOD GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval) { return _to GetNewAuthPrompter(aParent, _retval); } \ + NS_IMETHOD SetWindowCreator(nsIWindowCreator *creator) { return _to SetWindowCreator(creator); } \ + NS_IMETHOD GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval) { return _to GetChromeForWindow(aWindow, _retval); } \ + NS_IMETHOD GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow, nsIDOMWindow **_retval) { return _to GetWindowByName(aTargetName, aCurrentWindow, _retval); } \ + NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) { return _to GetActiveWindow(aActiveWindow); } \ + NS_IMETHOD SetActiveWindow(nsIDOMWindow * aActiveWindow) { return _to SetActiveWindow(aActiveWindow); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIWINDOWWATCHER(_to) \ + NS_IMETHOD OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenWindow(aParent, aUrl, aName, aFeatures, aArguments, _retval); } \ + NS_IMETHOD RegisterNotification(nsIObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterNotification(aObserver); } \ + NS_IMETHOD UnregisterNotification(nsIObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterNotification(aObserver); } \ + NS_IMETHOD GetWindowEnumerator(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowEnumerator(_retval); } \ + NS_IMETHOD GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNewPrompter(aParent, _retval); } \ + NS_IMETHOD GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNewAuthPrompter(aParent, _retval); } \ + NS_IMETHOD SetWindowCreator(nsIWindowCreator *creator) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindowCreator(creator); } \ + NS_IMETHOD GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromeForWindow(aWindow, _retval); } \ + NS_IMETHOD GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowByName(aTargetName, aCurrentWindow, _retval); } \ + NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActiveWindow(aActiveWindow); } \ + NS_IMETHOD SetActiveWindow(nsIDOMWindow * aActiveWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetActiveWindow(aActiveWindow); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsWindowWatcher : public nsIWindowWatcher +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIWINDOWWATCHER + + nsWindowWatcher(); + +private: + ~nsWindowWatcher(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsWindowWatcher, nsIWindowWatcher) + +nsWindowWatcher::nsWindowWatcher() +{ + /* member initializers and constructor code */ +} + +nsWindowWatcher::~nsWindowWatcher() +{ + /* destructor code */ +} + +/* nsIDOMWindow openWindow (in nsIDOMWindow aParent, in string aUrl, in string aName, in string aFeatures, in nsISupports aArguments); */ +NS_IMETHODIMP nsWindowWatcher::OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerNotification (in nsIObserver aObserver); */ +NS_IMETHODIMP nsWindowWatcher::RegisterNotification(nsIObserver *aObserver) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterNotification (in nsIObserver aObserver); */ +NS_IMETHODIMP nsWindowWatcher::UnregisterNotification(nsIObserver *aObserver) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISimpleEnumerator getWindowEnumerator (); */ +NS_IMETHODIMP nsWindowWatcher::GetWindowEnumerator(nsISimpleEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIPrompt getNewPrompter (in nsIDOMWindow aParent); */ +NS_IMETHODIMP nsWindowWatcher::GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIAuthPrompt getNewAuthPrompter (in nsIDOMWindow aParent); */ +NS_IMETHODIMP nsWindowWatcher::GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setWindowCreator (in nsIWindowCreator creator); */ +NS_IMETHODIMP nsWindowWatcher::SetWindowCreator(nsIWindowCreator *creator) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIWebBrowserChrome getChromeForWindow (in nsIDOMWindow aWindow); */ +NS_IMETHODIMP nsWindowWatcher::GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIDOMWindow getWindowByName (in wstring aTargetName, in nsIDOMWindow aCurrentWindow); */ +NS_IMETHODIMP nsWindowWatcher::GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow, nsIDOMWindow **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIDOMWindow activeWindow; */ +NS_IMETHODIMP nsWindowWatcher::GetActiveWindow(nsIDOMWindow * *aActiveWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsWindowWatcher::SetActiveWindow(nsIDOMWindow * aActiveWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +// {002286a8-494b-43b3-8ddd-49e3fc50622b} +#define NS_WINDOWWATCHER_IID \ + {0x002286a8, 0x494b, 0x43b3, {0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b}} +#define NS_WINDOWWATCHER_CONTRACTID "@mozilla.org/embedcomp/window-watcher;1" + +#endif /* __gen_nsIWindowWatcher_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIX509Cert.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIX509Cert.h new file mode 100644 index 00000000..2b9f2b7d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIX509Cert.h @@ -0,0 +1,593 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/ssl/public/nsIX509Cert.idl + */ + +#ifndef __gen_nsIX509Cert_h__ +#define __gen_nsIX509Cert_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIArray; /* forward declaration */ + +class nsIX509CertValidity; /* forward declaration */ + +class nsIASN1Object; /* forward declaration */ + + +/* starting interface: nsIX509Cert */ +#define NS_IX509CERT_IID_STR "f0980f60-ee3d-11d4-998b-00b0d02354a0" + +#define NS_IX509CERT_IID \ + {0xf0980f60, 0xee3d, 0x11d4, \ + { 0x99, 0x8b, 0x00, 0xb0, 0xd0, 0x23, 0x54, 0xa0 }} + +/** + * This represents a X.509 certificate. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIX509Cert : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IX509CERT_IID) + + /** + * A nickname for the certificate. + */ + /* readonly attribute AString nickname; */ + NS_IMETHOD GetNickname(nsAString & aNickname) = 0; + + /** + * The primary email address of the certificate, if present. + */ + /* readonly attribute AString emailAddress; */ + NS_IMETHOD GetEmailAddress(nsAString & aEmailAddress) = 0; + + /** + * Obtain a list of all email addresses + * contained in the certificate. + * + * @param length The number of strings in the returned array. + * @return An array of email addresses. + */ + /* void getEmailAddresses (out unsigned long length, [array, size_is (length), retval] out wstring addresses); */ + NS_IMETHOD GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses) = 0; + + /** + * Check whether a given address is contained in the certificate. + * The comparison will convert the email address to lowercase. + * The behaviour for non ASCII characters is undefined. + * + * @param aEmailAddress The address to search for. + * + * @return True if the address is contained in the certificate. + */ + /* boolean containsEmailAddress (in AString aEmailAddress); */ + NS_IMETHOD ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval) = 0; + + /** + * The subject owning the certificate. + */ + /* readonly attribute AString subjectName; */ + NS_IMETHOD GetSubjectName(nsAString & aSubjectName) = 0; + + /** + * The subject's common name. + */ + /* readonly attribute AString commonName; */ + NS_IMETHOD GetCommonName(nsAString & aCommonName) = 0; + + /** + * The subject's organization. + */ + /* readonly attribute AString organization; */ + NS_IMETHOD GetOrganization(nsAString & aOrganization) = 0; + + /** + * The subject's organizational unit. + */ + /* readonly attribute AString organizationalUnit; */ + NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) = 0; + + /** + * The fingerprint of the certificate's public key, + * calculated using the SHA1 algorithm. + */ + /* readonly attribute AString sha1Fingerprint; */ + NS_IMETHOD GetSha1Fingerprint(nsAString & aSha1Fingerprint) = 0; + + /** + * The fingerprint of the certificate's public key, + * calculated using the MD5 algorithm. + */ + /* readonly attribute AString md5Fingerprint; */ + NS_IMETHOD GetMd5Fingerprint(nsAString & aMd5Fingerprint) = 0; + + /** + * A human readable name identifying the hardware or + * software token the certificate is stored on. + */ + /* readonly attribute AString tokenName; */ + NS_IMETHOD GetTokenName(nsAString & aTokenName) = 0; + + /** + * The subject identifying the issuer certificate. + */ + /* readonly attribute AString issuerName; */ + NS_IMETHOD GetIssuerName(nsAString & aIssuerName) = 0; + + /** + * The serial number the issuer assigned to this certificate. + */ + /* readonly attribute AString serialNumber; */ + NS_IMETHOD GetSerialNumber(nsAString & aSerialNumber) = 0; + + /** + * The issuer subject's common name. + */ + /* readonly attribute AString issuerCommonName; */ + NS_IMETHOD GetIssuerCommonName(nsAString & aIssuerCommonName) = 0; + + /** + * The issuer subject's organization. + */ + /* readonly attribute AString issuerOrganization; */ + NS_IMETHOD GetIssuerOrganization(nsAString & aIssuerOrganization) = 0; + + /** + * The issuer subject's organizational unit. + */ + /* readonly attribute AString issuerOrganizationUnit; */ + NS_IMETHOD GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit) = 0; + + /** + * The certificate used by the issuer to sign this certificate. + */ + /* readonly attribute nsIX509Cert issuer; */ + NS_IMETHOD GetIssuer(nsIX509Cert * *aIssuer) = 0; + + /** + * This certificate's validity period. + */ + /* readonly attribute nsIX509CertValidity validity; */ + NS_IMETHOD GetValidity(nsIX509CertValidity * *aValidity) = 0; + + /** + * A unique identifier of this certificate within the local storage. + */ + /* readonly attribute string dbKey; */ + NS_IMETHOD GetDbKey(char * *aDbKey) = 0; + + /** + * A human readable identifier to label this certificate. + */ + /* readonly attribute string windowTitle; */ + NS_IMETHOD GetWindowTitle(char * *aWindowTitle) = 0; + + /** + * Constants to classify the type of a certificate. + */ + enum { UNKNOWN_CERT = 0U }; + + enum { CA_CERT = 1U }; + + enum { USER_CERT = 2U }; + + enum { EMAIL_CERT = 4U }; + + enum { SERVER_CERT = 8U }; + + /** + * Constants for certificate verification results. + */ + enum { VERIFIED_OK = 0U }; + + enum { NOT_VERIFIED_UNKNOWN = 1U }; + + enum { CERT_REVOKED = 2U }; + + enum { CERT_EXPIRED = 4U }; + + enum { CERT_NOT_TRUSTED = 8U }; + + enum { ISSUER_NOT_TRUSTED = 16U }; + + enum { ISSUER_UNKNOWN = 32U }; + + enum { INVALID_CA = 64U }; + + enum { USAGE_NOT_ALLOWED = 128U }; + + /** + * Constants that describe the certified usages of a certificate. + */ + enum { CERT_USAGE_SSLClient = 0U }; + + enum { CERT_USAGE_SSLServer = 1U }; + + enum { CERT_USAGE_SSLServerWithStepUp = 2U }; + + enum { CERT_USAGE_SSLCA = 3U }; + + enum { CERT_USAGE_EmailSigner = 4U }; + + enum { CERT_USAGE_EmailRecipient = 5U }; + + enum { CERT_USAGE_ObjectSigner = 6U }; + + enum { CERT_USAGE_UserCertImport = 7U }; + + enum { CERT_USAGE_VerifyCA = 8U }; + + enum { CERT_USAGE_ProtectedObjectSigner = 9U }; + + enum { CERT_USAGE_StatusResponder = 10U }; + + enum { CERT_USAGE_AnyCA = 11U }; + + /** + * Obtain a list of certificates that contains this certificate + * and the issuing certificates of all involved issuers, + * up to the root issuer. + * + * @return The chain of certifficates including the issuers. + */ + /* nsIArray getChain (); */ + NS_IMETHOD GetChain(nsIArray **_retval) = 0; + + /** + * Obtain an array of human readable strings describing + * the certificate's certified usages. + * + * @param ignoreOcsp Do not use OCSP even if it is currently activated. + * @param verified The certificate verification result, see constants. + * @param count The number of human readable usages returned. + * @param usages The array of human readable usages. + */ + /* void getUsagesArray (in boolean ignoreOcsp, out PRUint32 verified, out PRUint32 count, [array, size_is (count)] out wstring usages); */ + NS_IMETHOD GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages) = 0; + + /** + * Obtain a single comma separated human readable string describing + * the certificate's certified usages. + * + * @param ignoreOcsp Do not use OCSP even if it is currently activated. + * @param verified The certificate verification result, see constants. + * @param purposes The string listing the usages. + */ + /* void getUsagesString (in boolean ignoreOcsp, out PRUint32 verified, out AString usages); */ + NS_IMETHOD GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages) = 0; + + /** + * Verify the certificate for a particular usage. + * + * @return The certificate verification result, see constants. + */ + /* unsigned long verifyForUsage (in unsigned long usage); */ + NS_IMETHOD VerifyForUsage(PRUint32 usage, PRUint32 *_retval) = 0; + + /** + * This is the attribute which describes the ASN1 layout + * of the certificate. This can be used when doing a + * "pretty print" of the certificate's ASN1 structure. + */ + /* readonly attribute nsIASN1Object ASN1Structure; */ + NS_IMETHOD GetASN1Structure(nsIASN1Object * *aASN1Structure) = 0; + + /** + * Obtain a raw binary encoding of this certificate + * in DER format. + * + * @param length The number of bytes in the binary encoding. + * @param data The bytes representing the DER encoded certificate. + */ + /* void getRawDER (out unsigned long length, [array, size_is (length), retval] out octet data); */ + NS_IMETHOD GetRawDER(PRUint32 *length, PRUint8 **data) = 0; + + /** + * Test whether two certificate instances represent the + * same certificate. + * + * @return Whether the certificates are equal + */ + /* boolean equals (in nsIX509Cert other); */ + NS_IMETHOD Equals(nsIX509Cert *other, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIX509CERT \ + NS_IMETHOD GetNickname(nsAString & aNickname); \ + NS_IMETHOD GetEmailAddress(nsAString & aEmailAddress); \ + NS_IMETHOD GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses); \ + NS_IMETHOD ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval); \ + NS_IMETHOD GetSubjectName(nsAString & aSubjectName); \ + NS_IMETHOD GetCommonName(nsAString & aCommonName); \ + NS_IMETHOD GetOrganization(nsAString & aOrganization); \ + NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit); \ + NS_IMETHOD GetSha1Fingerprint(nsAString & aSha1Fingerprint); \ + NS_IMETHOD GetMd5Fingerprint(nsAString & aMd5Fingerprint); \ + NS_IMETHOD GetTokenName(nsAString & aTokenName); \ + NS_IMETHOD GetIssuerName(nsAString & aIssuerName); \ + NS_IMETHOD GetSerialNumber(nsAString & aSerialNumber); \ + NS_IMETHOD GetIssuerCommonName(nsAString & aIssuerCommonName); \ + NS_IMETHOD GetIssuerOrganization(nsAString & aIssuerOrganization); \ + NS_IMETHOD GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit); \ + NS_IMETHOD GetIssuer(nsIX509Cert * *aIssuer); \ + NS_IMETHOD GetValidity(nsIX509CertValidity * *aValidity); \ + NS_IMETHOD GetDbKey(char * *aDbKey); \ + NS_IMETHOD GetWindowTitle(char * *aWindowTitle); \ + NS_IMETHOD GetChain(nsIArray **_retval); \ + NS_IMETHOD GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages); \ + NS_IMETHOD GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages); \ + NS_IMETHOD VerifyForUsage(PRUint32 usage, PRUint32 *_retval); \ + NS_IMETHOD GetASN1Structure(nsIASN1Object * *aASN1Structure); \ + NS_IMETHOD GetRawDER(PRUint32 *length, PRUint8 **data); \ + NS_IMETHOD Equals(nsIX509Cert *other, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIX509CERT(_to) \ + NS_IMETHOD GetNickname(nsAString & aNickname) { return _to GetNickname(aNickname); } \ + NS_IMETHOD GetEmailAddress(nsAString & aEmailAddress) { return _to GetEmailAddress(aEmailAddress); } \ + NS_IMETHOD GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses) { return _to GetEmailAddresses(length, addresses); } \ + NS_IMETHOD ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval) { return _to ContainsEmailAddress(aEmailAddress, _retval); } \ + NS_IMETHOD GetSubjectName(nsAString & aSubjectName) { return _to GetSubjectName(aSubjectName); } \ + NS_IMETHOD GetCommonName(nsAString & aCommonName) { return _to GetCommonName(aCommonName); } \ + NS_IMETHOD GetOrganization(nsAString & aOrganization) { return _to GetOrganization(aOrganization); } \ + NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) { return _to GetOrganizationalUnit(aOrganizationalUnit); } \ + NS_IMETHOD GetSha1Fingerprint(nsAString & aSha1Fingerprint) { return _to GetSha1Fingerprint(aSha1Fingerprint); } \ + NS_IMETHOD GetMd5Fingerprint(nsAString & aMd5Fingerprint) { return _to GetMd5Fingerprint(aMd5Fingerprint); } \ + NS_IMETHOD GetTokenName(nsAString & aTokenName) { return _to GetTokenName(aTokenName); } \ + NS_IMETHOD GetIssuerName(nsAString & aIssuerName) { return _to GetIssuerName(aIssuerName); } \ + NS_IMETHOD GetSerialNumber(nsAString & aSerialNumber) { return _to GetSerialNumber(aSerialNumber); } \ + NS_IMETHOD GetIssuerCommonName(nsAString & aIssuerCommonName) { return _to GetIssuerCommonName(aIssuerCommonName); } \ + NS_IMETHOD GetIssuerOrganization(nsAString & aIssuerOrganization) { return _to GetIssuerOrganization(aIssuerOrganization); } \ + NS_IMETHOD GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit) { return _to GetIssuerOrganizationUnit(aIssuerOrganizationUnit); } \ + NS_IMETHOD GetIssuer(nsIX509Cert * *aIssuer) { return _to GetIssuer(aIssuer); } \ + NS_IMETHOD GetValidity(nsIX509CertValidity * *aValidity) { return _to GetValidity(aValidity); } \ + NS_IMETHOD GetDbKey(char * *aDbKey) { return _to GetDbKey(aDbKey); } \ + NS_IMETHOD GetWindowTitle(char * *aWindowTitle) { return _to GetWindowTitle(aWindowTitle); } \ + NS_IMETHOD GetChain(nsIArray **_retval) { return _to GetChain(_retval); } \ + NS_IMETHOD GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages) { return _to GetUsagesArray(ignoreOcsp, verified, count, usages); } \ + NS_IMETHOD GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages) { return _to GetUsagesString(ignoreOcsp, verified, usages); } \ + NS_IMETHOD VerifyForUsage(PRUint32 usage, PRUint32 *_retval) { return _to VerifyForUsage(usage, _retval); } \ + NS_IMETHOD GetASN1Structure(nsIASN1Object * *aASN1Structure) { return _to GetASN1Structure(aASN1Structure); } \ + NS_IMETHOD GetRawDER(PRUint32 *length, PRUint8 **data) { return _to GetRawDER(length, data); } \ + NS_IMETHOD Equals(nsIX509Cert *other, PRBool *_retval) { return _to Equals(other, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIX509CERT(_to) \ + NS_IMETHOD GetNickname(nsAString & aNickname) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNickname(aNickname); } \ + NS_IMETHOD GetEmailAddress(nsAString & aEmailAddress) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmailAddress(aEmailAddress); } \ + NS_IMETHOD GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmailAddresses(length, addresses); } \ + NS_IMETHOD ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ContainsEmailAddress(aEmailAddress, _retval); } \ + NS_IMETHOD GetSubjectName(nsAString & aSubjectName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSubjectName(aSubjectName); } \ + NS_IMETHOD GetCommonName(nsAString & aCommonName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommonName(aCommonName); } \ + NS_IMETHOD GetOrganization(nsAString & aOrganization) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrganization(aOrganization); } \ + NS_IMETHOD GetOrganizationalUnit(nsAString & aOrganizationalUnit) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrganizationalUnit(aOrganizationalUnit); } \ + NS_IMETHOD GetSha1Fingerprint(nsAString & aSha1Fingerprint) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSha1Fingerprint(aSha1Fingerprint); } \ + NS_IMETHOD GetMd5Fingerprint(nsAString & aMd5Fingerprint) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMd5Fingerprint(aMd5Fingerprint); } \ + NS_IMETHOD GetTokenName(nsAString & aTokenName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTokenName(aTokenName); } \ + NS_IMETHOD GetIssuerName(nsAString & aIssuerName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuerName(aIssuerName); } \ + NS_IMETHOD GetSerialNumber(nsAString & aSerialNumber) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSerialNumber(aSerialNumber); } \ + NS_IMETHOD GetIssuerCommonName(nsAString & aIssuerCommonName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuerCommonName(aIssuerCommonName); } \ + NS_IMETHOD GetIssuerOrganization(nsAString & aIssuerOrganization) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuerOrganization(aIssuerOrganization); } \ + NS_IMETHOD GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuerOrganizationUnit(aIssuerOrganizationUnit); } \ + NS_IMETHOD GetIssuer(nsIX509Cert * *aIssuer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIssuer(aIssuer); } \ + NS_IMETHOD GetValidity(nsIX509CertValidity * *aValidity) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValidity(aValidity); } \ + NS_IMETHOD GetDbKey(char * *aDbKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDbKey(aDbKey); } \ + NS_IMETHOD GetWindowTitle(char * *aWindowTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowTitle(aWindowTitle); } \ + NS_IMETHOD GetChain(nsIArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChain(_retval); } \ + NS_IMETHOD GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsagesArray(ignoreOcsp, verified, count, usages); } \ + NS_IMETHOD GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsagesString(ignoreOcsp, verified, usages); } \ + NS_IMETHOD VerifyForUsage(PRUint32 usage, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->VerifyForUsage(usage, _retval); } \ + NS_IMETHOD GetASN1Structure(nsIASN1Object * *aASN1Structure) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetASN1Structure(aASN1Structure); } \ + NS_IMETHOD GetRawDER(PRUint32 *length, PRUint8 **data) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRawDER(length, data); } \ + NS_IMETHOD Equals(nsIX509Cert *other, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(other, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsX509Cert : public nsIX509Cert +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIX509CERT + + nsX509Cert(); + +private: + ~nsX509Cert(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsX509Cert, nsIX509Cert) + +nsX509Cert::nsX509Cert() +{ + /* member initializers and constructor code */ +} + +nsX509Cert::~nsX509Cert() +{ + /* destructor code */ +} + +/* readonly attribute AString nickname; */ +NS_IMETHODIMP nsX509Cert::GetNickname(nsAString & aNickname) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString emailAddress; */ +NS_IMETHODIMP nsX509Cert::GetEmailAddress(nsAString & aEmailAddress) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getEmailAddresses (out unsigned long length, [array, size_is (length), retval] out wstring addresses); */ +NS_IMETHODIMP nsX509Cert::GetEmailAddresses(PRUint32 *length, PRUnichar ***addresses) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean containsEmailAddress (in AString aEmailAddress); */ +NS_IMETHODIMP nsX509Cert::ContainsEmailAddress(const nsAString & aEmailAddress, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString subjectName; */ +NS_IMETHODIMP nsX509Cert::GetSubjectName(nsAString & aSubjectName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString commonName; */ +NS_IMETHODIMP nsX509Cert::GetCommonName(nsAString & aCommonName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString organization; */ +NS_IMETHODIMP nsX509Cert::GetOrganization(nsAString & aOrganization) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString organizationalUnit; */ +NS_IMETHODIMP nsX509Cert::GetOrganizationalUnit(nsAString & aOrganizationalUnit) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString sha1Fingerprint; */ +NS_IMETHODIMP nsX509Cert::GetSha1Fingerprint(nsAString & aSha1Fingerprint) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString md5Fingerprint; */ +NS_IMETHODIMP nsX509Cert::GetMd5Fingerprint(nsAString & aMd5Fingerprint) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString tokenName; */ +NS_IMETHODIMP nsX509Cert::GetTokenName(nsAString & aTokenName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString issuerName; */ +NS_IMETHODIMP nsX509Cert::GetIssuerName(nsAString & aIssuerName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString serialNumber; */ +NS_IMETHODIMP nsX509Cert::GetSerialNumber(nsAString & aSerialNumber) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString issuerCommonName; */ +NS_IMETHODIMP nsX509Cert::GetIssuerCommonName(nsAString & aIssuerCommonName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString issuerOrganization; */ +NS_IMETHODIMP nsX509Cert::GetIssuerOrganization(nsAString & aIssuerOrganization) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString issuerOrganizationUnit; */ +NS_IMETHODIMP nsX509Cert::GetIssuerOrganizationUnit(nsAString & aIssuerOrganizationUnit) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIX509Cert issuer; */ +NS_IMETHODIMP nsX509Cert::GetIssuer(nsIX509Cert * *aIssuer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIX509CertValidity validity; */ +NS_IMETHODIMP nsX509Cert::GetValidity(nsIX509CertValidity * *aValidity) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute string dbKey; */ +NS_IMETHODIMP nsX509Cert::GetDbKey(char * *aDbKey) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute string windowTitle; */ +NS_IMETHODIMP nsX509Cert::GetWindowTitle(char * *aWindowTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIArray getChain (); */ +NS_IMETHODIMP nsX509Cert::GetChain(nsIArray **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getUsagesArray (in boolean ignoreOcsp, out PRUint32 verified, out PRUint32 count, [array, size_is (count)] out wstring usages); */ +NS_IMETHODIMP nsX509Cert::GetUsagesArray(PRBool ignoreOcsp, PRUint32 *verified, PRUint32 *count, PRUnichar ***usages) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getUsagesString (in boolean ignoreOcsp, out PRUint32 verified, out AString usages); */ +NS_IMETHODIMP nsX509Cert::GetUsagesString(PRBool ignoreOcsp, PRUint32 *verified, nsAString & usages) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* unsigned long verifyForUsage (in unsigned long usage); */ +NS_IMETHODIMP nsX509Cert::VerifyForUsage(PRUint32 usage, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIASN1Object ASN1Structure; */ +NS_IMETHODIMP nsX509Cert::GetASN1Structure(nsIASN1Object * *aASN1Structure) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getRawDER (out unsigned long length, [array, size_is (length), retval] out octet data); */ +NS_IMETHODIMP nsX509Cert::GetRawDER(PRUint32 *length, PRUint8 **data) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean equals (in nsIX509Cert other); */ +NS_IMETHODIMP nsX509Cert::Equals(nsIX509Cert *other, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIX509Cert_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIX509CertDB.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIX509CertDB.h new file mode 100644 index 00000000..442e099e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIX509CertDB.h @@ -0,0 +1,494 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/ssl/public/nsIX509CertDB.idl + */ + +#ifndef __gen_nsIX509CertDB_h__ +#define __gen_nsIX509CertDB_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIArray; /* forward declaration */ + +class nsIX509Cert; /* forward declaration */ + +class nsILocalFile; /* forward declaration */ + +class nsIInterfaceRequestor; /* forward declaration */ + +#define NS_X509CERTDB_CONTRACTID "@mozilla.org/security/x509certdb;1" + +/* starting interface: nsIX509CertDB */ +#define NS_IX509CERTDB_IID_STR "da48b3c0-1284-11d5-ac67-000064657374" + +#define NS_IX509CERTDB_IID \ + {0xda48b3c0, 0x1284, 0x11d5, \ + { 0xac, 0x67, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }} + +/** + * This represents a service to access and manipulate + * X.509 certificates stored in a database. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIX509CertDB : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IX509CERTDB_IID) + + /** + * Constants that define which usages a certificate + * is trusted for. + */ + enum { UNTRUSTED = 0U }; + + enum { TRUSTED_SSL = 1U }; + + enum { TRUSTED_EMAIL = 2U }; + + enum { TRUSTED_OBJSIGN = 4U }; + + /** + * Given a nickname and optionally a token, + * locate the matching certificate. + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aNickname The nickname to be used as the key + * to find a certificate. + * + * @return The matching certificate if found. + */ + /* nsIX509Cert findCertByNickname (in nsISupports aToken, in AString aNickname); */ + NS_IMETHOD FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval) = 0; + + /** + * Will find a certificate based on its dbkey + * retrieved by getting the dbKey attribute of + * the certificate. + * + * @param aDBkey Database internal key, as obtained using + * attribute dbkey in nsIX509Cert. + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + */ + /* nsIX509Cert findCertByDBKey (in string aDBkey, in nsISupports aToken); */ + NS_IMETHOD FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval) = 0; + + /** + * Obtain a list of certificate nicknames from the database. + * What the name is depends on type: + * user, ca, or server cert - the nickname + * email cert - the email address + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aType Type of certificate to obtain + * See certificate type constants in nsIX509Cert. + * @param count The number of nicknames in the returned array + * @param certNameList The returned array of certificate nicknames. + */ + /* void findCertNicknames (in nsISupports aToken, in unsigned long aType, out unsigned long count, [array, size_is (count)] out wstring certNameList); */ + NS_IMETHOD FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) = 0; + + /** + * Find the email encryption certificate by nickname. + * + * @param aNickname The nickname to be used as the key + * to find the certificate. + * + * @return The matching certificate if found. + */ + /* nsIX509Cert findEmailEncryptionCert (in AString aNickname); */ + NS_IMETHOD FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval) = 0; + + /** + * Find the email signing certificate by nickname. + * + * @param aNickname The nickname to be used as the key + * to find the certificate. + * + * @return The matching certificate if found. + */ + /* nsIX509Cert findEmailSigningCert (in AString aNickname); */ + NS_IMETHOD FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval) = 0; + + /** + * Find a certificate by email address. + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aEmailAddress The email address to be used as the key + * to find the certificate. + * + * @return The matching certificate if found. + */ + /* nsIX509Cert findCertByEmailAddress (in nsISupports aToken, in string aEmailAddress); */ + NS_IMETHOD FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval) = 0; + + /** + * Use this to import a stream sent down as a mime type into + * the certificate database on the default token. + * The stream may consist of one or more certificates. + * + * @param data The raw data to be imported + * @param length The length of the data to be imported + * @param type The type of the certificate, see constants in nsIX509Cert + * @param ctx A UI context. + */ + /* void importCertificates ([array, size_is (length)] in octet data, in unsigned long length, in unsigned long type, in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) = 0; + + /** + * Import another person's email certificate into the database. + * + * @param data The raw data to be imported + * @param length The length of the data to be imported + * @param ctx A UI context. + */ + /* void importEmailCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) = 0; + + /** + * Import a server machine's certificate into the database. + * + * @param data The raw data to be imported + * @param length The length of the data to be imported + * @param ctx A UI context. + */ + /* void importServerCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) = 0; + + /** + * Import a personal certificate into the database, assuming + * the database already contains the private key for this certificate. + * + * @param data The raw data to be imported + * @param length The length of the data to be imported + * @param ctx A UI context. + */ + /* void importUserCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ + NS_IMETHOD ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) = 0; + + /** + * Delete a certificate stored in the database. + * + * @param aCert Delete this certificate. + */ + /* void deleteCertificate (in nsIX509Cert aCert); */ + NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) = 0; + + /** + * Modify the trust that is stored and associated to a certificate within + * a database. Separate trust is stored for + * One call manipulates the trust for one trust type only. + * See the trust type constants defined within this interface. + * + * @param cert Change the stored trust of this certificate. + * @param type The type of the certificate. See nsIX509Cert. + * @param trust A bitmask. The new trust for the possible usages. + * See the trust constants defined within this interface. + */ + /* void setCertTrust (in nsIX509Cert cert, in unsigned long type, in unsigned long trust); */ + NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) = 0; + + /** + * Query whether a certificate is trusted for a particular use. + * + * @param cert Obtain the stored trust of this certificate. + * @param certType The type of the certificate. See nsIX509Cert. + * @param trustType A single bit from the usages constants defined + * within this interface. + * + * @return Returns true if the certificate is trusted for the given use. + */ + /* boolean isCertTrusted (in nsIX509Cert cert, in unsigned long certType, in unsigned long trustType); */ + NS_IMETHOD IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) = 0; + + /** + * Import certificate(s) from file + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aFile Identifies a file that contains the certificate + * to be imported. + * @param aType Describes the type of certificate that is going to + * be imported. See type constants in nsIX509Cert. + */ + /* void importCertsFromFile (in nsISupports aToken, in nsILocalFile aFile, in unsigned long aType); */ + NS_IMETHOD ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType) = 0; + + /** + * Import a PKCS#12 file containing cert(s) and key(s) into the database. + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aFile Identifies a file that contains the data + * to be imported. + */ + /* void importPKCS12File (in nsISupports aToken, in nsILocalFile aFile); */ + NS_IMETHOD ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile) = 0; + + /** + * Export a set of certs and keys from the database to a PKCS#12 file. + * + * @param aToken Optionally limits the scope of + * this function to a token device. + * Can be null to mean any token. + * @param aFile Identifies a file that will be filled with the data + * to be exported. + * @param count The number of certificates to be exported. + * @param aCerts The array of all certificates to be exported. + */ + /* void exportPKCS12File (in nsISupports aToken, in nsILocalFile aFile, in unsigned long count, [array, size_is (count)] in nsIX509Cert aCerts); */ + NS_IMETHOD ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) = 0; + + /** + * An array of all known OCSP responders within the scope of the + * certificate database. + * + * @return Array of OCSP responders, entries are QIable to nsIOCSPResponder. + */ + /* nsIArray getOCSPResponders (); */ + NS_IMETHOD GetOCSPResponders(nsIArray **_retval) = 0; + + /** + * Whether OCSP is enabled in preferences. + */ + /* readonly attribute boolean isOcspOn; */ + NS_IMETHOD GetIsOcspOn(PRBool *aIsOcspOn) = 0; + + /* nsIX509Cert constructX509FromBase64 (in string base64); */ + NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIX509CERTDB \ + NS_IMETHOD FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval); \ + NS_IMETHOD FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval); \ + NS_IMETHOD FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList); \ + NS_IMETHOD FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval); \ + NS_IMETHOD FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval); \ + NS_IMETHOD FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval); \ + NS_IMETHOD ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx); \ + NS_IMETHOD ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx); \ + NS_IMETHOD ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx); \ + NS_IMETHOD ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx); \ + NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert); \ + NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust); \ + NS_IMETHOD IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval); \ + NS_IMETHOD ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType); \ + NS_IMETHOD ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile); \ + NS_IMETHOD ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts); \ + NS_IMETHOD GetOCSPResponders(nsIArray **_retval); \ + NS_IMETHOD GetIsOcspOn(PRBool *aIsOcspOn); \ + NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIX509CERTDB(_to) \ + NS_IMETHOD FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval) { return _to FindCertByNickname(aToken, aNickname, _retval); } \ + NS_IMETHOD FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval) { return _to FindCertByDBKey(aDBkey, aToken, _retval); } \ + NS_IMETHOD FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) { return _to FindCertNicknames(aToken, aType, count, certNameList); } \ + NS_IMETHOD FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval) { return _to FindEmailEncryptionCert(aNickname, _retval); } \ + NS_IMETHOD FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval) { return _to FindEmailSigningCert(aNickname, _retval); } \ + NS_IMETHOD FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval) { return _to FindCertByEmailAddress(aToken, aEmailAddress, _retval); } \ + NS_IMETHOD ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) { return _to ImportCertificates(data, length, type, ctx); } \ + NS_IMETHOD ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return _to ImportEmailCertificate(data, length, ctx); } \ + NS_IMETHOD ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return _to ImportServerCertificate(data, length, ctx); } \ + NS_IMETHOD ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return _to ImportUserCertificate(data, length, ctx); } \ + NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) { return _to DeleteCertificate(aCert); } \ + NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) { return _to SetCertTrust(cert, type, trust); } \ + NS_IMETHOD IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) { return _to IsCertTrusted(cert, certType, trustType, _retval); } \ + NS_IMETHOD ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType) { return _to ImportCertsFromFile(aToken, aFile, aType); } \ + NS_IMETHOD ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile) { return _to ImportPKCS12File(aToken, aFile); } \ + NS_IMETHOD ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) { return _to ExportPKCS12File(aToken, aFile, count, aCerts); } \ + NS_IMETHOD GetOCSPResponders(nsIArray **_retval) { return _to GetOCSPResponders(_retval); } \ + NS_IMETHOD GetIsOcspOn(PRBool *aIsOcspOn) { return _to GetIsOcspOn(aIsOcspOn); } \ + NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) { return _to ConstructX509FromBase64(base64, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIX509CERTDB(_to) \ + NS_IMETHOD FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCertByNickname(aToken, aNickname, _retval); } \ + NS_IMETHOD FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCertByDBKey(aDBkey, aToken, _retval); } \ + NS_IMETHOD FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCertNicknames(aToken, aType, count, certNameList); } \ + NS_IMETHOD FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindEmailEncryptionCert(aNickname, _retval); } \ + NS_IMETHOD FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindEmailSigningCert(aNickname, _retval); } \ + NS_IMETHOD FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindCertByEmailAddress(aToken, aEmailAddress, _retval); } \ + NS_IMETHOD ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportCertificates(data, length, type, ctx); } \ + NS_IMETHOD ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportEmailCertificate(data, length, ctx); } \ + NS_IMETHOD ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportServerCertificate(data, length, ctx); } \ + NS_IMETHOD ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportUserCertificate(data, length, ctx); } \ + NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCertificate(aCert); } \ + NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCertTrust(cert, type, trust); } \ + NS_IMETHOD IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCertTrusted(cert, certType, trustType, _retval); } \ + NS_IMETHOD ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportCertsFromFile(aToken, aFile, aType); } \ + NS_IMETHOD ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportPKCS12File(aToken, aFile); } \ + NS_IMETHOD ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExportPKCS12File(aToken, aFile, count, aCerts); } \ + NS_IMETHOD GetOCSPResponders(nsIArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOCSPResponders(_retval); } \ + NS_IMETHOD GetIsOcspOn(PRBool *aIsOcspOn) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsOcspOn(aIsOcspOn); } \ + NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConstructX509FromBase64(base64, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsX509CertDB : public nsIX509CertDB +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIX509CERTDB + + nsX509CertDB(); + +private: + ~nsX509CertDB(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsX509CertDB, nsIX509CertDB) + +nsX509CertDB::nsX509CertDB() +{ + /* member initializers and constructor code */ +} + +nsX509CertDB::~nsX509CertDB() +{ + /* destructor code */ +} + +/* nsIX509Cert findCertByNickname (in nsISupports aToken, in AString aNickname); */ +NS_IMETHODIMP nsX509CertDB::FindCertByNickname(nsISupports *aToken, const nsAString & aNickname, nsIX509Cert **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIX509Cert findCertByDBKey (in string aDBkey, in nsISupports aToken); */ +NS_IMETHODIMP nsX509CertDB::FindCertByDBKey(const char *aDBkey, nsISupports *aToken, nsIX509Cert **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void findCertNicknames (in nsISupports aToken, in unsigned long aType, out unsigned long count, [array, size_is (count)] out wstring certNameList); */ +NS_IMETHODIMP nsX509CertDB::FindCertNicknames(nsISupports *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIX509Cert findEmailEncryptionCert (in AString aNickname); */ +NS_IMETHODIMP nsX509CertDB::FindEmailEncryptionCert(const nsAString & aNickname, nsIX509Cert **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIX509Cert findEmailSigningCert (in AString aNickname); */ +NS_IMETHODIMP nsX509CertDB::FindEmailSigningCert(const nsAString & aNickname, nsIX509Cert **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIX509Cert findCertByEmailAddress (in nsISupports aToken, in string aEmailAddress); */ +NS_IMETHODIMP nsX509CertDB::FindCertByEmailAddress(nsISupports *aToken, const char *aEmailAddress, nsIX509Cert **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void importCertificates ([array, size_is (length)] in octet data, in unsigned long length, in unsigned long type, in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsX509CertDB::ImportCertificates(PRUint8 *data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void importEmailCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsX509CertDB::ImportEmailCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void importServerCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsX509CertDB::ImportServerCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void importUserCertificate ([array, size_is (length)] in octet data, in unsigned long length, in nsIInterfaceRequestor ctx); */ +NS_IMETHODIMP nsX509CertDB::ImportUserCertificate(PRUint8 *data, PRUint32 length, nsIInterfaceRequestor *ctx) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deleteCertificate (in nsIX509Cert aCert); */ +NS_IMETHODIMP nsX509CertDB::DeleteCertificate(nsIX509Cert *aCert) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setCertTrust (in nsIX509Cert cert, in unsigned long type, in unsigned long trust); */ +NS_IMETHODIMP nsX509CertDB::SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isCertTrusted (in nsIX509Cert cert, in unsigned long certType, in unsigned long trustType); */ +NS_IMETHODIMP nsX509CertDB::IsCertTrusted(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void importCertsFromFile (in nsISupports aToken, in nsILocalFile aFile, in unsigned long aType); */ +NS_IMETHODIMP nsX509CertDB::ImportCertsFromFile(nsISupports *aToken, nsILocalFile *aFile, PRUint32 aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void importPKCS12File (in nsISupports aToken, in nsILocalFile aFile); */ +NS_IMETHODIMP nsX509CertDB::ImportPKCS12File(nsISupports *aToken, nsILocalFile *aFile) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void exportPKCS12File (in nsISupports aToken, in nsILocalFile aFile, in unsigned long count, [array, size_is (count)] in nsIX509Cert aCerts); */ +NS_IMETHODIMP nsX509CertDB::ExportPKCS12File(nsISupports *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIArray getOCSPResponders (); */ +NS_IMETHODIMP nsX509CertDB::GetOCSPResponders(nsIArray **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean isOcspOn; */ +NS_IMETHODIMP nsX509CertDB::GetIsOcspOn(PRBool *aIsOcspOn) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIX509Cert constructX509FromBase64 (in string base64); */ +NS_IMETHODIMP nsX509CertDB::ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIX509CertDB_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsIX509CertValidity.h b/Src/nprt_plugin/gecko/1.8/win/include/nsIX509CertValidity.h new file mode 100644 index 00000000..128eb5c5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsIX509CertValidity.h @@ -0,0 +1,218 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/security/manager/ssl/public/nsIX509CertValidity.idl + */ + +#ifndef __gen_nsIX509CertValidity_h__ +#define __gen_nsIX509CertValidity_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIX509CertValidity */ +#define NS_IX509CERTVALIDITY_IID_STR "e701dfd8-1dd1-11b2-a172-ffa6cc6156ad" + +#define NS_IX509CERTVALIDITY_IID \ + {0xe701dfd8, 0x1dd1, 0x11b2, \ + { 0xa1, 0x72, 0xff, 0xa6, 0xcc, 0x61, 0x56, 0xad }} + +/** + * Information on the validity period of a X.509 certificate. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIX509CertValidity : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IX509CERTVALIDITY_IID) + + /** + * The earliest point in time where + * a certificate is valid. + */ + /* readonly attribute PRTime notBefore; */ + NS_IMETHOD GetNotBefore(PRTime *aNotBefore) = 0; + + /** + * "notBefore" attribute formatted as a time string + * according to the environment locale, + * according to the environment time zone. + */ + /* readonly attribute AString notBeforeLocalTime; */ + NS_IMETHOD GetNotBeforeLocalTime(nsAString & aNotBeforeLocalTime) = 0; + + /** + * The day portion of "notBefore" + * formatted as a time string + * according to the environment locale, + * according to the environment time zone. + */ + /* readonly attribute AString notBeforeLocalDay; */ + NS_IMETHOD GetNotBeforeLocalDay(nsAString & aNotBeforeLocalDay) = 0; + + /** + * "notBefore" attribute formatted as a string + * according to the environment locale, + * displayed as GMT / UTC. + */ + /* readonly attribute AString notBeforeGMT; */ + NS_IMETHOD GetNotBeforeGMT(nsAString & aNotBeforeGMT) = 0; + + /** + * The latest point in time where + * a certificate is valid. + */ + /* readonly attribute PRTime notAfter; */ + NS_IMETHOD GetNotAfter(PRTime *aNotAfter) = 0; + + /** + * "notAfter" attribute formatted as a time string + * according to the environment locale, + * according to the environment time zone. + */ + /* readonly attribute AString notAfterLocalTime; */ + NS_IMETHOD GetNotAfterLocalTime(nsAString & aNotAfterLocalTime) = 0; + + /** + * The day portion of "notAfter" + * formatted as a time string + * according to the environment locale, + * according to the environment time zone. + */ + /* readonly attribute AString notAfterLocalDay; */ + NS_IMETHOD GetNotAfterLocalDay(nsAString & aNotAfterLocalDay) = 0; + + /** + * "notAfter" attribute formatted as a time string + * according to the environment locale, + * displayed as GMT / UTC. + */ + /* readonly attribute AString notAfterGMT; */ + NS_IMETHOD GetNotAfterGMT(nsAString & aNotAfterGMT) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIX509CERTVALIDITY \ + NS_IMETHOD GetNotBefore(PRTime *aNotBefore); \ + NS_IMETHOD GetNotBeforeLocalTime(nsAString & aNotBeforeLocalTime); \ + NS_IMETHOD GetNotBeforeLocalDay(nsAString & aNotBeforeLocalDay); \ + NS_IMETHOD GetNotBeforeGMT(nsAString & aNotBeforeGMT); \ + NS_IMETHOD GetNotAfter(PRTime *aNotAfter); \ + NS_IMETHOD GetNotAfterLocalTime(nsAString & aNotAfterLocalTime); \ + NS_IMETHOD GetNotAfterLocalDay(nsAString & aNotAfterLocalDay); \ + NS_IMETHOD GetNotAfterGMT(nsAString & aNotAfterGMT); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIX509CERTVALIDITY(_to) \ + NS_IMETHOD GetNotBefore(PRTime *aNotBefore) { return _to GetNotBefore(aNotBefore); } \ + NS_IMETHOD GetNotBeforeLocalTime(nsAString & aNotBeforeLocalTime) { return _to GetNotBeforeLocalTime(aNotBeforeLocalTime); } \ + NS_IMETHOD GetNotBeforeLocalDay(nsAString & aNotBeforeLocalDay) { return _to GetNotBeforeLocalDay(aNotBeforeLocalDay); } \ + NS_IMETHOD GetNotBeforeGMT(nsAString & aNotBeforeGMT) { return _to GetNotBeforeGMT(aNotBeforeGMT); } \ + NS_IMETHOD GetNotAfter(PRTime *aNotAfter) { return _to GetNotAfter(aNotAfter); } \ + NS_IMETHOD GetNotAfterLocalTime(nsAString & aNotAfterLocalTime) { return _to GetNotAfterLocalTime(aNotAfterLocalTime); } \ + NS_IMETHOD GetNotAfterLocalDay(nsAString & aNotAfterLocalDay) { return _to GetNotAfterLocalDay(aNotAfterLocalDay); } \ + NS_IMETHOD GetNotAfterGMT(nsAString & aNotAfterGMT) { return _to GetNotAfterGMT(aNotAfterGMT); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIX509CERTVALIDITY(_to) \ + NS_IMETHOD GetNotBefore(PRTime *aNotBefore) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotBefore(aNotBefore); } \ + NS_IMETHOD GetNotBeforeLocalTime(nsAString & aNotBeforeLocalTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotBeforeLocalTime(aNotBeforeLocalTime); } \ + NS_IMETHOD GetNotBeforeLocalDay(nsAString & aNotBeforeLocalDay) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotBeforeLocalDay(aNotBeforeLocalDay); } \ + NS_IMETHOD GetNotBeforeGMT(nsAString & aNotBeforeGMT) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotBeforeGMT(aNotBeforeGMT); } \ + NS_IMETHOD GetNotAfter(PRTime *aNotAfter) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotAfter(aNotAfter); } \ + NS_IMETHOD GetNotAfterLocalTime(nsAString & aNotAfterLocalTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotAfterLocalTime(aNotAfterLocalTime); } \ + NS_IMETHOD GetNotAfterLocalDay(nsAString & aNotAfterLocalDay) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotAfterLocalDay(aNotAfterLocalDay); } \ + NS_IMETHOD GetNotAfterGMT(nsAString & aNotAfterGMT) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotAfterGMT(aNotAfterGMT); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsX509CertValidity : public nsIX509CertValidity +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIX509CERTVALIDITY + + nsX509CertValidity(); + +private: + ~nsX509CertValidity(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsX509CertValidity, nsIX509CertValidity) + +nsX509CertValidity::nsX509CertValidity() +{ + /* member initializers and constructor code */ +} + +nsX509CertValidity::~nsX509CertValidity() +{ + /* destructor code */ +} + +/* readonly attribute PRTime notBefore; */ +NS_IMETHODIMP nsX509CertValidity::GetNotBefore(PRTime *aNotBefore) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString notBeforeLocalTime; */ +NS_IMETHODIMP nsX509CertValidity::GetNotBeforeLocalTime(nsAString & aNotBeforeLocalTime) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString notBeforeLocalDay; */ +NS_IMETHODIMP nsX509CertValidity::GetNotBeforeLocalDay(nsAString & aNotBeforeLocalDay) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString notBeforeGMT; */ +NS_IMETHODIMP nsX509CertValidity::GetNotBeforeGMT(nsAString & aNotBeforeGMT) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRTime notAfter; */ +NS_IMETHODIMP nsX509CertValidity::GetNotAfter(PRTime *aNotAfter) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString notAfterLocalTime; */ +NS_IMETHODIMP nsX509CertValidity::GetNotAfterLocalTime(nsAString & aNotAfterLocalTime) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString notAfterLocalDay; */ +NS_IMETHODIMP nsX509CertValidity::GetNotAfterLocalDay(nsAString & aNotAfterLocalDay) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute AString notAfterGMT; */ +NS_IMETHODIMP nsX509CertValidity::GetNotAfterGMT(nsAString & aNotAfterGMT) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIX509CertValidity_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsMemory.h b/Src/nprt_plugin/gecko/1.8/win/include/nsMemory.h new file mode 100644 index 00000000..3e7947a2 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsMemory.h @@ -0,0 +1,161 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsMemory_h__ +#define nsMemory_h__ + +#include "nsXPCOM.h" +#include "nsIMemory.h" + +#define NS_MEMORY_CONTRACTID "@mozilla.org/xpcom/memory-service;1" +#define NS_MEMORY_CLASSNAME "Global Memory Service" +#define NS_MEMORY_CID \ +{ /* 30a04e40-38e7-11d4-8cf5-0060b0fc14a3 */ \ + 0x30a04e40, \ + 0x38e7, \ + 0x11d4, \ + {0x8c, 0xf5, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + + +/** + * Static helper routines to manage memory. These routines allow easy access + * to xpcom's built-in (global) nsIMemory implementation, without needing + * to go through the service manager to get it. However this requires clients + * to link with the xpcom DLL. + * + * This class is not threadsafe and is intented for use only on the main + * thread. + */ +class nsMemory +{ +public: + static NS_HIDDEN_(void*) Alloc(size_t size) + { return NS_Alloc(size); } + + static NS_HIDDEN_(void*) Realloc(void* ptr, PRSize size) + { return NS_Realloc(ptr, size); } + + static NS_HIDDEN_(void) Free(void* ptr) + { NS_Free(ptr); } + + static NS_COM_GLUE nsresult HeapMinimize(PRBool aImmediate); + static NS_COM_GLUE void* Clone(const void* ptr, PRSize size); + static NS_COM_GLUE nsIMemory* GetGlobalMemoryService(); // AddRefs +}; + +/** + * Macro to free all elements of an XPCOM array of a given size using + * freeFunc, then frees the array itself using nsMemory::Free(). + * + * Note that this macro (and its wrappers) can be used to deallocate a + * partially- or completely-built array while unwinding an error + * condition inside the XPCOM routine that was going to return the + * array. For this to work on a partially-built array, your code + * needs to be building the array from index 0 upwards, and simply + * pass the number of elements that have already been built (and thus + * need to be freed) as |size|. + * + * Thanks to <alecf@netscape.com> for suggesting this form, which + * allows the macro to be used with NS_RELEASE / NS_RELEASE_IF in + * addition to nsMemory::Free. + * + * @param size Number of elements in the array. If not a constant, this + * should be a PRInt32. Note that this means this macro + * will not work if size >= 2^31. + * @param array The array to be freed. + * @param freeFunc The function or macro to be used to free it. + * For arrays of nsISupports (or any class derived + * from it), NS_IF_RELEASE (or NS_RELEASE) should be + * passed as freeFunc. For most (all?) other pointer + * types (including XPCOM strings and wstrings), + * nsMemory::Free should be used, since the + * shared-allocator (nsMemory) is what will have been + * used to allocate the memory. + */ +#define NS_FREE_XPCOM_POINTER_ARRAY(size, array, freeFunc) \ + PR_BEGIN_MACRO \ + PRInt32 iter_ = PRInt32(size); \ + while (--iter_ >= 0) \ + freeFunc((array)[iter_]); \ + NS_Free((array)); \ + PR_END_MACRO + +// convenience macros for commonly used calls. mmmmm. syntactic sugar. + +/** + * Macro to free arrays of non-refcounted objects allocated by the + * shared allocator (nsMemory) such as strings and wstrings. A + * convenience wrapper around NS_FREE_XPCOM_POINTER_ARRAY. + * + * @param size Number of elements in the array. If not a constant, this + * should be a PRInt32. Note that this means this macro + * will not work if size >= 2^31. + * @param array The array to be freed. + */ +#define NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(size, array) \ + NS_FREE_XPCOM_POINTER_ARRAY((size), (array), NS_Free) + +/** + * Macro to free an array of pointers to nsISupports (or classes + * derived from it). A convenience wrapper around + * NS_FREE_XPCOM_POINTER_ARRAY. + * + * Note that if you know that none of your nsISupports pointers are + * going to be 0, you can gain a bit of speed by calling + * NS_FREE_XPCOM_POINTER_ARRAY directly and using NS_RELEASE as your + * free function. + * + * @param size Number of elements in the array. If not a constant, this + * should be a PRInt32. Note that this means this macro + * will not work if size >= 2^31. + * @param array The array to be freed. + */ +#define NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(size, array) \ + NS_FREE_XPCOM_POINTER_ARRAY((size), (array), NS_IF_RELEASE) + +/** + * Helpful array length function for calculating the length of a + * statically declared array. + */ + +#define NS_ARRAY_LENGTH(array_) \ + (sizeof(array_)/sizeof(array_[0])) + + +#endif // nsMemory_h__ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsParserDataListener.h b/Src/nprt_plugin/gecko/1.8/win/include/nsParserDataListener.h new file mode 100644 index 00000000..596553a5 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsParserDataListener.h @@ -0,0 +1,91 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is mozilla.org. + * Portions created by the Initial Developer are Copyright (C) 2004 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Johnny Stenback <jst@mozilla.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 ***** */ + +#ifndef __nsParserDataListener_h__ +#define __nsParserDataListener_h__ + +/* + * Include this header if you're implementing a parser data + * listener. To make a component a parser data listener you'll need to + * make your component implement the interface + * nsIUnicharStreamListener. That interface has three methods (one + + * two inherited ones, not counting what's defined in + * nsISupports). The methods are: + * + * void onStartRequest(in nsIRequest aRequest, + * in nsISupports aContext); + * void onUnicharDataAvailable(in nsIRequest aRequest, + * in nsISupports aContext, in AString aData); + * void onStopRequest(in nsIRequest aRequest, + * in nsISupports aContext, + * in nsresult aStatusCode); + * + * All those methods are called for every network request that ends up + * feeding data to the parser. The method are called in the order + * shown above, first one call to onStartRequest(), then one call to + * onUnicharDataAvailable() per chunk of data received and converted + * to UTF-16, and finally one call to onStopRequest(). + * + * The nsIRequest passed into these methods will be the same object + * for all these calls for a given network request. If the request + * pointer is used to uniquely identify an ongoing request, the + * pointer should be QueryInterface()'d to nsISupports to ensure that + * the pointer used is the identity pointer to the object. + * + * The context argument passed to these methods will be the document + * (nsIDOMDocument) parsed from the stream, or null when not + * available. + * + * Any errors returned from any of these calls will end up canceling + * the stream, and the data that is passed to the call in question + * will *not* be seen by the parser. So unless you intend to interrupt + * a request, *make sure* that you return NS_OK from these methods! + */ + +#include "nsIUnicharStreamListener.h" + +/* + * To register a component to be a parser data listener the + * component's contract id should be registered with the category + * manager (nsICategoryManager), with the category + * PARSER_DATA_LISTENER_CATEGORY, defined here. + * + * @status FROZEN + */ +#define PARSER_DATA_LISTENER_CATEGORY "Parser data listener" + +#endif // __nsParserDataListener_h__ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsServiceManagerUtils.h b/Src/nprt_plugin/gecko/1.8/win/include/nsServiceManagerUtils.h new file mode 100644 index 00000000..a08fd201 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsServiceManagerUtils.h @@ -0,0 +1,133 @@ +/* -*- Mode: C++; tab-width: 2; 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 XPCOM. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsServiceManagerUtils_h__ +#define nsServiceManagerUtils_h__ + +#include "nsIServiceManager.h" +#include "nsCOMPtr.h" + +inline +const nsGetServiceByCID +do_GetService(const nsCID& aCID) +{ + return nsGetServiceByCID(aCID); +} + +inline +const nsGetServiceByCIDWithError +do_GetService(const nsCID& aCID, nsresult* error) +{ + return nsGetServiceByCIDWithError(aCID, error); +} + +inline +const nsGetServiceByContractID +do_GetService(const char* aContractID) +{ + return nsGetServiceByContractID(aContractID); +} + +inline +const nsGetServiceByContractIDWithError +do_GetService( const char* aContractID, nsresult* error) +{ + return nsGetServiceByContractIDWithError(aContractID, error); +} + +class nsGetServiceFromCategory : public nsCOMPtr_helper +{ + public: + nsGetServiceFromCategory(const char* aCategory, const char* aEntry, + nsresult* aErrorPtr) + : mCategory(aCategory), + mEntry(aEntry), + mErrorPtr(aErrorPtr) + { + // nothing else to do + } + + virtual nsresult NS_FASTCALL operator()( const nsIID&, void** ) const; + protected: + const char* mCategory; + const char* mEntry; + nsresult* mErrorPtr; +}; + +inline +const nsGetServiceFromCategory +do_GetServiceFromCategory( const char* category, const char* entry, + nsresult* error = 0) +{ + return nsGetServiceFromCategory(category, entry, error); +} + +NS_COM_GLUE nsresult +CallGetService(const nsCID &aClass, const nsIID &aIID, void **aResult); + +NS_COM_GLUE nsresult +CallGetService(const char *aContractID, const nsIID &aIID, void **aResult); + +// type-safe shortcuts for calling |GetService| +template <class DestinationType> +inline +nsresult +CallGetService( const nsCID &aClass, + DestinationType** aDestination) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + return CallGetService(aClass, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template <class DestinationType> +inline +nsresult +CallGetService( const char *aContractID, + DestinationType** aDestination) +{ + NS_PRECONDITION(aContractID, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return CallGetService(aContractID, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsStaticComponents.h b/Src/nprt_plugin/gecko/1.8/win/include/nsStaticComponents.h new file mode 100644 index 00000000..ecbb6873 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsStaticComponents.h @@ -0,0 +1,47 @@ +/* ***** 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 Toolkit. + * + * The Initial Developer of the Original Code is + * Benjamin Smedberg <benjamin@smedbergs.us> + * + * Portions created by the Initial Developer are Copyright (C) 2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nsStaticComponents_h__ +#define nsStaticComponents_h__ + +// These symbols are provided by nsStaticComponents.cpp, and also by other +// static component providers such as nsStaticXULComponents (libxul). + +extern nsStaticModuleInfo const *const kPStaticModules; +extern PRUint32 const kStaticModuleCount; + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsStringAPI.h b/Src/nprt_plugin/gecko/1.8/win/include/nsStringAPI.h new file mode 100644 index 00000000..9f645acf --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsStringAPI.h @@ -0,0 +1,1737 @@ +/* vim:set ts=2 sw=2 et cindent: */ +/* ***** 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 Mozilla. + * + * The Initial Developer of the Original Code is IBM Corporation. + * Portions created by IBM Corporation are Copyright (C) 2003 + * IBM Corporation. All Rights Reserved. + * + * Contributor(s): + * Darin Fisher <darin@meer.net> + * + * 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 ***** */ + +#ifndef nsStringAPI_h__ +#define nsStringAPI_h__ + +#include <string.h> + +/** + * nsStringAPI.h + * + * This file describes a minimal API for working with XPCOM's abstract + * string classes. It divorces the consumer from having any run-time + * dependency on the implementation details of the abstract string types. + */ + +// Map frozen functions to private symbol names if not using strict API. +#ifdef MOZILLA_INTERNAL_API +# define NS_StringContainerInit NS_StringContainerInit_P +# define NS_StringContainerInit2 NS_StringContainerInit2_P +# define NS_StringContainerFinish NS_StringContainerFinish_P +# define NS_StringGetData NS_StringGetData_P +# define NS_StringGetMutableData NS_StringGetMutableData_P +# define NS_StringCloneData NS_StringCloneData_P +# define NS_StringSetData NS_StringSetData_P +# define NS_StringSetDataRange NS_StringSetDataRange_P +# define NS_StringCopy NS_StringCopy_P +# define NS_CStringContainerInit NS_CStringContainerInit_P +# define NS_CStringContainerInit2 NS_CStringContainerInit2_P +# define NS_CStringContainerFinish NS_CStringContainerFinish_P +# define NS_CStringGetData NS_CStringGetData_P +# define NS_CStringGetMutableData NS_CStringGetMutableData_P +# define NS_CStringCloneData NS_CStringCloneData_P +# define NS_CStringSetData NS_CStringSetData_P +# define NS_CStringSetDataRange NS_CStringSetDataRange_P +# define NS_CStringCopy NS_CStringCopy_P +# define NS_CStringToUTF16 NS_CStringToUTF16_P +# define NS_UTF16ToCString NS_UTF16ToCString_P +#endif + +#include "nscore.h" + +#if defined( XPCOM_GLUE ) +#define NS_STRINGAPI(type) extern "C" NS_HIDDEN_(type) +#elif defined( _IMPL_NS_STRINGAPI ) +#define NS_STRINGAPI(type) extern "C" NS_EXPORT type +#else +#define NS_STRINGAPI(type) extern "C" NS_IMPORT type +#endif + +/* The base string types */ +class nsAString; +class nsACString; + +/* ------------------------------------------------------------------------- */ + +/** + * nsStringContainer + * + * This is an opaque data type that is large enough to hold the canonical + * implementation of nsAString. The binary structure of this class is an + * implementation detail. + * + * The string data stored in a string container is always single fragment + * and may be null-terminated depending on how it is initialized. + * + * Typically, string containers are allocated on the stack for temporary + * use. However, they can also be malloc'd if necessary. In either case, + * a string container is not useful until it has been initialized with a + * call to NS_StringContainerInit. The following example shows how to use + * a string container to call a function that takes a |nsAString &| out-param. + * + * NS_METHOD GetBlah(nsAString &aBlah); + * + * nsresult MyCode() + * { + * nsresult rv; + * + * nsStringContainer sc; + * rv = NS_StringContainerInit(sc); + * if (NS_FAILED(rv)) + * return rv; + * + * rv = GetBlah(sc); + * if (NS_SUCCEEDED(rv)) + * { + * const PRUnichar *data; + * NS_StringGetData(sc, &data); + * // + * // |data| now points to the result of the GetBlah function + * // + * } + * + * NS_StringContainerFinish(sc); + * return rv; + * } + * + * The following example show how to use a string container to pass a string + * parameter to a function taking a |const nsAString &| in-param. + * + * NS_METHOD SetBlah(const nsAString &aBlah); + * + * nsresult MyCode() + * { + * nsresult rv; + * + * nsStringContainer sc; + * rv = NS_StringContainerInit(sc); + * if (NS_FAILED(rv)) + * return rv; + * + * const PRUnichar kData[] = {'x','y','z','\0'}; + * rv = NS_StringSetData(sc, kData, sizeof(kData)/2 - 1); + * if (NS_SUCCEEDED(rv)) + * rv = SetBlah(sc); + * + * NS_StringContainerFinish(sc); + * return rv; + * } + */ +class nsStringContainer; + +/** + * Flags that may be OR'd together to pass to NS_StringContainerInit2: + */ +enum { + /* Data passed into NS_StringContainerInit2 is not copied; instead, the + * string references the passed in data pointer directly. The caller must + * ensure that the data is valid for the lifetime of the string container. + * This flag should not be combined with NS_STRING_CONTAINER_INIT_ADOPT. */ + NS_STRING_CONTAINER_INIT_DEPEND = (1 << 1), + + /* Data passed into NS_StringContainerInit2 is not copied; instead, the + * string takes ownership over the data pointer. The caller must have + * allocated the data array using the XPCOM memory allocator (nsMemory). + * This flag should not be combined with NS_STRING_CONTAINER_INIT_DEPEND. */ + NS_STRING_CONTAINER_INIT_ADOPT = (1 << 2), + + /* Data passed into NS_StringContainerInit2 is a substring that is not + * null-terminated. */ + NS_STRING_CONTAINER_INIT_SUBSTRING = (1 << 3) +}; + +/** + * NS_StringContainerInit + * + * @param aContainer string container reference + * @return NS_OK if string container successfully initialized + * + * This function may allocate additional memory for aContainer. When + * aContainer is no longer needed, NS_StringContainerFinish should be called. + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_StringContainerInit(nsStringContainer &aContainer); + +/** + * NS_StringContainerInit2 + * + * @param aContainer string container reference + * @param aData character buffer (may be null) + * @param aDataLength number of characters stored at aData (may pass + * PR_UINT32_MAX if aData is null-terminated) + * @param aFlags flags affecting how the string container is + * initialized. this parameter is ignored when aData + * is null. otherwise, if this parameter is 0, then + * aData is copied into the string. + * + * This function resembles NS_StringContainerInit but provides further + * options that permit more efficient memory usage. When aContainer is + * no longer needed, NS_StringContainerFinish should be called. + * + * NOTE: NS_StringContainerInit2(container, nsnull, 0, 0) is equivalent to + * NS_StringContainerInit(container). + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_StringContainerInit2 + (nsStringContainer &aContainer, const PRUnichar *aData = nsnull, + PRUint32 aDataLength = PR_UINT32_MAX, PRUint32 aFlags = 0); + +/** + * NS_StringContainerFinish + * + * @param aContainer string container reference + * + * This function frees any memory owned by aContainer. + * + * @status FROZEN + */ +NS_STRINGAPI(void) +NS_StringContainerFinish(nsStringContainer &aContainer); + +/* ------------------------------------------------------------------------- */ + +/** + * NS_StringGetData + * + * This function returns a const character pointer to the string's internal + * buffer, the length of the string, and a boolean value indicating whether + * or not the buffer is null-terminated. + * + * @param aStr abstract string reference + * @param aData out param that will hold the address of aStr's + * internal buffer + * @param aTerminated if non-null, this out param will be set to indicate + * whether or not aStr's internal buffer is null- + * terminated + * @return length of aStr's internal buffer + * + * @status FROZEN + */ +NS_STRINGAPI(PRUint32) +NS_StringGetData + (const nsAString &aStr, const PRUnichar **aData, + PRBool *aTerminated = nsnull); + +/** + * NS_StringGetMutableData + * + * This function provides mutable access to a string's internal buffer. It + * returns a pointer to an array of characters that may be modified. The + * returned pointer remains valid until the string object is passed to some + * other string function. + * + * Optionally, this function may be used to resize the string's internal + * buffer. The aDataLength parameter specifies the requested length of the + * string's internal buffer. By passing some value other than PR_UINT32_MAX, + * the caller can request that the buffer be resized to the specified number of + * characters before returning. The caller is not responsible for writing a + * null-terminator. + * + * @param aStr abstract string reference + * @param aDataLength number of characters to resize the string's internal + * buffer to or PR_UINT32_MAX if no resizing is needed + * @param aData out param that upon return holds the address of aStr's + * internal buffer or null if the function failed + * @return number of characters or zero if the function failed + * + * This function does not necessarily null-terminate aStr after resizing its + * internal buffer. The behavior depends on the implementation of the abstract + * string, aStr. If aStr is a reference to a nsStringContainer, then its data + * will be null-terminated by this function. + * + * @status FROZEN + */ +NS_STRINGAPI(PRUint32) +NS_StringGetMutableData + (nsAString &aStr, PRUint32 aDataLength, PRUnichar **aData); + +/** + * NS_StringCloneData + * + * This function returns a null-terminated copy of the string's + * internal buffer. + * + * @param aStr abstract string reference + * @return null-terminated copy of the string's internal buffer + * (it must be free'd using using nsMemory::Free) + * + * @status FROZEN + */ +NS_STRINGAPI(PRUnichar *) +NS_StringCloneData + (const nsAString &aStr); + +/** + * NS_StringSetData + * + * This function copies aData into aStr. + * + * @param aStr abstract string reference + * @param aData character buffer + * @param aDataLength number of characters to copy from source string (pass + * PR_UINT32_MAX to copy until end of aData, designated by + * a null character) + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aStr after copying data + * from aData. The behavior depends on the implementation of the abstract + * string, aStr. If aStr is a reference to a nsStringContainer, then its data + * will be null-terminated by this function. + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_StringSetData + (nsAString &aStr, const PRUnichar *aData, + PRUint32 aDataLength = PR_UINT32_MAX); + +/** + * NS_StringSetDataRange + * + * This function copies aData into a section of aStr. As a result it can be + * used to insert new characters into the string. + * + * @param aStr abstract string reference + * @param aCutOffset starting index where the string's existing data + * is to be overwritten (pass PR_UINT32_MAX to cause + * aData to be appended to the end of aStr, in which + * case the value of aCutLength is ignored). + * @param aCutLength number of characters to overwrite starting at + * aCutOffset (pass PR_UINT32_MAX to overwrite until the + * end of aStr). + * @param aData character buffer (pass null to cause this function + * to simply remove the "cut" range) + * @param aDataLength number of characters to copy from source string (pass + * PR_UINT32_MAX to copy until end of aData, designated by + * a null character) + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aStr after copying data + * from aData. The behavior depends on the implementation of the abstract + * string, aStr. If aStr is a reference to a nsStringContainer, then its data + * will be null-terminated by this function. + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_StringSetDataRange + (nsAString &aStr, PRUint32 aCutOffset, PRUint32 aCutLength, + const PRUnichar *aData, PRUint32 aDataLength = PR_UINT32_MAX); + +/** + * NS_StringCopy + * + * This function makes aDestStr have the same value as aSrcStr. It is + * provided as an optimization. + * + * @param aDestStr abstract string reference to be modified + * @param aSrcStr abstract string reference containing source string + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aDestStr after copying + * data from aSrcStr. The behavior depends on the implementation of the + * abstract string, aDestStr. If aDestStr is a reference to a + * nsStringContainer, then its data will be null-terminated by this function. + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_StringCopy + (nsAString &aDestStr, const nsAString &aSrcStr); + +/** + * NS_StringAppendData + * + * This function appends data to the existing value of aStr. + * + * @param aStr abstract string reference to be modified + * @param aData character buffer + * @param aDataLength number of characters to append (pass PR_UINT32_MAX to + * append until a null-character is encountered) + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aStr upon completion. + * The behavior depends on the implementation of the abstract string, aStr. + * If aStr is a reference to a nsStringContainer, then its data will be null- + * terminated by this function. + */ +inline NS_HIDDEN_(nsresult) +NS_StringAppendData(nsAString &aStr, const PRUnichar *aData, + PRUint32 aDataLength = PR_UINT32_MAX) +{ + return NS_StringSetDataRange(aStr, PR_UINT32_MAX, 0, aData, aDataLength); +} + +/** + * NS_StringInsertData + * + * This function inserts data into the existing value of aStr at the specified + * offset. + * + * @param aStr abstract string reference to be modified + * @param aOffset specifies where in the string to insert aData + * @param aData character buffer + * @param aDataLength number of characters to append (pass PR_UINT32_MAX to + * append until a null-character is encountered) + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aStr upon completion. + * The behavior depends on the implementation of the abstract string, aStr. + * If aStr is a reference to a nsStringContainer, then its data will be null- + * terminated by this function. + */ +inline NS_HIDDEN_(nsresult) +NS_StringInsertData(nsAString &aStr, PRUint32 aOffset, const PRUnichar *aData, + PRUint32 aDataLength = PR_UINT32_MAX) +{ + return NS_StringSetDataRange(aStr, aOffset, 0, aData, aDataLength); +} + +/** + * NS_StringCutData + * + * This function shortens the existing value of aStr, by removing characters + * at the specified offset. + * + * @param aStr abstract string reference to be modified + * @param aCutOffset specifies where in the string to insert aData + * @param aCutLength number of characters to remove + * @return NS_OK if function succeeded + */ +inline NS_HIDDEN_(nsresult) +NS_StringCutData(nsAString &aStr, PRUint32 aCutOffset, PRUint32 aCutLength) +{ + return NS_StringSetDataRange(aStr, aCutOffset, aCutLength, nsnull, 0); +} + +/* ------------------------------------------------------------------------- */ + +/** + * nsCStringContainer + * + * This is an opaque data type that is large enough to hold the canonical + * implementation of nsACString. The binary structure of this class is an + * implementation detail. + * + * The string data stored in a string container is always single fragment + * and may be null-terminated depending on how it is initialized. + * + * @see nsStringContainer for use cases and further documentation. + */ +class nsCStringContainer; + +/** + * Flags that may be OR'd together to pass to NS_StringContainerInit2: + */ +enum { + /* Data passed into NS_CStringContainerInit2 is not copied; instead, the + * string references the passed in data pointer directly. The caller must + * ensure that the data is valid for the lifetime of the string container. + * This flag should not be combined with NS_CSTRING_CONTAINER_INIT_ADOPT. */ + NS_CSTRING_CONTAINER_INIT_DEPEND = (1 << 1), + + /* Data passed into NS_CStringContainerInit2 is not copied; instead, the + * string takes ownership over the data pointer. The caller must have + * allocated the data array using the XPCOM memory allocator (nsMemory). + * This flag should not be combined with NS_CSTRING_CONTAINER_INIT_DEPEND. */ + NS_CSTRING_CONTAINER_INIT_ADOPT = (1 << 2), + + /* Data passed into NS_CStringContainerInit2 is a substring that is not + * null-terminated. */ + NS_CSTRING_CONTAINER_INIT_SUBSTRING = (1 << 3) +}; + +/** + * NS_CStringContainerInit + * + * @param aContainer string container reference + * @return NS_OK if string container successfully initialized + * + * This function may allocate additional memory for aContainer. When + * aContainer is no longer needed, NS_CStringContainerFinish should be called. + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_CStringContainerInit(nsCStringContainer &aContainer); + +/** + * NS_CStringContainerInit2 + * + * @param aContainer string container reference + * @param aData character buffer (may be null) + * @param aDataLength number of characters stored at aData (may pass + * PR_UINT32_MAX if aData is null-terminated) + * @param aFlags flags affecting how the string container is + * initialized. this parameter is ignored when aData + * is null. otherwise, if this parameter is 0, then + * aData is copied into the string. + * + * This function resembles NS_CStringContainerInit but provides further + * options that permit more efficient memory usage. When aContainer is + * no longer needed, NS_CStringContainerFinish should be called. + * + * NOTE: NS_CStringContainerInit2(container, nsnull, 0, 0) is equivalent to + * NS_CStringContainerInit(container). + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_CStringContainerInit2 + (nsCStringContainer &aContainer, const char *aData = nsnull, + PRUint32 aDataLength = PR_UINT32_MAX, PRUint32 aFlags = 0); + +/** + * NS_CStringContainerFinish + * + * @param aContainer string container reference + * + * This function frees any memory owned by aContainer. + * + * @status FROZEN + */ +NS_STRINGAPI(void) +NS_CStringContainerFinish(nsCStringContainer &aContainer); + +/* ------------------------------------------------------------------------- */ + +/** + * NS_CStringGetData + * + * This function returns a const character pointer to the string's internal + * buffer, the length of the string, and a boolean value indicating whether + * or not the buffer is null-terminated. + * + * @param aStr abstract string reference + * @param aData out param that will hold the address of aStr's + * internal buffer + * @param aTerminated if non-null, this out param will be set to indicate + * whether or not aStr's internal buffer is null- + * terminated + * @return length of aStr's internal buffer + * + * @status FROZEN + */ +NS_STRINGAPI(PRUint32) +NS_CStringGetData + (const nsACString &aStr, const char **aData, + PRBool *aTerminated = nsnull); + +/** + * NS_CStringGetMutableData + * + * This function provides mutable access to a string's internal buffer. It + * returns a pointer to an array of characters that may be modified. The + * returned pointer remains valid until the string object is passed to some + * other string function. + * + * Optionally, this function may be used to resize the string's internal + * buffer. The aDataLength parameter specifies the requested length of the + * string's internal buffer. By passing some value other than PR_UINT32_MAX, + * the caller can request that the buffer be resized to the specified number of + * characters before returning. The caller is not responsible for writing a + * null-terminator. + * + * @param aStr abstract string reference + * @param aDataLength number of characters to resize the string's internal + * buffer to or PR_UINT32_MAX if no resizing is needed + * @param aData out param that upon return holds the address of aStr's + * internal buffer or null if the function failed + * @return number of characters or zero if the function failed + * + * This function does not necessarily null-terminate aStr after resizing its + * internal buffer. The behavior depends on the implementation of the abstract + * string, aStr. If aStr is a reference to a nsStringContainer, then its data + * will be null-terminated by this function. + * + * @status FROZEN + */ +NS_STRINGAPI(PRUint32) +NS_CStringGetMutableData + (nsACString &aStr, PRUint32 aDataLength, char **aData); + +/** + * NS_CStringCloneData + * + * This function returns a null-terminated copy of the string's + * internal buffer. + * + * @param aStr abstract string reference + * @return null-terminated copy of the string's internal buffer + * (it must be free'd using using nsMemory::Free) + * + * @status FROZEN + */ +NS_STRINGAPI(char *) +NS_CStringCloneData + (const nsACString &aStr); + +/** + * NS_CStringSetData + * + * This function copies aData into aStr. + * + * @param aStr abstract string reference + * @param aData character buffer + * @param aDataLength number of characters to copy from source string (pass + * PR_UINT32_MAX to copy until end of aData, designated by + * a null character) + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aStr after copying data + * from aData. The behavior depends on the implementation of the abstract + * string, aStr. If aStr is a reference to a nsStringContainer, then its data + * will be null-terminated by this function. + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_CStringSetData + (nsACString &aStr, const char *aData, + PRUint32 aDataLength = PR_UINT32_MAX); + +/** + * NS_CStringSetDataRange + * + * This function copies aData into a section of aStr. As a result it can be + * used to insert new characters into the string. + * + * @param aStr abstract string reference + * @param aCutOffset starting index where the string's existing data + * is to be overwritten (pass PR_UINT32_MAX to cause + * aData to be appended to the end of aStr, in which + * case the value of aCutLength is ignored). + * @param aCutLength number of characters to overwrite starting at + * aCutOffset (pass PR_UINT32_MAX to overwrite until the + * end of aStr). + * @param aData character buffer (pass null to cause this function + * to simply remove the "cut" range) + * @param aDataLength number of characters to copy from source string (pass + * PR_UINT32_MAX to copy until end of aData, designated by + * a null character) + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aStr after copying data + * from aData. The behavior depends on the implementation of the abstract + * string, aStr. If aStr is a reference to a nsStringContainer, then its data + * will be null-terminated by this function. + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_CStringSetDataRange + (nsACString &aStr, PRUint32 aCutOffset, PRUint32 aCutLength, + const char *aData, PRUint32 aDataLength = PR_UINT32_MAX); + +/** + * NS_CStringCopy + * + * This function makes aDestStr have the same value as aSrcStr. It is + * provided as an optimization. + * + * @param aDestStr abstract string reference to be modified + * @param aSrcStr abstract string reference containing source string + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aDestStr after copying + * data from aSrcStr. The behavior depends on the implementation of the + * abstract string, aDestStr. If aDestStr is a reference to a + * nsStringContainer, then its data will be null-terminated by this function. + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_CStringCopy + (nsACString &aDestStr, const nsACString &aSrcStr); + +/** + * NS_CStringAppendData + * + * This function appends data to the existing value of aStr. + * + * @param aStr abstract string reference to be modified + * @param aData character buffer + * @param aDataLength number of characters to append (pass PR_UINT32_MAX to + * append until a null-character is encountered) + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aStr upon completion. + * The behavior depends on the implementation of the abstract string, aStr. + * If aStr is a reference to a nsStringContainer, then its data will be null- + * terminated by this function. + */ +inline NS_HIDDEN_(nsresult) +NS_CStringAppendData(nsACString &aStr, const char *aData, + PRUint32 aDataLength = PR_UINT32_MAX) +{ + return NS_CStringSetDataRange(aStr, PR_UINT32_MAX, 0, aData, aDataLength); +} + +/** + * NS_CStringInsertData + * + * This function inserts data into the existing value of aStr at the specified + * offset. + * + * @param aStr abstract string reference to be modified + * @param aOffset specifies where in the string to insert aData + * @param aData character buffer + * @param aDataLength number of characters to append (pass PR_UINT32_MAX to + * append until a null-character is encountered) + * @return NS_OK if function succeeded + * + * This function does not necessarily null-terminate aStr upon completion. + * The behavior depends on the implementation of the abstract string, aStr. + * If aStr is a reference to a nsStringContainer, then its data will be null- + * terminated by this function. + */ +inline NS_HIDDEN_(nsresult) +NS_CStringInsertData(nsACString &aStr, PRUint32 aOffset, const char *aData, + PRUint32 aDataLength = PR_UINT32_MAX) +{ + return NS_CStringSetDataRange(aStr, aOffset, 0, aData, aDataLength); +} + +/** + * NS_CStringCutData + * + * This function shortens the existing value of aStr, by removing characters + * at the specified offset. + * + * @param aStr abstract string reference to be modified + * @param aCutOffset specifies where in the string to insert aData + * @param aCutLength number of characters to remove + * @return NS_OK if function succeeded + */ +inline NS_HIDDEN_(nsresult) +NS_CStringCutData(nsACString &aStr, PRUint32 aCutOffset, PRUint32 aCutLength) +{ + return NS_CStringSetDataRange(aStr, aCutOffset, aCutLength, nsnull, 0); +} + +/* ------------------------------------------------------------------------- */ + +/** + * Encodings that can be used with the following conversion routines. + */ +enum nsCStringEncoding { + /* Conversion between ASCII and UTF-16 assumes that all bytes in the source + * string are 7-bit ASCII and can be inflated to UTF-16 by inserting null + * bytes. Reverse conversion is done by truncating every other byte. The + * conversion may result in loss and/or corruption of information if the + * strings do not strictly contain ASCII data. */ + NS_CSTRING_ENCODING_ASCII = 0, + + /* Conversion between UTF-8 and UTF-16 is non-lossy. */ + NS_CSTRING_ENCODING_UTF8 = 1, + + /* Conversion from UTF-16 to the native filesystem charset may result in a + * loss of information. No attempt is made to protect against data loss in + * this case. The native filesystem charset applies to strings passed to + * the "Native" method variants on nsIFile and nsILocalFile. */ + NS_CSTRING_ENCODING_NATIVE_FILESYSTEM = 2 +}; + +/** + * NS_CStringToUTF16 + * + * This function converts the characters in a nsACString to an array of UTF-16 + * characters, in the platform endianness. The result is stored in a nsAString + * object. + * + * @param aSource abstract string reference containing source string + * @param aSrcEncoding character encoding of the source string + * @param aDest abstract string reference to hold the result + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_CStringToUTF16(const nsACString &aSource, nsCStringEncoding aSrcEncoding, + nsAString &aDest); + +/** + * NS_UTF16ToCString + * + * This function converts the UTF-16 characters in a nsAString to a single-byte + * encoding. The result is stored in a nsACString object. In some cases this + * conversion may be lossy. In such cases, the conversion may succeed with a + * return code indicating loss of information. The exact behavior is not + * specified at this time. + * + * @param aSource abstract string reference containing source string + * @param aDestEncoding character encoding of the resulting string + * @param aDest abstract string reference to hold the result + * + * @status FROZEN + */ +NS_STRINGAPI(nsresult) +NS_UTF16ToCString(const nsAString &aSource, nsCStringEncoding aDestEncoding, + nsACString &aDest); + +/* ------------------------------------------------------------------------- */ + +/** + * Below we define nsAString and nsACString. The "_external" suffix is an + * implementation detail. nsAString_external is the name of the external + * representation of nsAString from the point of view of the Mozilla codebase. + * To a user of this API, nsAString_external is exactly nsAString. + * + * These classes should be treated as abstract classes with unspecified + * structure. The inline methods are provided as helper functions around the + * C-style API provided above. + * + * Do not try to mix these definitions of nsAString and nsACString with the + * internal definition of these classes from nsAString.h in the Mozilla tree. + */ + +#ifndef MOZILLA_INTERNAL_API +#define nsAString_external nsAString +#define nsACString_external nsACString +#endif + +class nsAString_external +{ +#ifndef MOZILLA_INTERNAL_API + +public: + typedef PRUnichar char_type; + typedef nsAString_external self_type; + typedef PRUint32 size_type; + typedef PRUint32 index_type; + + NS_HIDDEN_(const char_type*) BeginReading() const + { + const char_type *data; + NS_StringGetData(*this, &data); + return data; + } + + NS_HIDDEN_(const char_type*) EndReading() const + { + const char_type *data; + PRUint32 len = NS_StringGetData(*this, &data); + return data + len; + } + + NS_HIDDEN_(char_type*) BeginWriting() + { + char_type *data; + NS_StringGetMutableData(*this, PR_UINT32_MAX, &data); + return data; + } + + NS_HIDDEN_(PRBool) SetLength(PRUint32 aLen) + { + char_type *data; + NS_StringGetMutableData(*this, aLen, &data); + return data != nsnull; + } + + NS_HIDDEN_(size_type) Length() const + { + const char_type* data; + return NS_StringGetData(*this, &data); + } + + NS_HIDDEN_(PRBool) IsEmpty() const + { + return Length() == 0; + } + + NS_HIDDEN_(void) Assign(const self_type& aString) + { + NS_StringCopy(*this, aString); + } + NS_HIDDEN_(void) Assign(const char_type* aData, size_type aLength = PR_UINT32_MAX) + { + NS_StringSetData(*this, aData, aLength); + } + NS_HIDDEN_(void) Assign(char_type aChar) + { + NS_StringSetData(*this, &aChar, 1); + } + + NS_HIDDEN_(self_type&) operator=(const self_type& aString) { Assign(aString); return *this; } + NS_HIDDEN_(self_type&) operator=(const char_type* aPtr) { Assign(aPtr); return *this; } + NS_HIDDEN_(self_type&) operator=(char_type aChar) { Assign(aChar); return *this; } + + NS_HIDDEN_(void) Replace( index_type cutStart, size_type cutLength, const char_type* data, size_type length = size_type(-1) ) + { + NS_StringSetDataRange(*this, cutStart, cutLength, data, length); + } + NS_HIDDEN_(void) Replace( index_type cutStart, size_type cutLength, char_type c ) + { + Replace(cutStart, cutLength, &c, 1); + } + NS_HIDDEN_(void) Replace( index_type cutStart, size_type cutLength, const self_type& readable ) + { + const char_type* data; + PRUint32 dataLen = NS_StringGetData(readable, &data); + NS_StringSetDataRange(*this, cutStart, cutLength, data, dataLen); + } + + NS_HIDDEN_(void) Append( char_type c ) { Replace(size_type(-1), 0, c); } + NS_HIDDEN_(void) Append( const char_type* data, size_type length = size_type(-1) ) { Replace(size_type(-1), 0, data, length); } + NS_HIDDEN_(void) Append( const self_type& readable ) { Replace(size_type(-1), 0, readable); } + + NS_HIDDEN_(self_type&) operator+=( char_type c ) { Append(c); return *this; } + NS_HIDDEN_(self_type&) operator+=( const char_type* data ) { Append(data); return *this; } + NS_HIDDEN_(self_type&) operator+=( const self_type& readable ) { Append(readable); return *this; } + + NS_HIDDEN_(void) Insert( char_type c, index_type pos ) { Replace(pos, 0, c); } + NS_HIDDEN_(void) Insert( const char_type* data, index_type pos, size_type length = size_type(-1) ) { Replace(pos, 0, data, length); } + NS_HIDDEN_(void) Insert( const self_type& readable, index_type pos ) { Replace(pos, 0, readable); } + + NS_HIDDEN_(void) Cut( index_type cutStart, size_type cutLength ) { Replace(cutStart, cutLength, nsnull, 0); } + + NS_HIDDEN_(PRBool) Equals( const self_type &other ) const { + const char_type *cself; + const char_type *cother; + PRUint32 selflen = NS_StringGetData(*this, &cself); + PRUint32 otherlen = NS_StringGetData(other, &cother); + + if (selflen != otherlen) + return PR_FALSE; + + return memcmp(cself, cother, selflen * sizeof(char_type)) == 0; + } + +#endif // MOZILLA_INTERNAL_API + +protected: + // Prevent people from allocating a nsAString directly. + ~nsAString_external() {} + +private: + void *v; +}; + +class nsACString_external +{ +#ifndef MOZILLA_INTERNAL_API + +public: + typedef char char_type; + typedef nsACString_external self_type; + typedef PRUint32 size_type; + typedef PRUint32 index_type; + + NS_HIDDEN_(const char_type*) BeginReading() const + { + const char_type *data; + NS_CStringGetData(*this, &data); + return data; + } + + NS_HIDDEN_(const char_type*) EndReading() const + { + const char_type *data; + PRUint32 len = NS_CStringGetData(*this, &data); + return data + len; + } + + NS_HIDDEN_(char_type*) BeginWriting() + { + char_type *data; + NS_CStringGetMutableData(*this, PR_UINT32_MAX, &data); + return data; + } + + NS_HIDDEN_(PRBool) SetLength(PRUint32 aLen) + { + char_type *data; + NS_CStringGetMutableData(*this, aLen, &data); + return data != nsnull; + } + + NS_HIDDEN_(size_type) Length() const + { + const char_type* data; + return NS_CStringGetData(*this, &data); + } + + NS_HIDDEN_(PRBool) IsEmpty() const + { + return Length() == 0; + } + + NS_HIDDEN_(void) Assign(const self_type& aString) + { + NS_CStringCopy(*this, aString); + } + NS_HIDDEN_(void) Assign(const char_type* aData, size_type aLength = PR_UINT32_MAX) + { + NS_CStringSetData(*this, aData, aLength); + } + NS_HIDDEN_(void) Assign(char_type aChar) + { + NS_CStringSetData(*this, &aChar, 1); + } + + NS_HIDDEN_(self_type&) operator=(const self_type& aString) { Assign(aString); return *this; } + NS_HIDDEN_(self_type&) operator=(const char_type* aPtr) { Assign(aPtr); return *this; } + NS_HIDDEN_(self_type&) operator=(char_type aChar) { Assign(aChar); return *this; } + + NS_HIDDEN_(void) Replace( index_type cutStart, size_type cutLength, const char_type* data, size_type length = size_type(-1) ) + { + NS_CStringSetDataRange(*this, cutStart, cutLength, data, length); + } + NS_HIDDEN_(void) Replace( index_type cutStart, size_type cutLength, char_type c ) + { + Replace(cutStart, cutLength, &c, 1); + } + NS_HIDDEN_(void) Replace( index_type cutStart, size_type cutLength, const self_type& readable ) + { + const char_type* data; + PRUint32 dataLen = NS_CStringGetData(readable, &data); + NS_CStringSetDataRange(*this, cutStart, cutLength, data, dataLen); + } + + NS_HIDDEN_(void) Append( char_type c ) { Replace(size_type(-1), 0, c); } + NS_HIDDEN_(void) Append( const char_type* data, size_type length = size_type(-1) ) { Replace(size_type(-1), 0, data, length); } + NS_HIDDEN_(void) Append( const self_type& readable ) { Replace(size_type(-1), 0, readable); } + + NS_HIDDEN_(self_type&) operator+=( char_type c ) { Append(c); return *this; } + NS_HIDDEN_(self_type&) operator+=( const char_type* data ) { Append(data); return *this; } + NS_HIDDEN_(self_type&) operator+=( const self_type& readable ) { Append(readable); return *this; } + + NS_HIDDEN_(void) Insert( char_type c, index_type pos ) { Replace(pos, 0, c); } + NS_HIDDEN_(void) Insert( const char_type* data, index_type pos, size_type length = size_type(-1) ) { Replace(pos, 0, data, length); } + NS_HIDDEN_(void) Insert( const self_type& readable, index_type pos ) { Replace(pos, 0, readable); } + + NS_HIDDEN_(void) Cut( index_type cutStart, size_type cutLength ) { Replace(cutStart, cutLength, nsnull, 0); } + + NS_HIDDEN_(PRBool) Equals( const self_type &other ) const { + const char_type *cself; + const char_type *cother; + PRUint32 selflen = NS_CStringGetData(*this, &cself); + PRUint32 otherlen = NS_CStringGetData(other, &cother); + + if (selflen != otherlen) + return PR_FALSE; + + return memcmp(cself, cother, selflen * sizeof(char_type)) == 0; + } + +#endif // MOZILLA_INTERNAL_API + +protected: + // Prevent people from allocating a nsACString directly. + ~nsACString_external() {} + +private: + void *v; +}; + +/* ------------------------------------------------------------------------- */ + +/** + * Below we define nsStringContainer and nsCStringContainer. These classes + * have unspecified structure. In most cases, your code should use + * nsEmbedString instead of these classes; however, if you prefer C-style + * programming, then look no further... + */ + +class nsStringContainer : public nsAString_external +{ +private: + void *d1; + PRUint32 d2; + void *d3; + +public: + nsStringContainer() {} // MSVC6 needs this +}; + +class nsCStringContainer : public nsACString_external +{ +private: + void *d1; + PRUint32 d2; + void *d3; + +public: + nsCStringContainer() {} // MSVC6 needs this +}; + +/* ------------------------------------------------------------------------- */ + +/** + * Below we define a number of inlined helper classes that make the frozen + * string API easier to use. + */ + +#ifndef MOZILLA_INTERNAL_API +#include "nsDebug.h" + +/** + * Rename symbols to avoid conflicting with internal versions. + */ +#define nsString nsString_external +#define nsCString nsCString_external +#define nsDependentString nsDependentString_external +#define nsDependentCString nsDependentCString_external +#define NS_ConvertASCIItoUTF16 NS_ConvertASCIItoUTF16_external +#define NS_ConvertUTF8toUTF16 NS_ConvertUTF8toUTF16_external +#define NS_ConvertUTF16toUTF8 NS_ConvertUTF16toUTF8_external +#define NS_LossyConvertUTF16toASCII NS_LossyConvertUTF16toASCII_external +#define nsGetterCopies nsGetterCopies_external +#define nsCGetterCopies nsCGetterCopies_external +#define nsDependentSubstring nsDependentSubstring_external +#define nsDependentCSubstring nsDependentCSubstring_external + +/** + * basic strings + */ + +class nsString : public nsStringContainer +{ +public: + typedef nsString self_type; + typedef nsAString abstract_string_type; + + nsString() + { + NS_StringContainerInit(*this); + } + + nsString(const self_type& aString) + { + NS_StringContainerInit(*this); + NS_StringCopy(*this, aString); + } + + explicit + nsString(const abstract_string_type& aReadable) + { + NS_StringContainerInit(*this); + NS_StringCopy(*this, aReadable); + } + + explicit + nsString(const char_type* aData, size_type aLength = PR_UINT32_MAX) + { + NS_StringContainerInit2(*this, aData, aLength, 0); + } + + ~nsString() + { + NS_StringContainerFinish(*this); + } + + const char_type* get() const + { + const char_type* data; + NS_StringGetData(*this, &data); + return data; + } + + self_type& operator=(const self_type& aString) { Assign(aString); return *this; } + self_type& operator=(const abstract_string_type& aReadable) { Assign(aReadable); return *this; } + self_type& operator=(const char_type* aPtr) { Assign(aPtr); return *this; } + self_type& operator=(char_type aChar) { Assign(aChar); return *this; } + + void Adopt(const char_type *aData, size_type aLength = PR_UINT32_MAX) + { + NS_StringContainerFinish(*this); + NS_StringContainerInit2(*this, aData, aLength, + NS_STRING_CONTAINER_INIT_ADOPT); + } + +protected: + + nsString(const char_type* aData, size_type aLength, PRUint32 aFlags) + { + NS_StringContainerInit2(*this, aData, aLength, aFlags); + } +}; + +class nsCString : public nsCStringContainer +{ +public: + typedef nsCString self_type; + typedef nsACString abstract_string_type; + + nsCString() + { + NS_CStringContainerInit(*this); + } + + nsCString(const self_type& aString) + { + NS_CStringContainerInit(*this); + NS_CStringCopy(*this, aString); + } + + explicit + nsCString(const abstract_string_type& aReadable) + { + NS_CStringContainerInit(*this); + NS_CStringCopy(*this, aReadable); + } + + explicit + nsCString(const char_type* aData, size_type aLength = PR_UINT32_MAX) + { + NS_CStringContainerInit(*this); + NS_CStringSetData(*this, aData, aLength); + } + + ~nsCString() + { + NS_CStringContainerFinish(*this); + } + + const char_type* get() const + { + const char_type* data; + NS_CStringGetData(*this, &data); + return data; + } + + self_type& operator=(const self_type& aString) { Assign(aString); return *this; } + self_type& operator=(const abstract_string_type& aReadable) { Assign(aReadable); return *this; } + self_type& operator=(const char_type* aPtr) { Assign(aPtr); return *this; } + self_type& operator=(char_type aChar) { Assign(aChar); return *this; } + + void Adopt(const char_type *aData, size_type aLength = PR_UINT32_MAX) + { + NS_CStringContainerFinish(*this); + NS_CStringContainerInit2(*this, aData, aLength, + NS_CSTRING_CONTAINER_INIT_ADOPT); + } + +protected: + + nsCString(const char_type* aData, size_type aLength, PRUint32 aFlags) + { + NS_CStringContainerInit2(*this, aData, aLength, aFlags); + } +}; + + +/** + * dependent strings + */ + +class nsDependentString : public nsString +{ +public: + typedef nsDependentString self_type; + + nsDependentString() {} + + explicit + nsDependentString(const char_type* aData, size_type aLength = PR_UINT32_MAX) + : nsString(aData, aLength, NS_CSTRING_CONTAINER_INIT_DEPEND) + {} + + void Rebind(const char_type* aData, size_type aLength = PR_UINT32_MAX) + { + NS_StringContainerFinish(*this); + NS_StringContainerInit2(*this, aData, aLength, + NS_STRING_CONTAINER_INIT_DEPEND); + } + +private: + self_type& operator=(const self_type& aString); // NOT IMPLEMENTED +}; + +class nsDependentCString : public nsCString +{ +public: + typedef nsDependentCString self_type; + + nsDependentCString() {} + + explicit + nsDependentCString(const char_type* aData, size_type aLength = PR_UINT32_MAX) + : nsCString(aData, aLength, NS_CSTRING_CONTAINER_INIT_DEPEND) + {} + + void Rebind(const char_type* aData, size_type aLength = PR_UINT32_MAX) + { + NS_CStringContainerFinish(*this); + NS_CStringContainerInit2(*this, aData, aLength, + NS_CSTRING_CONTAINER_INIT_DEPEND); + } + +private: + self_type& operator=(const self_type& aString); // NOT IMPLEMENTED +}; + + +/** + * conversion classes + */ + +class NS_ConvertASCIItoUTF16 : public nsString +{ +public: + typedef NS_ConvertASCIItoUTF16 self_type; + + explicit + NS_ConvertASCIItoUTF16(const nsACString& aStr) + { + NS_CStringToUTF16(aStr, NS_CSTRING_ENCODING_ASCII, *this); + } + + explicit + NS_ConvertASCIItoUTF16(const char* aData, PRUint32 aLength = PR_UINT32_MAX) + { + NS_CStringToUTF16(nsDependentCString(aData, aLength), + NS_CSTRING_ENCODING_ASCII, *this); + } + +private: + self_type& operator=(const self_type& aString); // NOT IMPLEMENTED +}; + +class NS_ConvertUTF8toUTF16 : public nsString +{ +public: + typedef NS_ConvertUTF8toUTF16 self_type; + + explicit + NS_ConvertUTF8toUTF16(const nsACString& aStr) + { + NS_CStringToUTF16(aStr, NS_CSTRING_ENCODING_UTF8, *this); + } + + explicit + NS_ConvertUTF8toUTF16(const char* aData, PRUint32 aLength = PR_UINT32_MAX) + { + NS_CStringToUTF16(nsDependentCString(aData, aLength), + NS_CSTRING_ENCODING_UTF8, *this); + } + +private: + self_type& operator=(const self_type& aString); // NOT IMPLEMENTED +}; + +class NS_ConvertUTF16toUTF8 : public nsCString +{ +public: + typedef NS_ConvertUTF16toUTF8 self_type; + + explicit + NS_ConvertUTF16toUTF8(const nsAString& aStr) + { + NS_UTF16ToCString(aStr, NS_CSTRING_ENCODING_UTF8, *this); + } + + explicit + NS_ConvertUTF16toUTF8(const PRUnichar* aData, PRUint32 aLength = PR_UINT32_MAX) + { + NS_UTF16ToCString(nsDependentString(aData, aLength), + NS_CSTRING_ENCODING_UTF8, *this); + } + +private: + self_type& operator=(const self_type& aString); // NOT IMPLEMENTED +}; + +class NS_LossyConvertUTF16toASCII : public nsCString +{ +public: + typedef NS_LossyConvertUTF16toASCII self_type; + + explicit + NS_LossyConvertUTF16toASCII(const nsAString& aStr) + { + NS_UTF16ToCString(aStr, NS_CSTRING_ENCODING_ASCII, *this); + } + + explicit + NS_LossyConvertUTF16toASCII(const PRUnichar* aData, PRUint32 aLength = PR_UINT32_MAX) + { + NS_UTF16ToCString(nsDependentString(aData, aLength), + NS_CSTRING_ENCODING_ASCII, *this); + } + +private: + self_type& operator=(const self_type& aString); // NOT IMPLEMENTED +}; + + +/** + * literal strings + * + * NOTE: HAVE_CPP_2BYTE_WCHAR_T may be automatically defined for some platforms + * in nscore.h. On other platforms, it may be defined in xpcom-config.h. + * Under GCC, this define should only be set if compiling with -fshort-wchar. + */ + +#ifdef HAVE_CPP_2BYTE_WCHAR_T + #define NS_LL(s) L##s + #define NS_MULTILINE_LITERAL_STRING(s) nsDependentString(NS_REINTERPRET_CAST(const nsAString::char_type*, s), PRUint32((sizeof(s)/sizeof(wchar_t))-1)) + #define NS_MULTILINE_LITERAL_STRING_INIT(n,s) n(NS_REINTERPRET_CAST(const nsAString::char_type*, s), PRUint32((sizeof(s)/sizeof(wchar_t))-1)) + #define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) const nsDependentString n(NS_REINTERPRET_CAST(const nsAString::char_type*, s), PRUint32((sizeof(s)/sizeof(wchar_t))-1)) + typedef nsDependentString nsLiteralString; +#else + #define NS_LL(s) s + #define NS_MULTILINE_LITERAL_STRING(s) NS_ConvertASCIItoUTF16(s, PRUint32(sizeof(s)-1)) + #define NS_MULTILINE_LITERAL_STRING_INIT(n,s) n(s, PRUint32(sizeof(s)-1)) + #define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) const NS_ConvertASCIItoUTF16 n(s, PRUint32(sizeof(s)-1)) + typedef NS_ConvertASCIItoUTF16 nsLiteralString; +#endif + +/* + * Macro arguments used in concatenation or stringification won't be expanded. + * Therefore, in order for |NS_L(FOO)| to work as expected (which is to expand + * |FOO| before doing whatever |NS_L| needs to do to it) a helper macro needs + * to be inserted in between to allow the macro argument to expand. + * See "3.10.6 Separate Expansion of Macro Arguments" of the CPP manual for a + * more accurate and precise explanation. + */ + +#define NS_L(s) NS_LL(s) + +#define NS_LITERAL_STRING(s) NS_STATIC_CAST(const nsString&, NS_MULTILINE_LITERAL_STRING(NS_LL(s))) +#define NS_LITERAL_STRING_INIT(n,s) NS_MULTILINE_LITERAL_STRING_INIT(n, NS_LL(s)) +#define NS_NAMED_LITERAL_STRING(n,s) NS_NAMED_MULTILINE_LITERAL_STRING(n, NS_LL(s)) + +#define NS_LITERAL_CSTRING(s) NS_STATIC_CAST(const nsDependentCString&, nsDependentCString(s, PRUint32(sizeof(s)-1))) +#define NS_LITERAL_CSTRING_INIT(n,s) n(s, PRUint32(sizeof(s)-1)) +#define NS_NAMED_LITERAL_CSTRING(n,s) const nsDependentCString n(s, PRUint32(sizeof(s)-1)) + +typedef nsDependentCString nsLiteralCString; + + +/** + * getter_Copies support + * + * NS_IMETHOD GetBlah(PRUnichar**); + * + * void some_function() + * { + * nsString blah; + * GetBlah(getter_Copies(blah)); + * // ... + * } + */ + +class nsGetterCopies +{ +public: + typedef PRUnichar char_type; + + nsGetterCopies(nsString& aStr) + : mString(aStr), mData(nsnull) + {} + + ~nsGetterCopies() + { + mString.Adopt(mData); + } + + operator char_type**() + { + return &mData; + } + +private: + nsString& mString; + char_type* mData; +}; + +inline nsGetterCopies +getter_Copies(nsString& aString) +{ + return nsGetterCopies(aString); +} + +class nsCGetterCopies +{ +public: + typedef char char_type; + + nsCGetterCopies(nsCString& aStr) + : mString(aStr), mData(nsnull) + {} + + ~nsCGetterCopies() + { + mString.Adopt(mData); + } + + operator char_type**() + { + return &mData; + } + +private: + nsCString& mString; + char_type* mData; +}; + +inline nsCGetterCopies +getter_Copies(nsCString& aString) +{ + return nsCGetterCopies(aString); +} + + +/** +* substrings +*/ + +class nsDependentSubstring : public nsStringContainer +{ +public: + typedef nsDependentSubstring self_type; + typedef nsAString abstract_string_type; + + ~nsDependentSubstring() + { + NS_StringContainerFinish(*this); + } + + nsDependentSubstring() + { + NS_StringContainerInit(*this); + } + + nsDependentSubstring(const char_type *aStart, PRUint32 aLength) + { + NS_StringContainerInit2(*this, aStart, aLength, + NS_STRING_CONTAINER_INIT_DEPEND | + NS_STRING_CONTAINER_INIT_SUBSTRING); + } + + nsDependentSubstring(const abstract_string_type& aStr, + PRUint32 aStartPos) + { + const PRUnichar* data; + PRUint32 len = NS_StringGetData(aStr, &data); + NS_StringContainerInit2(*this, data + aStartPos, len - aStartPos, + NS_STRING_CONTAINER_INIT_DEPEND | + NS_STRING_CONTAINER_INIT_SUBSTRING); + } + + nsDependentSubstring(const abstract_string_type& aStr, + PRUint32 aStartPos, PRUint32 aLength) + { + const PRUnichar* data; +#ifdef DEBUG + PRUint32 len = +#endif + NS_StringGetData(aStr, &data); + NS_ASSERTION(aStartPos + aLength <= len, "bad length"); + NS_StringContainerInit2(*this, data + aStartPos, aLength, + NS_STRING_CONTAINER_INIT_DEPEND | + NS_STRING_CONTAINER_INIT_SUBSTRING); + } + + void Rebind(const char_type *aStart, PRUint32 aLength) + { + NS_StringContainerFinish(*this); + NS_StringContainerInit2(*this, aStart, aLength, + NS_STRING_CONTAINER_INIT_DEPEND | + NS_STRING_CONTAINER_INIT_SUBSTRING); + } + +private: + self_type& operator=(const self_type& aString); // NOT IMPLEMENTED +}; + +class nsDependentCSubstring : public nsCStringContainer +{ +public: + typedef nsDependentCSubstring self_type; + typedef nsACString abstract_string_type; + + ~nsDependentCSubstring() + { + NS_CStringContainerFinish(*this); + } + + nsDependentCSubstring() + { + NS_CStringContainerInit(*this); + } + + nsDependentCSubstring(const char_type *aStart, PRUint32 aLength) + { + NS_CStringContainerInit2(*this, aStart, aLength, + NS_CSTRING_CONTAINER_INIT_DEPEND | + NS_CSTRING_CONTAINER_INIT_SUBSTRING); + } + + nsDependentCSubstring(const abstract_string_type& aStr, + PRUint32 aStartPos) + { + const char* data; + PRUint32 len = NS_CStringGetData(aStr, &data); + NS_CStringContainerInit2(*this, data + aStartPos, len - aStartPos, + NS_CSTRING_CONTAINER_INIT_DEPEND | + NS_CSTRING_CONTAINER_INIT_SUBSTRING); + } + + nsDependentCSubstring(const abstract_string_type& aStr, + PRUint32 aStartPos, PRUint32 aLength) + { + const char* data; +#ifdef DEBUG + PRUint32 len = +#endif + NS_CStringGetData(aStr, &data); + NS_ASSERTION(aStartPos + aLength <= len, "bad length"); + NS_CStringContainerInit2(*this, data + aStartPos, aLength, + NS_CSTRING_CONTAINER_INIT_DEPEND | + NS_CSTRING_CONTAINER_INIT_SUBSTRING); + } + + void Rebind(const char_type *aStart, PRUint32 aLength) + { + NS_CStringContainerFinish(*this); + NS_CStringContainerInit2(*this, aStart, aLength, + NS_CSTRING_CONTAINER_INIT_DEPEND | + NS_CSTRING_CONTAINER_INIT_SUBSTRING); + } + +private: + self_type& operator=(const self_type& aString); // NOT IMPLEMENTED +}; + + +/** + * Various nsDependentC?Substring constructor functions + */ + +// PRUnichar +inline +const nsDependentSubstring +Substring( const nsAString& str, PRUint32 startPos ) +{ + return nsDependentSubstring(str, startPos); +} + +inline +const nsDependentSubstring +Substring( const nsAString& str, PRUint32 startPos, PRUint32 length ) +{ + return nsDependentSubstring(str, startPos, length); +} + +inline +const nsDependentSubstring +Substring( const PRUnichar* start, const PRUnichar* end ) +{ + return nsDependentSubstring(start, end - start); +} + +inline +const nsDependentSubstring +Substring( const PRUnichar* start, PRUint32 length ) +{ + return nsDependentSubstring(start, length); +} + +inline +const nsDependentSubstring +StringHead( const nsAString& str, PRUint32 count ) +{ + return nsDependentSubstring(str, 0, count); +} + +inline +const nsDependentSubstring +StringTail( const nsAString& str, PRUint32 count ) +{ + return nsDependentSubstring(str, str.Length() - count, count); +} + +// char +inline +const nsDependentCSubstring +Substring( const nsACString& str, PRUint32 startPos ) +{ + return nsDependentCSubstring(str, startPos); +} + +inline +const nsDependentCSubstring +Substring( const nsACString& str, PRUint32 startPos, PRUint32 length ) +{ + return nsDependentCSubstring(str, startPos, length); +} + +inline +const nsDependentCSubstring +Substring( const char* start, const char* end ) +{ + return nsDependentCSubstring(start, end - start); +} + +inline +const nsDependentCSubstring +Substring( const char* start, PRUint32 length ) +{ + return nsDependentCSubstring(start, length); +} + +inline +const nsDependentCSubstring +StringHead( const nsACString& str, PRUint32 count ) +{ + return nsDependentCSubstring(str, 0, count); +} + +inline +const nsDependentCSubstring +StringTail( const nsACString& str, PRUint32 count ) +{ + return nsDependentCSubstring(str, str.Length() - count, count); +} + + +/* + * Canonical empty strings + */ + +#define EmptyCString() nsCString() +#define EmptyString() nsString() + +#endif // MOZILLA_INTERNAL_API + +#endif // nsStringAPI_h__ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsTraceRefcnt.h b/Src/nprt_plugin/gecko/1.8/win/include/nsTraceRefcnt.h new file mode 100644 index 00000000..565704cb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsTraceRefcnt.h @@ -0,0 +1,135 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Mozilla Communicator client code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * L. David Baron <dbaron@dbaron.org> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ +#ifndef nsTraceRefcnt_h___ +#define nsTraceRefcnt_h___ + +#include "nscore.h" + +class nsISupports; + +// By default refcnt logging is not part of the build. +#undef NS_BUILD_REFCNT_LOGGING + +#if (defined(DEBUG) || defined(FORCE_BUILD_REFCNT_LOGGING)) +// Make refcnt logging part of the build. This doesn't mean that +// actual logging will occur (that requires a separate enable; see +// nsTraceRefcnt.h for more information). +#define NS_BUILD_REFCNT_LOGGING 1 +#endif + +// If NO_BUILD_REFCNT_LOGGING is defined then disable refcnt logging +// in the build. This overrides FORCE_BUILD_REFCNT_LOGGING. +#if defined(NO_BUILD_REFCNT_LOGGING) +#undef NS_BUILD_REFCNT_LOGGING +#endif + +#ifdef NS_BUILD_REFCNT_LOGGING + +#define NS_LOG_ADDREF(_p, _rc, _type, _size) \ + nsTraceRefcnt::LogAddRef((_p), (_rc), (_type), (PRUint32) (_size)) + +#define NS_LOG_RELEASE(_p, _rc, _type) \ + nsTraceRefcnt::LogRelease((_p), (_rc), (_type)) + +#define MOZ_DECL_CTOR_COUNTER(_type) + +#define MOZ_COUNT_CTOR(_type) \ +PR_BEGIN_MACRO \ + nsTraceRefcnt::LogCtor((void*)this, #_type, sizeof(*this)); \ +PR_END_MACRO + +#define MOZ_COUNT_DTOR(_type) \ +PR_BEGIN_MACRO \ + nsTraceRefcnt::LogDtor((void*)this, #_type, sizeof(*this)); \ +PR_END_MACRO + +#ifdef HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR // from autoconf (XXX needs to be + // set for non-autoconf platforms) + +// nsCOMPtr.h allows these macros to be defined by clients +// These logging functions require dynamic_cast<void *>, so we don't +// define these macros if we don't have dynamic_cast. +#define NSCAP_LOG_ASSIGNMENT(_c, _p) \ + if (_p) \ + nsTraceRefcnt::LogAddCOMPtr((_c),NS_STATIC_CAST(nsISupports*,_p)) + +#define NSCAP_LOG_RELEASE(_c, _p) \ + if (_p) \ + nsTraceRefcnt::LogReleaseCOMPtr((_c), NS_STATIC_CAST(nsISupports*,_p)) + +#endif /* HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR */ + +#else /* !NS_BUILD_REFCNT_LOGGING */ + +#define NS_LOG_ADDREF(_p, _rc, _type, _size) +#define NS_LOG_RELEASE(_p, _rc, _type) +#define MOZ_DECL_CTOR_COUNTER(_type) +#define MOZ_COUNT_CTOR(_type) +#define MOZ_COUNT_DTOR(_type) + +#endif /* NS_BUILD_REFCNT_LOGGING */ + +//---------------------------------------------------------------------- + +/** + * Note: The implementations for these methods are no-ops in a build + * where NS_BUILD_REFCNT_LOGGING is disabled. + */ +class nsTraceRefcnt { +public: + static NS_COM_GLUE void LogAddRef(void* aPtr, + nsrefcnt aNewRefCnt, + const char* aTypeName, + PRUint32 aInstanceSize); + + static NS_COM_GLUE void LogRelease(void* aPtr, + nsrefcnt aNewRefCnt, + const char* aTypeName); + + static NS_COM_GLUE void LogCtor(void* aPtr, const char* aTypeName, + PRUint32 aInstanceSize); + + static NS_COM_GLUE void LogDtor(void* aPtr, const char* aTypeName, + PRUint32 aInstanceSize); + + static NS_COM_GLUE void LogAddCOMPtr(void *aCOMPtr, nsISupports *aObject); + + static NS_COM_GLUE void LogReleaseCOMPtr(void *aCOMPtr, nsISupports *aObject); + +}; +#endif /* nsTraceRefcnt_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsVersionComparator.h b/Src/nprt_plugin/gecko/1.8/win/include/nsVersionComparator.h new file mode 100644 index 00000000..9d8c0186 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsVersionComparator.h @@ -0,0 +1,51 @@ +/* ***** 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 Mozilla XPCOM. + * + * The Initial Developer of the Original Code is + * Benjamin Smedberg <benjamin@smedbergs.us>. + * + * Portions created by the Initial Developer are Copyright (C) 2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nsVersionComparator_h__ +#define nsVersionComparator_h__ + +#include "nscore.h" + +/** + * Compare two version strings. + * + * @see nsIVersionComparator + */ +PRInt32 NS_COM_GLUE +NS_CompareVersions(const char *A, const char *B); + +#endif // nsVersionComparator_h__ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsWeakReference.h b/Src/nprt_plugin/gecko/1.8/win/include/nsWeakReference.h new file mode 100644 index 00000000..92476ea2 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsWeakReference.h @@ -0,0 +1,147 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** 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 browser. + * + * The Initial Developer of the Original Code is + * Netscape Communications, Inc. + * Portions created by the Initial Developer are Copyright (C) 1999 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Scott Collins <scc@netscape.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsWeakReference_h__ +#define nsWeakReference_h__ + +// nsWeakReference.h + +#include "nsIWeakReference.h" +#include "nsIWeakReferenceUtils.h" + +class nsWeakReference; + +#undef IMETHOD_VISIBILITY +#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT + +class NS_COM_GLUE nsSupportsWeakReference : public nsISupportsWeakReference + { + public: + nsSupportsWeakReference() + : mProxy(0) + { + // nothing else to do here + } + + NS_DECL_NSISUPPORTSWEAKREFERENCE + + protected: + inline ~nsSupportsWeakReference(); + + private: + friend class nsWeakReference; + + void + NoticeProxyDestruction() + // ...called (only) by an |nsWeakReference| from _its_ dtor. + { + mProxy = 0; + } + + nsWeakReference* mProxy; + + protected: + + inline void ClearWeakReferences(); + PRBool HasWeakReferences() const {return mProxy != 0;} + }; + +#undef IMETHOD_VISIBILITY +#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN + +class NS_COM_GLUE nsWeakReference : public nsIWeakReference + { + public: + // nsISupports... + NS_DECL_ISUPPORTS + + // nsIWeakReference... + NS_DECL_NSIWEAKREFERENCE + + private: + friend class nsSupportsWeakReference; + + nsWeakReference( nsSupportsWeakReference* referent ) + : mReferent(referent) + // ...I can only be constructed by an |nsSupportsWeakReference| + { + // nothing else to do here + } + + ~nsWeakReference() + // ...I will only be destroyed by calling |delete| myself. + { + if ( mReferent ) + mReferent->NoticeProxyDestruction(); + } + + void + NoticeReferentDestruction() + // ...called (only) by an |nsSupportsWeakReference| from _its_ dtor. + { + mReferent = 0; + } + + nsSupportsWeakReference* mReferent; + }; + +inline +void +nsSupportsWeakReference::ClearWeakReferences() + /* + Usually being called from |nsSupportsWeakReference::~nsSupportsWeakReference| + will be good enough, but you may have a case where you need to call disconnect + your weak references in an outer destructor (to prevent some client holding a + weak reference from re-entering your destructor). + */ + { + if ( mProxy ) + { + mProxy->NoticeReferentDestruction(); + mProxy = 0; + } + } + +inline +nsSupportsWeakReference::~nsSupportsWeakReference() + { + ClearWeakReferences(); + } + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOM.h b/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOM.h new file mode 100644 index 00000000..47223e92 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOM.h @@ -0,0 +1,421 @@ +/* -*- Mode: C++; tab-width: 8; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Benjamin Smedberg <benjamin@smedbergs.us> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsXPCOM_h__ +#define nsXPCOM_h__ + +// Map frozen functions to private symbol names if not using strict API. +#ifdef MOZILLA_INTERNAL_API +# define NS_InitXPCOM2 NS_InitXPCOM2_P +# define NS_InitXPCOM3 NS_InitXPCOM3_P +# define NS_ShutdownXPCOM NS_ShutdownXPCOM_P +# define NS_GetServiceManager NS_GetServiceManager_P +# define NS_GetComponentManager NS_GetComponentManager_P +# define NS_GetComponentRegistrar NS_GetComponentRegistrar_P +# define NS_GetMemoryManager NS_GetMemoryManager_P +# define NS_NewLocalFile NS_NewLocalFile_P +# define NS_NewNativeLocalFile NS_NewNativeLocalFile_P +# define NS_GetDebug NS_GetDebug_P +# define NS_GetTraceRefcnt NS_GetTraceRefcnt_P +# define NS_Alloc NS_Alloc_P +# define NS_Realloc NS_Realloc_P +# define NS_Free NS_Free_P +#endif + +#include "nscore.h" +#include "nsXPCOMCID.h" + +class nsAString; +class nsACString; + +class nsIModule; +class nsIComponentManager; +class nsIComponentRegistrar; +class nsIServiceManager; +class nsIFile; +class nsILocalFile; +class nsIDirectoryServiceProvider; +class nsIMemory; +class nsIDebug; +class nsITraceRefcnt; + +/** + * Every XPCOM component implements this function signature, which is the + * only entrypoint XPCOM uses to the function. + * + * @status FROZEN + */ +typedef nsresult (PR_CALLBACK *nsGetModuleProc)(nsIComponentManager *aCompMgr, + nsIFile* location, + nsIModule** return_cobj); + +/** + * Initialises XPCOM. You must call one of the NS_InitXPCOM methods + * before proceeding to use xpcom. The one exception is that you may + * call NS_NewLocalFile to create a nsIFile. + * + * @status FROZEN + * + * @note Use <CODE>NS_NewLocalFile</CODE> or <CODE>NS_NewNativeLocalFile</CODE> + * to create the file object you supply as the bin directory path in this + * call. The function may be safely called before the rest of XPCOM or + * embedding has been initialised. + * + * @param result The service manager. You may pass null. + * + * @param binDirectory The directory containing the component + * registry and runtime libraries; + * or use <CODE>nsnull</CODE> to use the working + * directory. + * + * @param appFileLocationProvider The object to be used by Gecko that specifies + * to Gecko where to find profiles, the component + * registry preferences and so on; or use + * <CODE>nsnull</CODE> for the default behaviour. + * + * @see NS_NewLocalFile + * @see nsILocalFile + * @see nsIDirectoryServiceProvider + * + * @return NS_OK for success; + * NS_ERROR_NOT_INITIALIZED if static globals were not initialized, + * which can happen if XPCOM is reloaded, but did not completly + * shutdown. Other error codes indicate a failure during + * initialisation. + */ +extern "C" NS_COM nsresult +NS_InitXPCOM2(nsIServiceManager* *result, + nsIFile* binDirectory, + nsIDirectoryServiceProvider* appFileLocationProvider); + +/** + * Some clients of XPCOM have statically linked components (not dynamically + * loaded component DLLs), which can be passed to NS_InitXPCOM3 using this + * structure. + * + * @status FROZEN + */ +struct nsStaticModuleInfo { + const char *name; + nsGetModuleProc getModule; +}; + +/** + * Initialises XPCOM with static components. You must call one of the + * NS_InitXPCOM methods before proceeding to use xpcom. The one + * exception is that you may call NS_NewLocalFile to create a nsIFile. + * + * @status FROZEN + * + * @note Use <CODE>NS_NewLocalFile</CODE> or <CODE>NS_NewNativeLocalFile</CODE> + * to create the file object you supply as the bin directory path in this + * call. The function may be safely called before the rest of XPCOM or + * embedding has been initialised. + * + * @param result The service manager. You may pass null. + * + * @param binDirectory The directory containing the component + * registry and runtime libraries; + * or use <CODE>nsnull</CODE> to use the working + * directory. + * + * @param appFileLocationProvider The object to be used by Gecko that specifies + * to Gecko where to find profiles, the component + * registry preferences and so on; or use + * <CODE>nsnull</CODE> for the default behaviour. + * + * @param staticComponents An array of static components. Passing null causes + * default (builtin) components to be registered, if + * present. + * @param componentCount Number of elements in staticComponents + * + * @see NS_NewLocalFile + * @see nsILocalFile + * @see nsIDirectoryServiceProvider + * @see XRE_GetStaticComponents + * + * @return NS_OK for success; + * NS_ERROR_NOT_INITIALIZED if static globals were not initialized, + * which can happen if XPCOM is reloaded, but did not completly + * shutdown. Other error codes indicate a failure during + * initialisation. + */ +extern "C" NS_COM nsresult +NS_InitXPCOM3(nsIServiceManager* *result, + nsIFile* binDirectory, + nsIDirectoryServiceProvider* appFileLocationProvider, + nsStaticModuleInfo const *staticComponents, + PRUint32 componentCount); + +/** + * Shutdown XPCOM. You must call this method after you are finished + * using xpcom. + * + * @status FROZEN + * + * @param servMgr The service manager which was returned by NS_InitXPCOM. + * This will release servMgr. You may pass null. + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_ShutdownXPCOM(nsIServiceManager* servMgr); + + +/** + * Public Method to access to the service manager. + * + * @status FROZEN + * @param result Interface pointer to the service manager + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_GetServiceManager(nsIServiceManager* *result); + +/** + * Public Method to access to the component manager. + * + * @status FROZEN + * @param result Interface pointer to the service + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_GetComponentManager(nsIComponentManager* *result); + +/** + * Public Method to access to the component registration manager. + * + * @status FROZEN + * @param result Interface pointer to the service + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_GetComponentRegistrar(nsIComponentRegistrar* *result); + +/** + * Public Method to access to the memory manager. See nsIMemory + * + * @status FROZEN + * @param result Interface pointer to the memory manager + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_GetMemoryManager(nsIMemory* *result); + +/** + * Public Method to create an instance of a nsILocalFile. This function + * may be called prior to NS_InitXPCOM. + * + * @status FROZEN + * + * @param path + * A string which specifies a full file path to a + * location. Relative paths will be treated as an + * error (NS_ERROR_FILE_UNRECOGNIZED_PATH). + * |NS_NewNativeLocalFile|'s path must be in the + * filesystem charset. + * @param followLinks + * This attribute will determine if the nsLocalFile will auto + * resolve symbolic links. By default, this value will be false + * on all non unix systems. On unix, this attribute is effectively + * a noop. + * @param result Interface pointer to a new instance of an nsILocalFile + * + * @return NS_OK for success; + * other error codes indicate a failure. + */ + +extern "C" NS_COM nsresult +NS_NewLocalFile(const nsAString &path, + PRBool followLinks, + nsILocalFile* *result); + +extern "C" NS_COM nsresult +NS_NewNativeLocalFile(const nsACString &path, + PRBool followLinks, + nsILocalFile* *result); + +/** + * 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. + * + * @status FROZEN + * + * @param size The size of the block to allocate + * @result The block of memory + * @note This function is thread-safe. + */ +extern "C" NS_COM void* +NS_Alloc(PRSize size); + +/** + * Reallocates a block of memory to a new size. + * + * @status FROZEN + * + * @param ptr The block of memory to reallocate. This block must originally + have been allocated by NS_Alloc or NS_Realloc + * @param size The new size. If 0, frees the block like NS_Free + * @result The reallocated block of memory + * @note This function is thread-safe. + * + * If ptr is null, this function behaves like NS_Alloc. + * 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 is returned. If the + * allocation fails, ptr is not freed and null is returned. The returned + * value may be the same as ptr. + */ +extern "C" NS_COM void* +NS_Realloc(void* ptr, PRSize size); + +/** + * Frees a block of memory. Null is a permissible value, in which case no + * action is taken. + * + * @status FROZEN + * + * @param ptr The block of memory to free. This block must originally have + * been allocated by NS_Alloc or NS_Realloc + * @note This function is thread-safe. + */ +extern "C" NS_COM void +NS_Free(void* ptr); + + +/** + * Categories (in the category manager service) used by XPCOM: + */ + +/** + * A category which is read after component registration but before + * the "xpcom-startup" notifications. Each category entry is treated + * as the contract ID of a service which implements + * nsIDirectoryServiceProvider. Each directory service provider is + * installed in the global directory service. + * + * @status FROZEN + */ +#define XPCOM_DIRECTORY_PROVIDER_CATEGORY "xpcom-directory-providers" + +/** + * A category which is read after component registration but before + * NS_InitXPCOM returns. Each category entry is treated as the contractID of + * a service: each service is instantiated, and if it implements nsIObserver + * the nsIObserver.observe method is called with the "xpcom-startup" topic. + * + * @status FROZEN + */ +#define NS_XPCOM_STARTUP_CATEGORY "xpcom-startup" + + +/** + * Observer topics (in the observer service) used by XPCOM: + */ + +/** + * At XPCOM startup after component registration is complete, the + * following topic is notified. In order to receive this notification, + * component must register their contract ID in the category manager, + * + * @see NS_XPCOM_STARTUP_CATEGORY + * @status FROZEN + */ +#define NS_XPCOM_STARTUP_OBSERVER_ID "xpcom-startup" + +/** + * At XPCOM shutdown, this topic is notified. All components must + * release any interface references to objects in other modules when + * this topic is notified. + * + * @status FROZEN + */ +#define NS_XPCOM_SHUTDOWN_OBSERVER_ID "xpcom-shutdown" + +/** + * This topic is notified when an entry was added to a category in the + * category manager. The subject of the notification will be the name of + * the added entry as an nsISupportsCString, and the data will be the + * name of the category. + * + * @status FROZEN + */ +#define NS_XPCOM_CATEGORY_ENTRY_ADDED_OBSERVER_ID \ + "xpcom-category-entry-added" + +/** + * This topic is notified when an entry was removed from a category in the + * category manager. The subject of the notification will be the name of + * the removed entry as an nsISupportsCString, and the data will be the + * name of the category. + * + * @status FROZEN + */ +#define NS_XPCOM_CATEGORY_ENTRY_REMOVED_OBSERVER_ID \ + "xpcom-category-entry-removed" + +/** + * This topic is notified when an a category was cleared in the category + * manager. The subject of the notification will be the category manager, + * and the data will be the name of the cleared category. + * + * @status FROZEN + */ +#define NS_XPCOM_CATEGORY_CLEARED_OBSERVER_ID "xpcom-category-cleared" + +extern "C" NS_COM nsresult +NS_GetDebug(nsIDebug* *result); + +extern "C" NS_COM nsresult +NS_GetTraceRefcnt(nsITraceRefcnt* *result); + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOMCID.h b/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOMCID.h new file mode 100644 index 00000000..4920322c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOMCID.h @@ -0,0 +1,184 @@ +/* -*- Mode: C++; tab-width: 8; 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsXPCOMCID_h__ +#define nsXPCOMCID_h__ + +/** + * XPCOM Directory Service Contract ID + * The directory service provides ways to obtain file system locations. The + * directory service is a singleton. + * + * This contract supports the nsIDirectoryService and the nsIProperties + * interfaces. + * + */ +#define NS_DIRECTORY_SERVICE_CONTRACTID "@mozilla.org/file/directory_service;1" + +/** + * XPCOM File + * The file abstraction provides ways to obtain and access files and + * directories located on the local system. + * + * This contract supports the nsIFile interface and the nsILocalFile interface. + * This contract may also support platform specific interfaces such as + * nsILocalFileMac on platforms where additional interfaces are required. + * + */ +#define NS_LOCAL_FILE_CONTRACTID "@mozilla.org/file/local;1" + +/** + * XPCOM Category Manager Contract ID + * The contract supports the nsICategoryManager interface. The + * category manager is a singleton. + * The "enumerateCategory" method of nsICategoryManager will return an object + * that implements nsIUTF8StringEnumerator. In addition, the enumerator will + * return the entries in sorted order (sorted by byte comparison). + */ +#define NS_CATEGORYMANAGER_CONTRACTID "@mozilla.org/categorymanager;1" + +/** + * XPCOM Properties Object Contract ID + * Simple mapping object which supports the nsIProperties interface. + */ +#define NS_PROPERTIES_CONTRACTID "@mozilla.org/properties;1" + +/** + * XPCOM Array Object ContractID + * Simple array implementation which supports the nsIArray and + * nsIMutableArray interfaces. + */ +#define NS_ARRAY_CONTRACTID "@mozilla.org/array;1" + +/** + * The following are the CIDs and Contract IDs of the nsISupports wrappers for + * primative types. + */ +#define NS_SUPPORTS_ID_CID \ +{ 0xacf8dc40, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_ID_CONTRACTID "@mozilla.org/supports-id;1" + +#define NS_SUPPORTS_CSTRING_CID \ +{ 0xacf8dc41, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_CSTRING_CONTRACTID "@mozilla.org/supports-cstring;1" + +#define NS_SUPPORTS_STRING_CID \ +{ 0xacf8dc42, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_STRING_CONTRACTID "@mozilla.org/supports-string;1" + +#define NS_SUPPORTS_PRBOOL_CID \ +{ 0xacf8dc43, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRBOOL_CONTRACTID "@mozilla.org/supports-PRBool;1" + +#define NS_SUPPORTS_PRUINT8_CID \ +{ 0xacf8dc44, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRUINT8_CONTRACTID "@mozilla.org/supports-PRUint8;1" + +#define NS_SUPPORTS_PRUINT16_CID \ +{ 0xacf8dc46, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRUINT16_CONTRACTID "@mozilla.org/supports-PRUint16;1" + +#define NS_SUPPORTS_PRUINT32_CID \ +{ 0xacf8dc47, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRUINT32_CONTRACTID "@mozilla.org/supports-PRUint32;1" + +#define NS_SUPPORTS_PRUINT64_CID \ +{ 0xacf8dc48, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRUINT64_CONTRACTID "@mozilla.org/supports-PRUint64;1" + +#define NS_SUPPORTS_PRTIME_CID \ +{ 0xacf8dc49, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRTIME_CONTRACTID "@mozilla.org/supports-PRTime;1" + +#define NS_SUPPORTS_CHAR_CID \ +{ 0xacf8dc4a, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_CHAR_CONTRACTID "@mozilla.org/supports-char;1" + +#define NS_SUPPORTS_PRINT16_CID \ +{ 0xacf8dc4b, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRINT16_CONTRACTID "@mozilla.org/supports-PRInt16;1" + +#define NS_SUPPORTS_PRINT32_CID \ +{ 0xacf8dc4c, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRINT32_CONTRACTID "@mozilla.org/supports-PRInt32;1" + +#define NS_SUPPORTS_PRINT64_CID \ +{ 0xacf8dc4d, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRINT64_CONTRACTID "@mozilla.org/supports-PRInt64;1" + +#define NS_SUPPORTS_FLOAT_CID \ +{ 0xcbf86870, 0x4ac0, 0x11d3, \ +{ 0xba, 0xea, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } } +#define NS_SUPPORTS_FLOAT_CONTRACTID "@mozilla.org/supports-float;1" + +#define NS_SUPPORTS_DOUBLE_CID \ +{ 0xcbf86871, 0x4ac0, 0x11d3, \ +{ 0xba, 0xea, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } } +#define NS_SUPPORTS_DOUBLE_CONTRACTID "@mozilla.org/supports-double;1" + +#define NS_SUPPORTS_VOID_CID \ +{ 0xaf10f3e0, 0x568d, 0x11d3, \ +{ 0xba, 0xf8, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } } +#define NS_SUPPORTS_VOID_CONTRACTID "@mozilla.org/supports-void;1" + +#define NS_SUPPORTS_INTERFACE_POINTER_CID \ +{ 0xA99FEBBA, 0x1DD1, 0x11B2, \ +{ 0xA9, 0x43, 0xB0, 0x23, 0x34, 0xA6, 0xD0, 0x83 } } +#define NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID "@mozilla.org/supports-interface-pointer;1" + +/** + * nsHashPropertyBag impl of nsIWritablePropertyBag + */ +#define NS_HASH_PROPERTY_BAG_CID \ +{ 0x678c50b8, 0x6bcb, 0x4ad0, \ +{ 0xb9, 0xb8, 0xc8, 0x11, 0x75, 0x95, 0x51, 0x99 } } +#define NS_HASH_PROPERTY_BAG_CONTRACTID "@mozilla.org/hash-property-bag;1" + +#endif diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOMGlue.h b/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOMGlue.h new file mode 100644 index 00000000..245ead42 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsXPCOMGlue.h @@ -0,0 +1,153 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Benjamin Smedberg <benjamin@smedbergs.us> + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ + +#ifndef nsXPCOMGlue_h__ +#define nsXPCOMGlue_h__ + +#include "nscore.h" + +class nsILocalFile; + +/** + * The following function is available in both the standalone and + * dynamically linked versions of the glue. + */ + +struct GREVersionRange { + const char *lower; + PRBool lowerInclusive; + const char *upper; + PRBool upperInclusive; +}; + +struct GREProperty { + const char *property; + const char *value; +}; + +/** + * Locate the path of the xpcom shared library from a GRE with specified + * properties. + * + * @param versions An array of version ranges: if any version range + * matches, the GRE is considered acceptable. + * @param versionsLength The length of the versions array. + * @param properties A null-terminated list of GRE property/value pairs + * which must all be satisfied. + * @param propertiesLength Length of the properties array. + * @param buffer A buffer to be filled with the appropriate path. If + * the "local" GRE is specified (via the USE_LOCAL_GRE + * environment variable, for example), this buffer + * will be set to the empty string. + * @param buflen The length of buffer. This must be at least + * PATH_MAX/MAXPATHLEN. + * @throws NS_ERROR_FAILURE if an appropriate GRE could not be found. + * @note The properties parameter is ignored on macintosh, because of the + * manner in which the XUL frameworks are installed by version. + * @note Currently this uses a "first-fit" algorithm, it does not select + * the newest available GRE. + */ +extern "C" NS_COM_GLUE nsresult +GRE_GetGREPathWithProperties(const GREVersionRange *versions, + PRUint32 versionsLength, + const GREProperty *properties, + PRUint32 propertiesLength, + char *buffer, PRUint32 buflen); + +#ifdef XPCOM_GLUE + +/** + * The following functions are only available in the standalone glue. + */ + +/** + * Initialize the XPCOM glue by dynamically linking against the XPCOM + * shared library indicated by xpcomFile. + */ +extern "C" NS_HIDDEN_(nsresult) +XPCOMGlueStartup(const char* xpcomFile); + + +/** + * Finish the XPCOM glue after it is no longer needed. + */ +extern "C" NS_HIDDEN_(nsresult) +XPCOMGlueShutdown(); + + +/** + * Locate the path of the XPCOM shared library of a compatible GRE. + * The result of this function is normally passed directly to + * XPCOMGlueStartup. This looks for the GRE version in + * nsBuildID.h, which is generated at build time. Unless you set + * MOZ_MILESTONE_RELEASE this will probably not be a useful GRE version string. + * + * @return string buffer pointing to the XPCOM DLL path. Callers do + * not need to free this buffer. + * @status DEPRECATED - Use GRE_GetGREPathWithProperties + */ +extern "C" NS_HIDDEN_(char const *) +GRE_GetXPCOMPath(); + + +/** + * Locate the directory of a compatible GRE as an nsIFile + * + * @param _retval Ordinary XPCOM getter, returns an addrefed interface. + */ +extern "C" NS_HIDDEN_(nsresult) +GRE_GetGREDirectory(nsILocalFile* *_retval); + + +/** + * Embedding applications which don't need a custom + * directoryserviceprovider may use GRE_Startup to start the XPCOM + * glue and initialize the GRE in one step. + */ +extern "C" NS_HIDDEN_(nsresult) +GRE_Startup(); + + +/** + * Shut down XPCOM and the XPCOM glue in one step. + */ +extern "C" NS_HIDDEN_(nsresult) +GRE_Shutdown(); + +#endif // XPCOM_GLUE +#endif // nsXPCOMGlue_h__ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nscore.h b/Src/nprt_plugin/gecko/1.8/win/include/nscore.h new file mode 100644 index 00000000..e595c833 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nscore.h @@ -0,0 +1,455 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of 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 ***** */ +#ifndef nscore_h___ +#define nscore_h___ + +/** + * Make sure that we have the proper platform specific + * c++ definitions needed by nscore.h + */ +#ifndef _XPCOM_CONFIG_H_ +#include "xpcom-config.h" +#endif + +/** + * Incorporate the core NSPR data types which XPCOM uses. + */ +#include "prtypes.h" + +/* Core XPCOM declarations. */ + +/** + * Macros defining the target platform... + */ +#ifdef _WIN32 +#define NS_WIN32 1 + +#elif defined(__unix) +#define NS_UNIX 1 + +#elif defined(XP_OS2) +#define NS_OS2 1 +#endif +/*----------------------------------------------------------------------*/ +/* Import/export defines */ + +/** + * Using the visibility("hidden") attribute allows the compiler to use + * PC-relative addressing to call this function. If a function does not + * access any global data, and does not call any methods which are not either + * file-local or hidden, then on ELF systems we avoid loading the address of + * the PLT into a register at the start of the function, which reduces code + * size and frees up a register for general use. + * + * As a general rule, this should be used for any non-exported symbol + * (including virtual method implementations). NS_IMETHOD uses this by + * default; if you need to have your NS_IMETHOD functions exported, you can + * wrap your class as follows: + * + * #undef IMETHOD_VISIBILITY + * #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT + * + * class Foo { + * ... + * }; + * + * #undef IMETHOD_VISIBILITY + * #define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN + * + * Don't forget to change the visibility back to hidden before the end + * of a header! + * + * Other examples: + * + * NS_HIDDEN_(int) someMethod(); + * SomeCtor() NS_HIDDEN; + */ + +#ifdef HAVE_VISIBILITY_HIDDEN_ATTRIBUTE +#define NS_VISIBILITY_HIDDEN __attribute__ ((visibility ("hidden"))) +#else +#define NS_VISIBILITY_HIDDEN +#endif + +#if defined(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE) && defined(HAVE_VISIBILITY_PRAGMA) +#define NS_VISIBILITY_DEFAULT __attribute__ ((visibility ("default"))) +#else +#define NS_VISIBILITY_DEFAULT +#endif + +#define NS_HIDDEN_(type) NS_VISIBILITY_HIDDEN type +#define NS_EXTERNAL_VIS_(type) NS_VISIBILITY_DEFAULT type + +#define NS_HIDDEN NS_VISIBILITY_HIDDEN +#define NS_EXTERNAL_VIS NS_VISIBILITY_DEFAULT + +#undef IMETHOD_VISIBILITY +#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN + +/** + * Mark a function as using a potentially non-standard function calling + * convention. This can be used on functions that are called very + * frequently, to reduce the overhead of the function call. It is still worth + * using the macro for C++ functions which take no parameters since it allows + * passing |this| in a register. + * + * - Do not use this on any scriptable interface method since xptcall won't be + * aware of the different calling convention. + * - This must appear on the declaration, not the definition. + * - Adding this to a public function _will_ break binary compatibility. + * - This may be used on virtual functions but you must ensure it is applied + * to all implementations - the compiler will _not_ warn but it will crash. + * - This has no effect for inline functions or functions which take a + * variable number of arguments. + * + * Examples: int NS_FASTCALL func1(char *foo); + * NS_HIDDEN_(int) NS_FASTCALL func2(char *foo); + */ + +#if defined(__i386__) && defined(__GNUC__) && (__GNUC__ >= 3) && !defined(XP_OS2) && !defined(XP_MACOSX) +#define NS_FASTCALL __attribute__ ((regparm (3), stdcall)) +#else +#define NS_FASTCALL +#endif + +/* + * NS_DEFCALL undoes the effect of a global regparm/stdcall setting + * so that xptcall works correctly. + */ +#if defined(__i386__) && defined(__GNUC__) && (__GNUC__ >= 3) && !defined(XP_OS2) && !defined(XP_MACOSX) +#define NS_DEFCALL __attribute__ ((regparm (0), cdecl)) +#else +#define NS_DEFCALL +#endif + +#ifdef NS_WIN32 + +#define NS_IMPORT __declspec(dllimport) +#define NS_IMPORT_(type) type __declspec(dllimport) __stdcall +#define NS_EXPORT __declspec(dllexport) +#define NS_EXPORT_(type) type __declspec(dllexport) __stdcall +#define NS_IMETHOD_(type) virtual type __stdcall +#define NS_IMETHODIMP_(type) type __stdcall +#define NS_METHOD_(type) type __stdcall +#define NS_CALLBACK_(_type, _name) _type (__stdcall * _name) +#define NS_STDCALL __stdcall + +/* + These are needed to mark static members in exported classes, due to + gcc bug XXX insert bug# here. + */ + +#define NS_EXPORT_STATIC_MEMBER_(type) type +#define NS_IMPORT_STATIC_MEMBER_(type) type + +#else + +#define NS_IMPORT NS_EXTERNAL_VIS +#define NS_IMPORT_(type) NS_EXTERNAL_VIS_(type) +#define NS_EXPORT NS_EXTERNAL_VIS +#define NS_EXPORT_(type) NS_EXTERNAL_VIS_(type) +#define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type NS_DEFCALL +#define NS_IMETHODIMP_(type) type +#define NS_METHOD_(type) type +#define NS_CALLBACK_(_type, _name) _type (* _name) +#define NS_STDCALL +#define NS_EXPORT_STATIC_MEMBER_(type) NS_EXTERNAL_VIS_(type) +#define NS_IMPORT_STATIC_MEMBER_(type) NS_EXTERNAL_VIS_(type) + +#endif + +/** + * Macro for creating typedefs for pointer-to-member types which are + * declared with stdcall. It is important to use this for any type which is + * declared as stdcall (i.e. NS_IMETHOD). For example, instead of writing: + * + * typedef nsresult (nsIFoo::*someType)(nsISupports* arg); + * + * you should write: + * + * typedef + * NS_STDCALL_FUNCPROTO(nsresult, someType, nsIFoo, typeFunc, (nsISupports*)); + * + * where nsIFoo::typeFunc is any method declared as + * NS_IMETHOD typeFunc(nsISupports*); + * + * XXX this can be simplified to always use the non-typeof implementation + * when http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11893 is fixed. + */ + +#ifdef __GNUC__ +#define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \ + typeof(&class::func) name +#else +#define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \ + ret (NS_STDCALL class::*name) args +#endif + +/** + * Generic API modifiers which return the standard XPCOM nsresult type + */ +#define NS_IMETHOD NS_IMETHOD_(nsresult) +#define NS_IMETHODIMP NS_IMETHODIMP_(nsresult) +#define NS_METHOD NS_METHOD_(nsresult) +#define NS_CALLBACK(_name) NS_CALLBACK_(nsresult, _name) + +/** + * Import/Export macros for XPCOM APIs + */ + +#ifdef _IMPL_NS_COM +#define NS_COM NS_EXPORT +#elif _IMPL_NS_COM_OFF +#define NS_COM +#elif XPCOM_GLUE +#define NS_COM +#else +#define NS_COM NS_IMPORT +#endif + +#ifdef MOZILLA_INTERNAL_API +# define NS_COM_GLUE NS_COM + /* + The frozen string API has different definitions of nsAC?String + classes than the internal API. On systems that explicitly declare + dllexport symbols this is not a problem, but on ELF systems + internal symbols can accidentally "shine through"; we rename the + internal classes to avoid symbol conflicts. + */ +# define nsAString nsAString_internal +# define nsACString nsACString_internal +#else +# define NS_COM_GLUE +#endif + + +/** + * NS_NO_VTABLE is emitted by xpidl in interface declarations whenever + * xpidl can determine that the interface can't contain a constructor. + * This results in some space savings and possible runtime savings - + * see bug 49416. We undefine it first, as xpidl-generated headers + * define it for IDL uses that don't include this file. + */ +#ifdef NS_NO_VTABLE +#undef NS_NO_VTABLE +#endif +#if defined(_MSC_VER) && _MSC_VER >= 1100 +#define NS_NO_VTABLE __declspec(novtable) +#else +#define NS_NO_VTABLE +#endif + + +/** + * Generic XPCOM result data type + */ +typedef PRUint32 nsresult; + +/** + * The preferred symbol for null. + */ +#define nsnull 0 + +#include "nsError.h" + +/* ------------------------------------------------------------------------ */ +/* Casting macros for hiding C++ features from older compilers */ + + /* + All our compiler support template specialization, but not all support the + |template <>| notation. The compiler that don't understand this notation + just omit it for specialization. + + Need to add an autoconf test for this. + */ + + /* under Metrowerks (Mac), we don't have autoconf yet */ +#ifdef __MWERKS__ + #define HAVE_CPP_PARTIAL_SPECIALIZATION + #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX + + #define HAVE_CPP_ACCESS_CHANGING_USING + #define HAVE_CPP_AMBIGUITY_RESOLVING_USING + #define HAVE_CPP_EXPLICIT + #define HAVE_CPP_TYPENAME + #define HAVE_CPP_BOOL + #define HAVE_CPP_NAMESPACE_STD + #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL + #define HAVE_CPP_2BYTE_WCHAR_T +#endif + + /* under VC++ (Windows), we don't have autoconf yet */ +#if defined(_MSC_VER) && (_MSC_VER>=1100) + /* VC++ 5.0 and greater implement template specialization, 4.2 is unknown */ + #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX + + #define HAVE_CPP_EXPLICIT + #define HAVE_CPP_TYPENAME + #define HAVE_CPP_ACCESS_CHANGING_USING + + #if (_MSC_VER==1100) + /* VC++5.0 has an internal compiler error (sometimes) without this */ + #undef HAVE_CPP_ACCESS_CHANGING_USING + #endif + + #define HAVE_CPP_NAMESPACE_STD + #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL + #define HAVE_CPP_2BYTE_WCHAR_T +#endif + +#ifndef __PRUNICHAR__ +#define __PRUNICHAR__ + /* For now, don't use wchar_t on Unix because it breaks the Netscape + * commercial build. When this is fixed there will be no need for the + * |NS_REINTERPRET_CAST| in nsLiteralString.h either. + */ + #if defined(HAVE_CPP_2BYTE_WCHAR_T) && defined(NS_WIN32) + typedef wchar_t PRUnichar; + #else + typedef PRUint16 PRUnichar; + #endif +#endif + + /* + If the compiler doesn't support |explicit|, we'll just make it go away, trusting + that the builds under compilers that do have it will keep us on the straight and narrow. + */ +#ifndef HAVE_CPP_EXPLICIT + #define explicit +#endif + +#ifndef HAVE_CPP_TYPENAME + #define typename +#endif + +#ifdef HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX + #define NS_SPECIALIZE_TEMPLATE template <> +#else + #define NS_SPECIALIZE_TEMPLATE +#endif + +/* unix and beos now determine this automatically */ +#if ! defined XP_UNIX && ! defined XP_BEOS && !defined(XP_OS2) +#ifndef HAVE_CPP_NEW_CASTS +#define HAVE_CPP_NEW_CASTS 1 /* we'll be optimistic. */ +#endif +#endif + +#if defined(HAVE_CPP_NEW_CASTS) +#define NS_STATIC_CAST(__type, __ptr) static_cast< __type >(__ptr) +#define NS_CONST_CAST(__type, __ptr) const_cast< __type >(__ptr) + +#define NS_REINTERPRET_POINTER_CAST(__type, __ptr) reinterpret_cast< __type >(__ptr) +#define NS_REINTERPRET_NONPOINTER_CAST(__type, __obj) reinterpret_cast< __type >(__obj) +#define NS_REINTERPRET_CAST(__type, __expr) reinterpret_cast< __type >(__expr) + +#else +#define NS_STATIC_CAST(__type, __ptr) ((__type)(__ptr)) +#define NS_CONST_CAST(__type, __ptr) ((__type)(__ptr)) + +#define NS_REINTERPRET_POINTER_CAST(__type, __ptr) ((__type)((void*)(__ptr))) +#define NS_REINTERPRET_NONPOINTER_CAST(__type, __obj) ((__type)(__obj)) + + /* Note: the following is only appropriate for pointers. */ +#define NS_REINTERPRET_CAST(__type, __expr) NS_REINTERPRET_POINTER_CAST(__type, __expr) + /* + Why cast to a |void*| first? Well, when old-style casting from + a pointer to a base to a pointer to a derived class, the cast will be + ambiguous if the source pointer type appears multiple times in the + destination, e.g., + + class Base {}; + class Derived : public Base, public Base {}; + + void foo( Base* b ) + { + ((Derived*)b)->some_derived_member ... // Error: Ambiguous, expand from which |Base|? + } + + an old-style cast (like |static_cast|) will change the pointer, but + here, doesn't know how. The cast to |void*| prevents it from thinking + it needs to expand the original pointer. + + The cost is, |NS_REINTERPRET_CAST| is no longer appropriate for non-pointer + conversions. Also, mis-applying |NS_REINTERPRET_CAST| to cast |this| to something + will still expand the pointer to the outer object in standards complying compilers. + */ + + /* + No sense in making an NS_DYNAMIC_CAST() macro: you can't duplicate + the semantics. So if you want to dynamic_cast, then just use it + "straight", no macro. + */ +#endif + +/* + * Use these macros to do 64bit safe pointer conversions. + */ + +#define NS_PTR_TO_INT32(x) ((PRInt32) (PRWord) (x)) +#define NS_PTR_TO_UINT32(x) ((PRUint32) (PRWord) (x)) +#define NS_INT32_TO_PTR(x) ((void *) (PRWord) (x)) + +/* + * Use NS_STRINGIFY to form a string literal from the value of a macro. + */ +#define NS_STRINGIFY_HELPER(x_) #x_ +#define NS_STRINGIFY(x_) NS_STRINGIFY_HELPER(x_) + +/* + * These macros allow you to give a hint to the compiler about branch + * probability so that it can better optimize. Use them like this: + * + * if (NS_LIKELY(v == 1)) { + * ... expected code path ... + * } + * + * if (NS_UNLIKELY(v == 0)) { + * ... non-expected code path ... + * } + * + */ + +#if defined(__GNUC__) && (__GNUC__ > 2) +#define NS_LIKELY(x) (__builtin_expect((x), 1)) +#define NS_UNLIKELY(x) (__builtin_expect((x), 0)) +#else +#define NS_LIKELY(x) (x) +#define NS_UNLIKELY(x) (x) +#endif + +#endif /* nscore_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nspr.h b/Src/nprt_plugin/gecko/1.8/win/include/nspr.h new file mode 100644 index 00000000..cf3bfad7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nspr.h @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_h___ +#define nspr_h___ + +#include "pratom.h" +#include "prbit.h" +#include "prclist.h" +#include "prcmon.h" +#include "prcvar.h" +#include "prdtoa.h" +#include "prenv.h" +#include "prerror.h" +#include "prinet.h" +#include "prinit.h" +#include "prinrval.h" +#include "prio.h" +#include "pripcsem.h" +#include "prlink.h" +#include "prlock.h" +#include "prlog.h" +#include "prlong.h" +#include "prmem.h" +#include "prmon.h" +#include "prmwait.h" +#include "prnetdb.h" +#include "prprf.h" +#include "prproces.h" +#include "prrng.h" +#include "prrwlock.h" +#include "prshm.h" +#include "prshma.h" +#include "prsystem.h" +#include "prthread.h" +#include "prtime.h" +#include "prtpool.h" +#include "prtrace.h" +#include "prtypes.h" + +#endif /* nspr_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/nsrootidl.h b/Src/nprt_plugin/gecko/1.8/win/include/nsrootidl.h new file mode 100644 index 00000000..4975a689 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/nsrootidl.h @@ -0,0 +1,57 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsrootidl.idl + */ + +#ifndef __gen_nsrootidl_h__ +#define __gen_nsrootidl_h__ +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nscore.h" +#include "prtime.h" +/* + * Forward declarations for new string types + */ +class nsAString; +class nsACString; +/* + * Start commenting out the C++ versions of the below in the output header + */ +#if 0 +/** + * Root idl declarations to be used by all. + * @status FROZEN + */ +typedef PRBool PRBool; + +typedef PRUint8 PRUint8; + +typedef PRUint16 PRUint16; + +typedef PRUint16 PRUnichar; + +typedef PRUint32 PRUint32; + +typedef PRUint64 PRUint64; + +typedef PRUint64 PRTime; + +typedef PRInt16 PRInt16; + +typedef PRInt32 PRInt32; + +typedef PRInt64 PRInt64; + +typedef PRUint32 nsrefcnt; + +typedef PRUint32 nsresult; + +typedef PRUint32 size_t; + +/* + * End commenting out the C++ versions of the above in the output header + */ +#endif + +#endif /* __gen_nsrootidl_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/obsolete/pralarm.h b/Src/nprt_plugin/gecko/1.8/win/include/obsolete/pralarm.h new file mode 100644 index 00000000..20476e44 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/obsolete/pralarm.h @@ -0,0 +1,194 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: pralarm.h +** Description: API to periodic alarms. +** +** +** Alarms are defined to invoke some client specified function at +** a time in the future. The notification may be a one time event +** or repeated at a fixed interval. The interval at which the next +** notification takes place may be modified by the client code only +** during the respective notification. +** +** The notification is delivered on a thread that is part of the +** alarm context (PRAlarm). The thread will inherit the priority +** of the Alarm creator. +** +** Any number of periodic alarms (PRAlarmID) may be created within +** the context of a single alarm (PRAlarm). The notifications will be +** scheduled as close to the desired time as possible. +** +** Repeating periodic notifies are expected to run at a fixed rate. +** That rate is expressed as some number of notifies per period where +** the period is much larger than a PRIntervalTime (see prinrval.h). +*/ + +#if !defined(pralarm_h) +#define pralarm_h + +#include "prtypes.h" +#include "prinrval.h" + + +PR_BEGIN_EXTERN_C + +/**********************************************************************/ +/************************* TYPES AND CONSTANTS ************************/ +/**********************************************************************/ + +typedef struct PRAlarm PRAlarm; +typedef struct PRAlarmID PRAlarmID; + +typedef PRBool (PR_CALLBACK *PRPeriodicAlarmFn)( + PRAlarmID *id, void *clientData, PRUint32 late); + +/**********************************************************************/ +/****************************** FUNCTIONS *****************************/ +/**********************************************************************/ + +/*********************************************************************** +** FUNCTION: PR_CreateAlarm +** DESCRIPTION: +** Create an alarm context. +** INPUTS: void +** OUTPUTS: None +** RETURN: PRAlarm* +** +** SIDE EFFECTS: +** This creates an alarm context, which is an object used for subsequent +** notification creations. It also creates a thread that will be used to +** deliver the notifications that are expected to be defined. The client +** is resposible for destroying the context when appropriate. +** RESTRICTIONS: +** None. +** MEMORY: The object (PRAlarm) and a thread to support notifications. +** ALGORITHM: N/A +***********************************************************************/ +NSPR_API(PRAlarm*) PR_CreateAlarm(void); + +/*********************************************************************** +** FUNCTION: PR_DestroyAlarm +** DESCRIPTION: +** Destroys the context created by PR_CreateAlarm(). +** INPUTS: PRAlarm* +** OUTPUTS: None +** RETURN: PRStatus +** +** SIDE EFFECTS: +** This destroys the context that was created by PR_CreateAlarm(). +** If there are any active alarms (PRAlarmID), they will be cancelled. +** Once that is done, the thread that was used to deliver the alarms +** will be joined. +** RESTRICTIONS: +** None. +** MEMORY: N/A +** ALGORITHM: N/A +***********************************************************************/ +NSPR_API(PRStatus) PR_DestroyAlarm(PRAlarm *alarm); + +/*********************************************************************** +** FUNCTION: PR_SetAlarm +** DESCRIPTION: +** Creates a periodic notifier that is to be delivered to a specified +** function at some fixed interval. +** INPUTS: PRAlarm *alarm Parent alarm context +** PRIntervalTime period Interval over which the notifies +** are delivered. +** PRUint32 rate The rate within the interval that +** the notifies will be delivered. +** PRPeriodicAlarmFn function Entry point where the notifies +** will be delivered. +** OUTPUTS: None +** RETURN: PRAlarmID* Handle to the notifier just created +** or NULL if the request failed. +** +** SIDE EFFECTS: +** A periodic notifier is created. The notifications will be delivered +** by the alarm's internal thread at a fixed interval whose rate is the +** number of interrupts per interval specified. The first notification +** will be delivered as soon as possible, and they will continue until +** the notifier routine indicates that they should cease of the alarm +** context is destroyed (PR_DestroyAlarm). +** RESTRICTIONS: +** None. +** MEMORY: Memory for the notifier object. +** ALGORITHM: The rate at which notifications are delivered are stated +** to be "'rate' notifies per 'interval'". The exact time of +** the notification is computed based on a epoch established +** when the notifier was set. Each notification is delivered +** not ealier than the epoch plus the fixed rate times the +** notification sequence number. Such notifications have the +** potential to be late by not more than 'interval'/'rate'. +** The amount of lateness of one notification is taken into +** account on the next in an attempt to avoid long term slew. +***********************************************************************/ +NSPR_API(PRAlarmID*) PR_SetAlarm( + PRAlarm *alarm, PRIntervalTime period, PRUint32 rate, + PRPeriodicAlarmFn function, void *clientData); + +/*********************************************************************** +** FUNCTION: PR_ResetAlarm +** DESCRIPTION: +** Resets an existing alarm. +** INPUTS: PRAlarmID *id Identify of the notifier. +** PRIntervalTime period Interval over which the notifies +** are delivered. +** PRUint32 rate The rate within the interval that +** the notifies will be delivered. +** OUTPUTS: None +** RETURN: PRStatus Indication of completion. +** +** SIDE EFFECTS: +** An existing alarm may have its period and rate redefined. The +** additional side effect is that the notifier's epoch is recomputed. +** The first notification delivered by the newly refreshed alarm is +** defined to be 'interval'/'rate' from the time of the reset. +** RESTRICTIONS: +** This function may only be called in the notifier for that alarm. +** MEMORY: N/A. +** ALGORITHM: See PR_SetAlarm(). +***********************************************************************/ +NSPR_API(PRStatus) PR_ResetAlarm( + PRAlarmID *id, PRIntervalTime period, PRUint32 rate); + +PR_END_EXTERN_C + +#endif /* !defined(pralarm_h) */ + +/* prinrval.h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/obsolete/probslet.h b/Src/nprt_plugin/gecko/1.8/win/include/obsolete/probslet.h new file mode 100644 index 00000000..374e696c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/obsolete/probslet.h @@ -0,0 +1,175 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** A collection of things thought to be obsolete +*/ + +#if defined(PROBSLET_H) +#else +#define PROBSLET_H + +#include "prio.h" + +PR_BEGIN_EXTERN_C + +/* +** Yield the current thread. The proper function to use in place of +** PR_Yield() is PR_Sleep() with an argument of PR_INTERVAL_NO_WAIT. +*/ +NSPR_API(PRStatus) PR_Yield(void); + +/************************************************************************/ +/************* The following definitions are for select *****************/ +/************************************************************************/ + +/* +** The following is obsolete and will be deleted in the next release! +** These are provided for compatibility, but are GUARANTEED to be slow. +** +** Override PR_MAX_SELECT_DESC if you need more space in the select set. +*/ +#ifndef PR_MAX_SELECT_DESC +#define PR_MAX_SELECT_DESC 1024 +#endif +typedef struct PR_fd_set { + PRUint32 hsize; + PRFileDesc *harray[PR_MAX_SELECT_DESC]; + PRUint32 nsize; + PRInt32 narray[PR_MAX_SELECT_DESC]; +} PR_fd_set; + +/* +************************************************************************* +** FUNCTION: PR_Select +** DESCRIPTION: +** +** The call returns as soon as I/O is ready on one or more of the underlying +** file/socket descriptors or an exceptional condition is pending. A count of the +** number of ready descriptors is returned unless a timeout occurs in which case +** zero is returned. On return, PR_Select replaces the given descriptor sets with +** subsets consisting of those descriptors that are ready for the requested condition. +** The total number of ready descriptors in all the sets is the return value. +** +** INPUTS: +** PRInt32 num +** This argument is unused but is provided for select(unix) interface +** compatability. All input PR_fd_set arguments are self-describing +** with its own maximum number of elements in the set. +** +** PR_fd_set *readfds +** A set describing the io descriptors for which ready for reading +** condition is of interest. +** +** PR_fd_set *writefds +** A set describing the io descriptors for which ready for writing +** condition is of interest. +** +** PR_fd_set *exceptfds +** A set describing the io descriptors for which exception pending +** condition is of interest. +** +** Any of the above readfds, writefds or exceptfds may be given as NULL +** pointers if no descriptors are of interest for that particular condition. +** +** PRIntervalTime timeout +** Amount of time the call will block waiting for I/O to become ready. +** If this time expires without any I/O becoming ready, the result will +** be zero. +** +** OUTPUTS: +** PR_fd_set *readfds +** A set describing the io descriptors which are ready for reading. +** +** PR_fd_set *writefds +** A set describing the io descriptors which are ready for writing. +** +** PR_fd_set *exceptfds +** A set describing the io descriptors which have pending exception. +** +** RETURN:PRInt32 +** Number of io descriptors with asked for conditions or zero if the function +** timed out or -1 on failure. The reason for the failure is obtained by +** calling PR_GetError(). +** XXX can we implement this on windoze and mac? +************************************************************************** +*/ +NSPR_API(PRInt32) PR_Select( + PRInt32 num, PR_fd_set *readfds, PR_fd_set *writefds, + PR_fd_set *exceptfds, PRIntervalTime timeout); + +/* +** The following are not thread safe for two threads operating on them at the +** same time. +** +** The following routines are provided for manipulating io descriptor sets. +** PR_FD_ZERO(&fdset) initializes a descriptor set fdset to the null set. +** PR_FD_SET(fd, &fdset) includes a particular file descriptor fd in fdset. +** PR_FD_CLR(fd, &fdset) removes a file descriptor fd from fdset. +** PR_FD_ISSET(fd, &fdset) is nonzero if file descriptor fd is a member of +** fdset, zero otherwise. +** +** PR_FD_NSET(osfd, &fdset) includes a particular native file descriptor osfd +** in fdset. +** PR_FD_NCLR(osfd, &fdset) removes a native file descriptor osfd from fdset. +** PR_FD_NISSET(osfd, &fdset) is nonzero if native file descriptor osfd is a member of +** fdset, zero otherwise. +*/ + +NSPR_API(void) PR_FD_ZERO(PR_fd_set *set); +NSPR_API(void) PR_FD_SET(PRFileDesc *fd, PR_fd_set *set); +NSPR_API(void) PR_FD_CLR(PRFileDesc *fd, PR_fd_set *set); +NSPR_API(PRInt32) PR_FD_ISSET(PRFileDesc *fd, PR_fd_set *set); +NSPR_API(void) PR_FD_NSET(PRInt32 osfd, PR_fd_set *set); +NSPR_API(void) PR_FD_NCLR(PRInt32 osfd, PR_fd_set *set); +NSPR_API(PRInt32) PR_FD_NISSET(PRInt32 osfd, PR_fd_set *set); + +#ifndef NO_NSPR_10_SUPPORT +#ifdef XP_MAC +#include <stat.h> +#else +#include <sys/stat.h> +#endif + +NSPR_API(PRInt32) PR_Stat(const char *path, struct stat *buf); +#endif /* NO_NSPR_10_SUPPORT */ + +PR_END_EXTERN_C + +#endif /* defined(PROBSLET_H) */ + +/* probslet.h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/obsolete/protypes.h b/Src/nprt_plugin/gecko/1.8/win/include/obsolete/protypes.h new file mode 100644 index 00000000..c2a3c9b3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/obsolete/protypes.h @@ -0,0 +1,254 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 header typedefs the old 'native' types to the new PR<type>s. + * These definitions are scheduled to be eliminated at the earliest + * possible time. The NSPR API is implemented and documented using + * the new definitions. + */ + +#if !defined(PROTYPES_H) +#define PROTYPES_H + +typedef PRUintn uintn; +#ifndef _XP_Core_ +typedef PRIntn intn; +#endif + +/* + * It is trickier to define uint, int8, uint8, int16, uint16, + * int32, uint32, int64, and uint64 because some of these int + * types are defined by standard header files on some platforms. + * Our strategy here is to include all such standard headers + * first, and then define these int types only if they are not + * defined by those standard headers. + */ + +/* + * BeOS defines all the int types below in its standard header + * file SupportDefs.h. + */ +#ifdef XP_BEOS +#include <support/SupportDefs.h> +#endif + +/* + * OpenVMS defines all the int types below in its standard + * header files ints.h and types.h. + */ +#ifdef VMS +#include <ints.h> +#include <types.h> +#endif + +/* + * SVR4 typedef of uint is commonly found on UNIX machines. + * + * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h) + * defines the types int8, int16, int32, and int64. + */ +#ifdef XP_UNIX +#include <sys/types.h> +#endif + +/* model.h on HP-UX defines int8, int16, and int32. */ +#ifdef HPUX +#include <model.h> +#endif + +/* + * uint + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(XP_UNIX) || defined(NTO) +typedef PRUintn uint; +#endif + +/* + * uint64 + */ + +#if !defined(XP_BEOS) && !defined(VMS) +typedef PRUint64 uint64; +#endif + +/* + * uint32 + */ + +#if !defined(XP_BEOS) && !defined(VMS) +#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) +typedef PRUint32 uint32; +#else +typedef unsigned long uint32; +#endif +#endif + +/* + * uint16 + */ + +#if !defined(XP_BEOS) && !defined(VMS) +typedef PRUint16 uint16; +#endif + +/* + * uint8 + */ + +#if !defined(XP_BEOS) && !defined(VMS) +typedef PRUint8 uint8; +#endif + +/* + * int64 + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) +typedef PRInt64 int64; +#endif + +/* + * int32 + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ + && !defined(HPUX) +#if !defined(WIN32) || !defined(_WINSOCK2API_) /* defines its own "int32" */ +#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) +typedef PRInt32 int32; +#else +typedef long int32; +#endif +#endif +#endif + +/* + * int16 + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ + && !defined(HPUX) +typedef PRInt16 int16; +#endif + +/* + * int8 + */ + +#if !defined(XP_BEOS) && !defined(VMS) \ + && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ + && !defined(HPUX) +typedef PRInt8 int8; +#endif + +typedef PRFloat64 float64; +typedef PRUptrdiff uptrdiff_t; +typedef PRUword uprword_t; +typedef PRWord prword_t; + + +/* Re: prbit.h */ +#define TEST_BIT PR_TEST_BIT +#define SET_BIT PR_SET_BIT +#define CLEAR_BIT PR_CLEAR_BIT + +/* Re: prarena.h->plarena.h */ +#define PRArena PLArena +#define PRArenaPool PLArenaPool +#define PRArenaStats PLArenaStats +#define PR_ARENA_ALIGN PL_ARENA_ALIGN +#define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL +#define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE +#define PR_ARENA_GROW PL_ARENA_GROW +#define PR_ARENA_MARK PL_ARENA_MARK +#define PR_CLEAR_UNUSED PL_CLEAR_UNUSED +#define PR_CLEAR_ARENA PL_CLEAR_ARENA +#define PR_ARENA_RELEASE PL_ARENA_RELEASE +#define PR_COUNT_ARENA PL_COUNT_ARENA +#define PR_ARENA_DESTROY PL_ARENA_DESTROY +#define PR_InitArenaPool PL_InitArenaPool +#define PR_FreeArenaPool PL_FreeArenaPool +#define PR_FinishArenaPool PL_FinishArenaPool +#define PR_CompactArenaPool PL_CompactArenaPool +#define PR_ArenaFinish PL_ArenaFinish +#define PR_ArenaAllocate PL_ArenaAllocate +#define PR_ArenaGrow PL_ArenaGrow +#define PR_ArenaRelease PL_ArenaRelease +#define PR_ArenaCountAllocation PL_ArenaCountAllocation +#define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth +#define PR_ArenaCountGrowth PL_ArenaCountGrowth +#define PR_ArenaCountRelease PL_ArenaCountRelease +#define PR_ArenaCountRetract PL_ArenaCountRetract + +/* Re: prhash.h->plhash.h */ +#define PRHashEntry PLHashEntry +#define PRHashTable PLHashTable +#define PRHashNumber PLHashNumber +#define PRHashFunction PLHashFunction +#define PRHashComparator PLHashComparator +#define PRHashEnumerator PLHashEnumerator +#define PRHashAllocOps PLHashAllocOps +#define PR_NewHashTable PL_NewHashTable +#define PR_HashTableDestroy PL_HashTableDestroy +#define PR_HashTableRawLookup PL_HashTableRawLookup +#define PR_HashTableRawAdd PL_HashTableRawAdd +#define PR_HashTableRawRemove PL_HashTableRawRemove +#define PR_HashTableAdd PL_HashTableAdd +#define PR_HashTableRemove PL_HashTableRemove +#define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries +#define PR_HashTableLookup PL_HashTableLookup +#define PR_HashTableDump PL_HashTableDump +#define PR_HashString PL_HashString +#define PR_CompareStrings PL_CompareStrings +#define PR_CompareValues PL_CompareValues + +#if defined(XP_MAC) +#ifndef TRUE /* Mac standard is lower case true */ + #define TRUE 1 +#endif +#ifndef FALSE /* Mac standard is lower case false */ + #define FALSE 0 +#endif +#endif + +#endif /* !defined(PROTYPES_H) */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/obsolete/prsem.h b/Src/nprt_plugin/gecko/1.8/win/include/obsolete/prsem.h new file mode 100644 index 00000000..fd0863ab --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/obsolete/prsem.h @@ -0,0 +1,96 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prsem_h___ +#define prsem_h___ + +/* +** API for counting semaphores. Semaphores are counting synchronizing +** variables based on a lock and a condition variable. They are lightweight +** contention control for a given count of resources. +*/ +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +typedef struct PRSemaphore PRSemaphore; + +/* +** Create a new semaphore object. +*/ +NSPR_API(PRSemaphore*) PR_NewSem(PRUintn value); + +/* +** Destroy the given semaphore object. +** +*/ +NSPR_API(void) PR_DestroySem(PRSemaphore *sem); + +/* +** Wait on a Semaphore. +** +** This routine allows a calling thread to wait or proceed depending upon the +** state of the semahore sem. The thread can proceed only if the counter value +** of the semaphore sem is currently greater than 0. If the value of semaphore +** sem is positive, it is decremented by one and the routine returns immediately +** allowing the calling thread to continue. If the value of semaphore sem is 0, +** the calling thread blocks awaiting the semaphore to be released by another +** thread. +** +** This routine can return PR_PENDING_INTERRUPT if the waiting thread +** has been interrupted. +*/ +NSPR_API(PRStatus) PR_WaitSem(PRSemaphore *sem); + +/* +** This routine increments the counter value of the semaphore. If other threads +** are blocked for the semaphore, then the scheduler will determine which ONE +** thread will be unblocked. +*/ +NSPR_API(void) PR_PostSem(PRSemaphore *sem); + +/* +** Returns the value of the semaphore referenced by sem without affecting +** the state of the semaphore. The value represents the semaphore vaule +F** at the time of the call, but may not be the actual value when the +** caller inspects it. +*/ +NSPR_API(PRUintn) PR_GetValueSem(PRSemaphore *sem); + +PR_END_EXTERN_C + +#endif /* prsem_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/plarena.h b/Src/nprt_plugin/gecko/1.8/win/include/plarena.h new file mode 100644 index 00000000..38f3e399 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/plarena.h @@ -0,0 +1,213 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998-2000 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * 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 ***** + */ + +#ifndef plarena_h___ +#define plarena_h___ +/* + * Lifetime-based fast allocation, inspired by much prior art, including + * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes" + * David R. Hanson, Software -- Practice and Experience, Vol. 20(1). + * + * Also supports LIFO allocation (PL_ARENA_MARK/PL_ARENA_RELEASE). + */ +#include "prtypes.h" +#include "plarenas.h" + +PR_BEGIN_EXTERN_C + +typedef struct PLArena PLArena; + +struct PLArena { + PLArena *next; /* next arena for this lifetime */ + PRUword base; /* aligned base address, follows this header */ + PRUword limit; /* one beyond last byte in arena */ + PRUword avail; /* points to next available byte */ +}; + +#ifdef PL_ARENAMETER +typedef struct PLArenaStats PLArenaStats; + +struct PLArenaStats { + PLArenaStats *next; /* next in arenaStats list */ + char *name; /* name for debugging */ + PRUint32 narenas; /* number of arenas in pool */ + PRUint32 nallocs; /* number of PL_ARENA_ALLOCATE() calls */ + PRUint32 nreclaims; /* number of reclaims from freeArenas */ + PRUint32 nmallocs; /* number of malloc() calls */ + PRUint32 ndeallocs; /* number of lifetime deallocations */ + PRUint32 ngrows; /* number of PL_ARENA_GROW() calls */ + PRUint32 ninplace; /* number of in-place growths */ + PRUint32 nreleases; /* number of PL_ARENA_RELEASE() calls */ + PRUint32 nfastrels; /* number of "fast path" releases */ + PRUint32 nbytes; /* total bytes allocated */ + PRUint32 maxalloc; /* maximum allocation size in bytes */ + PRFloat64 variance; /* size variance accumulator */ +}; +#endif + +struct PLArenaPool { + PLArena first; /* first arena in pool list */ + PLArena *current; /* arena from which to allocate space */ + PRUint32 arenasize; /* net exact size of a new arena */ + PRUword mask; /* alignment mask (power-of-2 - 1) */ +#ifdef PL_ARENAMETER + PLArenaStats stats; +#endif +}; + +/* + * If the including .c file uses only one power-of-2 alignment, it may define + * PL_ARENA_CONST_ALIGN_MASK to the alignment mask and save a few instructions + * per ALLOCATE and GROW. + */ +#ifdef PL_ARENA_CONST_ALIGN_MASK +#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + PL_ARENA_CONST_ALIGN_MASK) \ + & ~PL_ARENA_CONST_ALIGN_MASK) + +#define PL_INIT_ARENA_POOL(pool, name, size) \ + PL_InitArenaPool(pool, name, size, PL_ARENA_CONST_ALIGN_MASK + 1) +#else +#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask) +#endif + +#define PL_ARENA_ALLOCATE(p, pool, nb) \ + PR_BEGIN_MACRO \ + PLArena *_a = (pool)->current; \ + PRUint32 _nb = PL_ARENA_ALIGN(pool, nb); \ + PRUword _p = _a->avail; \ + PRUword _q = _p + _nb; \ + if (_q > _a->limit) \ + _p = (PRUword)PL_ArenaAllocate(pool, _nb); \ + else \ + _a->avail = _q; \ + p = (void *)_p; \ + PL_ArenaCountAllocation(pool, nb); \ + PR_END_MACRO + +#define PL_ARENA_GROW(p, pool, size, incr) \ + PR_BEGIN_MACRO \ + PLArena *_a = (pool)->current; \ + PRUint32 _incr = PL_ARENA_ALIGN(pool, incr); \ + PRUword _p = _a->avail; \ + PRUword _q = _p + _incr; \ + if (_p == (PRUword)(p) + PL_ARENA_ALIGN(pool, size) && \ + _q <= _a->limit) { \ + _a->avail = _q; \ + PL_ArenaCountInplaceGrowth(pool, size, incr); \ + } else { \ + p = PL_ArenaGrow(pool, p, size, incr); \ + } \ + PL_ArenaCountGrowth(pool, size, incr); \ + PR_END_MACRO + +#define PL_ARENA_MARK(pool) ((void *) (pool)->current->avail) +#define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q)) + +#ifdef DEBUG +#define PL_FREE_PATTERN 0xDA +#define PL_CLEAR_UNUSED(a) (PR_ASSERT((a)->avail <= (a)->limit), \ + memset((void*)(a)->avail, PL_FREE_PATTERN, \ + (a)->limit - (a)->avail)) +#define PL_CLEAR_ARENA(a) memset((void*)(a), PL_FREE_PATTERN, \ + (a)->limit - (PRUword)(a)) +#else +#define PL_CLEAR_UNUSED(a) +#define PL_CLEAR_ARENA(a) +#endif + +#define PL_ARENA_RELEASE(pool, mark) \ + PR_BEGIN_MACRO \ + char *_m = (char *)(mark); \ + PLArena *_a = (pool)->current; \ + if (PR_UPTRDIFF(_m, _a->base) <= PR_UPTRDIFF(_a->avail, _a->base)) { \ + _a->avail = (PRUword)PL_ARENA_ALIGN(pool, _m); \ + PL_CLEAR_UNUSED(_a); \ + PL_ArenaCountRetract(pool, _m); \ + } else { \ + PL_ArenaRelease(pool, _m); \ + } \ + PL_ArenaCountRelease(pool, _m); \ + PR_END_MACRO + +#ifdef PL_ARENAMETER +#define PL_COUNT_ARENA(pool,op) ((pool)->stats.narenas op) +#else +#define PL_COUNT_ARENA(pool,op) +#endif + +#define PL_ARENA_DESTROY(pool, a, pnext) \ + PR_BEGIN_MACRO \ + PL_COUNT_ARENA(pool,--); \ + if ((pool)->current == (a)) (pool)->current = &(pool)->first; \ + *(pnext) = (a)->next; \ + PL_CLEAR_ARENA(a); \ + free(a); \ + (a) = 0; \ + PR_END_MACRO + +#ifdef PL_ARENAMETER + +#include <stdio.h> + +PR_EXTERN(void) PL_ArenaCountAllocation(PLArenaPool *pool, PRUint32 nb); + +PR_EXTERN(void) PL_ArenaCountInplaceGrowth( + PLArenaPool *pool, PRUint32 size, PRUint32 incr); + +PR_EXTERN(void) PL_ArenaCountGrowth( + PLArenaPool *pool, PRUint32 size, PRUint32 incr); + +PR_EXTERN(void) PL_ArenaCountRelease(PLArenaPool *pool, char *mark); + +PR_EXTERN(void) PL_ArenaCountRetract(PLArenaPool *pool, char *mark); + +PR_EXTERN(void) PL_DumpArenaStats(FILE *fp); + +#else /* !PL_ARENAMETER */ + +#define PL_ArenaCountAllocation(ap, nb) /* nothing */ +#define PL_ArenaCountInplaceGrowth(ap, size, incr) /* nothing */ +#define PL_ArenaCountGrowth(ap, size, incr) /* nothing */ +#define PL_ArenaCountRelease(ap, mark) /* nothing */ +#define PL_ArenaCountRetract(ap, mark) /* nothing */ + +#endif /* !PL_ARENAMETER */ + +PR_END_EXTERN_C + +#endif /* plarena_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/plarenas.h b/Src/nprt_plugin/gecko/1.8/win/include/plarenas.h new file mode 100644 index 00000000..e3eca358 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/plarenas.h @@ -0,0 +1,115 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#if defined(PLARENAS_H) +#else /* defined(PLARENAS_H) */ +#define PLARENAS_H + +PR_BEGIN_EXTERN_C + +typedef struct PLArenaPool PLArenaPool; + +/* +** Allocate an arena pool as specified by the parameters. +** +** This is equivelant to allocating the space yourself and then +** calling PL_InitArenaPool(). +** +** This function may fail (and return a NULL) for a variety of +** reasons. The reason for a particular failure can be discovered +** by calling PR_GetError(). +*/ +#if 0 /* Not implemented */ +PR_EXTERN(PLArenaPool*) PL_AllocArenaPool( + const char *name, PRUint32 size, PRUint32 align); +#endif + +/* +** Destroy an arena pool previously allocated by PL_AllocArenaPool(). +** +** This function may fail if the arena is not empty and the caller +** wishes to check for empty upon descruction. +*/ +#if 0 /* Not implemented */ +PR_EXTERN(PRStatus) PL_DestroyArenaPool(PLArenaPool *pool, PRBool checkEmpty); +#endif + + +/* +** Initialize an arena pool with the given name for debugging and metering, +** with a minimum size per arena of size bytes. +**/ +PR_EXTERN(void) PL_InitArenaPool( + PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align); + +/* +** Finish using arenas, freeing all memory associated with them. +**/ +PR_EXTERN(void) PL_ArenaFinish(void); + +/* +** Free the arenas in pool. The user may continue to allocate from pool +** after calling this function. There is no need to call PL_InitArenaPool() +** again unless PL_FinishArenaPool(pool) has been called. +**/ +PR_EXTERN(void) PL_FreeArenaPool(PLArenaPool *pool); + +/* +** Free the arenas in pool and finish using it altogether. +**/ +PR_EXTERN(void) PL_FinishArenaPool(PLArenaPool *pool); + +/* +** Compact all of the arenas in a pool so that no space is wasted. +**/ +PR_EXTERN(void) PL_CompactArenaPool(PLArenaPool *pool); + +/* +** Friend functions used by the PL_ARENA_*() macros. +**/ +PR_EXTERN(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb); + +PR_EXTERN(void *) PL_ArenaGrow( + PLArenaPool *pool, void *p, PRUint32 size, PRUint32 incr); + +PR_EXTERN(void) PL_ArenaRelease(PLArenaPool *pool, char *mark); + +PR_END_EXTERN_C + +#endif /* defined(PLARENAS_H) */ + +/* plarenas */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/plbase64.h b/Src/nprt_plugin/gecko/1.8/win/include/plbase64.h new file mode 100644 index 00000000..ac07e837 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/plbase64.h @@ -0,0 +1,98 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef _plbase64_h +#define _plbase64_h + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* + * PL_Base64Encode + * + * This routine encodes the data pointed to by the "src" parameter using the + * base64 algorithm, and returns a pointer to the result. If the "srclen" + * parameter is not zero, it specifies the length of the source data. If it + * is zero, the source data is assumed to be null-terminated, and PL_strlen + * is used to determine the source length. If the "dest" parameter is not + * null, it is assumed to point to a buffer of sufficient size (which may be + * calculated: ((srclen + 2)/3)*4) into which the encoded data is placed + * (without any termination). If the "dest" parameter is null, a buffer is + * allocated from the heap to hold the encoded data, and the result *will* + * be terminated with an extra null character. It is the caller's + * responsibility to free the result when it is allocated. A null is returned + * if the allocation fails. + */ + +PR_EXTERN(char *) +PL_Base64Encode +( + const char *src, + PRUint32 srclen, + char *dest +); + +/* + * PL_Base64Decode + * + * This routine decodes the data pointed to by the "src" parameter using + * the base64 algorithm, and returns a pointer to the result. The source + * may either include or exclude any trailing '=' characters. If the + * "srclen" parameter is not zero, it specifies the length of the source + * data. If it is zero, PL_strlen will be used to determine the source + * length. If the "dest" parameter is not null, it is assumed to point to + * a buffer of sufficient size (which may be calculated: (srclen * 3)/4 + * when srclen includes the '=' characters) into which the decoded data + * is placed (without any termination). If the "dest" parameter is null, + * a buffer is allocated from the heap to hold the decoded data, and the + * result *will* be terminated with an extra null character. It is the + * caller's responsibility to free the result when it is allocated. A null + * is retuned if the allocation fails, or if the source is not well-coded. + */ + +PR_EXTERN(char *) +PL_Base64Decode +( + const char *src, + PRUint32 srclen, + char *dest +); + +PR_END_EXTERN_C + +#endif /* _plbase64_h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/plerror.h b/Src/nprt_plugin/gecko/1.8/win/include/plerror.h new file mode 100644 index 00000000..a2b8d0b2 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/plerror.h @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: plerror.h +** Description: Simple routine to print translate the calling thread's +** error numbers and print them. +*/ + +#if defined(PLERROR_H) +#else +#define PLERROR_H + +#include "prio.h" +#include "prtypes.h" + +PR_BEGIN_EXTERN_C +/* +** Print the messages to "syserr" prepending 'msg' if not NULL. +*/ +PR_EXTERN(void) PL_PrintError(const char *msg); + +/* +** Print the messages to specified output file prepending 'msg' if not NULL. +*/ +PR_EXTERN(void) PL_FPrintError(PRFileDesc *output, const char *msg); + +PR_END_EXTERN_C + +#endif /* defined(PLERROR_H) */ + +/* plerror.h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/plgetopt.h b/Src/nprt_plugin/gecko/1.8/win/include/plgetopt.h new file mode 100644 index 00000000..423feab3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/plgetopt.h @@ -0,0 +1,81 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: plgetopt.h +** Description: utilities to parse argc/argv +*/ + +#if defined(PLGETOPT_H_) +#else +#define PLGETOPT_H_ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +typedef struct PLOptionInternal PLOptionInternal; + +typedef enum +{ + PL_OPT_OK, /* all's well with the option */ + PL_OPT_EOL, /* end of options list */ + PL_OPT_BAD /* invalid option (and value) */ +} PLOptStatus; + +typedef struct PLOptState +{ + char option; /* the name of the option */ + const char *value; /* the value of that option | NULL */ + + PLOptionInternal *internal; /* private processing state */ + +} PLOptState; + +PR_EXTERN(PLOptState*) PL_CreateOptState( + PRIntn argc, char **argv, const char *options); + +PR_EXTERN(void) PL_DestroyOptState(PLOptState *opt); + +PR_EXTERN(PLOptStatus) PL_GetNextOpt(PLOptState *opt); + +PR_END_EXTERN_C + +#endif /* defined(PLGETOPT_H_) */ + +/* plgetopt.h */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/plhash.h b/Src/nprt_plugin/gecko/1.8/win/include/plhash.h new file mode 100644 index 00000000..45c9773f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/plhash.h @@ -0,0 +1,165 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef plhash_h___ +#define plhash_h___ +/* + * API to portable hash table code. + */ +#include <stdio.h> +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +typedef struct PLHashEntry PLHashEntry; +typedef struct PLHashTable PLHashTable; +typedef PRUint32 PLHashNumber; +#define PL_HASH_BITS 32 /* Number of bits in PLHashNumber */ +typedef PLHashNumber (PR_CALLBACK *PLHashFunction)(const void *key); +typedef PRIntn (PR_CALLBACK *PLHashComparator)(const void *v1, const void *v2); + +#if defined(XP_OS2_VACPP) && defined(VACPP_FLIP) /* for nsSpaceManager.cpp */ +PR_END_EXTERN_C /* and nsHTMLDocument.cpp */ +#endif +typedef PRIntn (PR_CALLBACK *PLHashEnumerator)(PLHashEntry *he, PRIntn i, void *arg); + +#if defined(XP_OS2_VACPP) && defined(VACPP_FLIP) +PR_BEGIN_EXTERN_C +#endif + +/* Flag bits in PLHashEnumerator's return value */ +#define HT_ENUMERATE_NEXT 0 /* continue enumerating entries */ +#define HT_ENUMERATE_STOP 1 /* stop enumerating entries */ +#define HT_ENUMERATE_REMOVE 2 /* remove and free the current entry */ +#define HT_ENUMERATE_UNHASH 4 /* just unhash the current entry */ + +typedef struct PLHashAllocOps { + void * (PR_CALLBACK *allocTable)(void *pool, PRSize size); + void (PR_CALLBACK *freeTable)(void *pool, void *item); + PLHashEntry * (PR_CALLBACK *allocEntry)(void *pool, const void *key); + void (PR_CALLBACK *freeEntry)(void *pool, PLHashEntry *he, PRUintn flag); +} PLHashAllocOps; + +#define HT_FREE_VALUE 0 /* just free the entry's value */ +#define HT_FREE_ENTRY 1 /* free value and entire entry */ + +struct PLHashEntry { + PLHashEntry *next; /* hash chain linkage */ + PLHashNumber keyHash; /* key hash function result */ + const void *key; /* ptr to opaque key */ + void *value; /* ptr to opaque value */ +}; + +struct PLHashTable { + PLHashEntry **buckets; /* vector of hash buckets */ + PRUint32 nentries; /* number of entries in table */ + PRUint32 shift; /* multiplicative hash shift */ + PLHashFunction keyHash; /* key hash function */ + PLHashComparator keyCompare; /* key comparison function */ + PLHashComparator valueCompare; /* value comparison function */ + const PLHashAllocOps *allocOps; /* allocation operations */ + void *allocPriv; /* allocation private data */ +#ifdef HASHMETER + PRUint32 nlookups; /* total number of lookups */ + PRUint32 nsteps; /* number of hash chains traversed */ + PRUint32 ngrows; /* number of table expansions */ + PRUint32 nshrinks; /* number of table contractions */ +#endif +}; + +/* + * Create a new hash table. + * If allocOps is null, use default allocator ops built on top of malloc(). + */ +PR_EXTERN(PLHashTable *) +PL_NewHashTable(PRUint32 numBuckets, PLHashFunction keyHash, + PLHashComparator keyCompare, PLHashComparator valueCompare, + const PLHashAllocOps *allocOps, void *allocPriv); + +PR_EXTERN(void) +PL_HashTableDestroy(PLHashTable *ht); + +/* Higher level access methods */ +PR_EXTERN(PLHashEntry *) +PL_HashTableAdd(PLHashTable *ht, const void *key, void *value); + +PR_EXTERN(PRBool) +PL_HashTableRemove(PLHashTable *ht, const void *key); + +PR_EXTERN(void *) +PL_HashTableLookup(PLHashTable *ht, const void *key); + +PR_EXTERN(void *) +PL_HashTableLookupConst(PLHashTable *ht, const void *key); + +PR_EXTERN(PRIntn) +PL_HashTableEnumerateEntries(PLHashTable *ht, PLHashEnumerator f, void *arg); + +/* General-purpose C string hash function. */ +PR_EXTERN(PLHashNumber) +PL_HashString(const void *key); + +/* Compare strings using strcmp(), return true if equal. */ +PR_EXTERN(PRIntn) +PL_CompareStrings(const void *v1, const void *v2); + +/* Stub function just returns v1 == v2 */ +PR_EXTERN(PRIntn) +PL_CompareValues(const void *v1, const void *v2); + +/* Low level access methods */ +PR_EXTERN(PLHashEntry **) +PL_HashTableRawLookup(PLHashTable *ht, PLHashNumber keyHash, const void *key); + +PR_EXTERN(PLHashEntry **) +PL_HashTableRawLookupConst(PLHashTable *ht, PLHashNumber keyHash, + const void *key); + +PR_EXTERN(PLHashEntry *) +PL_HashTableRawAdd(PLHashTable *ht, PLHashEntry **hep, PLHashNumber keyHash, + const void *key, void *value); + +PR_EXTERN(void) +PL_HashTableRawRemove(PLHashTable *ht, PLHashEntry **hep, PLHashEntry *he); + +/* This can be trivially implemented using PL_HashTableEnumerateEntries. */ +PR_EXTERN(PRIntn) +PL_HashTableDump(PLHashTable *ht, PLHashEnumerator dump, FILE *fp); + +PR_END_EXTERN_C + +#endif /* plhash_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/plresolv.h b/Src/nprt_plugin/gecko/1.8/win/include/plresolv.h new file mode 100644 index 00000000..8e8926c6 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/plresolv.h @@ -0,0 +1,108 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* + * plresolv.h - asynchronous name resolution using DNS + */ + +#ifndef _PLRESOLV_H_ +#define _PLRESOLV_H_ + +/* +** THIS IS WORK IN PROGRESS. DO NOT ATTEMPT TO USE ANY PORTION OF THIS +** API UNTIL THIS MESSAGE NO LONGER EXISTS. IF YOU DO, THEN YOU SURRENDER +** THE RIGHT TO COMPLAIN ABOUT ANY CONTENT. +*/ + +#if defined(XP_UNIX) + +#include <prtypes.h> +#include <prnetdb.h> + +NSPR_BEGIN_EXTERN_C + +#define PL_RESOLVE_MAXHOSTENTBUF 1024 +#define PL_RESOLVE_DEFAULT_TIMEOUT 0 + +/* Error return codes */ +#define PL_RESOLVE_OK 0 +#define PL_RESOLVE_EWINIT 1 /* Failed to initialize window */ +#define PL_RESOLVE_EMAKE 2 /* Failed to create request */ +#define PL_RESOLVE_ELAUNCH 3 /* Error launching Async request */ +#define PL_RESOLVE_ETIMEDOUT 4 /* Request timed-out */ +#define PL_RESOLVE_EINVAL 5 /* Invalid argument */ +#define PL_RESOLVE_EOVERFLOW 6 /* Buffer Overflow */ +#define PL_RESOLVE_EUNKNOWN 7 /* berserk error */ + +/* ----------- Function Prototypes ----------------*/ + +PR_EXTERN(PRStatus) PL_ResolveName( + const char *name, unsigned char *buf, + PRIntn bufsize, PRIntervalTime timeout, + PRHostEnt *hostentry, PRIntervalTime *ttl); + +PR_EXTERN(PRStatus) PL_ResolveAddr( + const PRNetAddr *address, unsigned char *buf, + PRIntn bufsize, PRIntervalTime timeout, + PRHostEnt *hostentry, PRIntervalTime *ttl); + +typedef struct PLResolveStats { + int re_errors; + int re_nu_look; + int re_na_look; + int re_replies; + int re_requests; + int re_resends; + int re_sent; + int re_timeouts; +} PLResolveStats; + +typedef struct PLResoveInfo { + PRBool enabled; + PRUint32 numNameLookups; + PRUint32 numAddrLookups; + PRUint32 numLookupsInProgress; + PLResolveStats stats; +} PLResoveInfo; + +PR_EXTERN(void) PL_ResolveInfo(PLResoveInfo *info); + +NSPR_END_EXTERN_C + +#endif /* defined(XP_UNIX) */ + +#endif /* _PLRESOLV_H_ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/plstr.h b/Src/nprt_plugin/gecko/1.8/win/include/plstr.h new file mode 100644 index 00000000..4d21cc46 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/plstr.h @@ -0,0 +1,470 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Roland Mainz <roland mainz@informatik.med.uni-giessen.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 ***** */ + +#ifndef _plstr_h +#define _plstr_h + +/* + * plstr.h + * + * This header file exports the API to the NSPR portable library or string- + * handling functions. + * + * This API was not designed as an "optimal" or "ideal" string library; it + * was based on the good ol' unix string.3 functions, and was written to + * + * 1) replace the libc functions, for cross-platform consistency, + * 2) complete the API on platforms lacking common functions (e.g., + * strcase*), and + * 3) to implement some obvious "closure" functions that I've seen + * people hacking around in our code. + * + * Point number three largely means that most functions have an "strn" + * limited-length version, and all comparison routines have a non-case- + * sensitive version available. + */ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C +/* + * PL_strlen + * + * Returns the length of the provided string, not including the trailing '\0'. + */ + +PR_EXTERN(PRUint32) +PL_strlen(const char *str); + +/* + * PL_strnlen + * + * Returns the length of the provided string, not including the trailing '\0', + * up to the indicated maximum. The string will not be examined beyond the + * maximum; if no terminating '\0' is found, the maximum will be returned. + */ + +PR_EXTERN(PRUint32) +PL_strnlen(const char *str, PRUint32 max); + +/* + * PL_strcpy + * + * Copies the source string, up to and including the trailing '\0', into the + * destination buffer. It does not (can not) verify that the destination + * buffer is large enough. It returns the "dest" argument. + */ + +PR_EXTERN(char *) +PL_strcpy(char *dest, const char *src); + +/* + * PL_strncpy + * + * Copies the source string into the destination buffer, up to and including + * the trailing '\0' or up to and including the max'th character, whichever + * comes first. It does not (can not) verify that the destination buffer is + * large enough. If the source string is longer than the maximum length, + * the result will *not* be null-terminated (JLRU). + */ + +PR_EXTERN(char *) +PL_strncpy(char *dest, const char *src, PRUint32 max); + +/* + * PL_strncpyz + * + * Copies the source string into the destination buffer, up to and including + * the trailing '\0' or up but not including the max'th character, whichever + * comes first. It does not (can not) verify that the destination buffer is + * large enough. The destination string is always terminated with a '\0', + * unlike the traditional libc implementation. It returns the "dest" argument. + * + * NOTE: If you call this with a source "abcdefg" and a max of 5, the + * destination will end up with "abcd\0" (i.e., its strlen length will be 4)! + * + * This means you can do this: + * + * char buffer[ SOME_SIZE ]; + * PL_strncpyz(buffer, src, sizeof(buffer)); + * + * and the result will be properly terminated. + */ + +PR_EXTERN(char *) +PL_strncpyz(char *dest, const char *src, PRUint32 max); + +/* + * PL_strdup + * + * Returns a pointer to a malloc'd extent of memory containing a duplicate + * of the argument string. The size of the allocated extent is one greater + * than the length of the argument string, because of the terminator. A + * null argument, like a zero-length argument, will result in a pointer to + * a one-byte extent containing the null value. This routine returns null + * upon malloc failure. + */ + +PR_EXTERN(char *) +PL_strdup(const char *s); + +/* + * PL_strfree + * + * Free memory allocated by PL_strdup + */ + +PR_EXTERN(void) +PL_strfree(char *s); + +/* + * PL_strndup + * + * Returns a pointer to a malloc'd extent of memory containing a duplicate + * of the argument string, up to the maximum specified. If the argument + * string has a length greater than the value of the specified maximum, the + * return value will be a pointer to an extent of memory of length one + * greater than the maximum specified. A null string, a zero-length string, + * or a zero maximum will all result in a pointer to a one-byte extent + * containing the null value. This routine returns null upon malloc failure. + */ + +PR_EXTERN(char *) +PL_strndup(const char *s, PRUint32 max); + +/* + * PL_strcat + * + * Appends a copy of the string pointed to by the second argument to the + * end of the string pointed to by the first. The destination buffer is + * not (can not be) checked for sufficient size. A null destination + * argument returns null; otherwise, the first argument is returned. + */ + +PR_EXTERN(char *) +PL_strcat(char *dst, const char *src); + +/* + * PL_strncat + * + * Appends a copy of the string pointed to by the second argument, up to + * the maximum size specified, to the end of the string pointed to by the + * first. The destination buffer is not (can not be) checked for sufficient + * size. A null destination argument returns null; otherwise, the first + * argument is returned. If the maximum size limits the copy, then the + * result will *not* be null-terminated (JLRU). A null destination + * returns null; otherwise, the destination argument is returned. + */ + +PR_EXTERN(char *) +PL_strncat(char *dst, const char *src, PRUint32 max); + +/* + * PL_strcatn + * + * Appends a copy of the string pointed to by the third argument, to the + * end of the string pointed to by the first. The second argument specifies + * the maximum size of the destination buffer, including the null termination. + * If the existing string in dst is longer than the max, no action is taken. + * The resulting string will be null-terminated. A null destination returns + * null; otherwise, the destination argument is returned. + */ + +PR_EXTERN(char *) +PL_strcatn(char *dst, PRUint32 max, const char *src); + +/* + * PL_strcmp + * + * Returns an integer, the sign of which -- positive, zero, or negative -- + * reflects the lexical sorting order of the two strings indicated. The + * result is positive if the first string comes after the second. The + * NSPR implementation is not i18n. + */ + +PR_EXTERN(PRIntn) +PL_strcmp(const char *a, const char *b); + +/* + * PL_strncmp + * + * Returns an integer, the sign of which -- positive, zero, or negative -- + * reflects the lexical sorting order of the two strings indicated, up to + * the maximum specified. The result is positive if the first string comes + * after the second. The NSPR implementation is not i18n. If the maximum + * is zero, only the existance or non-existance (pointer is null) of the + * strings is compared. + */ + +PR_EXTERN(PRIntn) +PL_strncmp(const char *a, const char *b, PRUint32 max); + +/* + * PL_strcasecmp + * + * Returns an integer, the sign of which -- positive, zero or negative -- + * reflects the case-insensitive lexical sorting order of the two strings + * indicated. The result is positive if the first string comes after the + * second. The NSPR implementation is not i18n. + */ + +PR_EXTERN(PRIntn) +PL_strcasecmp(const char *a, const char *b); + +/* + * PL_strncasecmp + * + * Returns an integer, the sign of which -- positive, zero or negative -- + * reflects the case-insensitive lexical sorting order of the first n characters + * of the two strings indicated. The result is positive if the first string comes + * after the second. The NSPR implementation is not i18n. + */ + +PR_EXTERN(PRIntn) +PL_strncasecmp(const char *a, const char *b, PRUint32 max); + +/* + * PL_strchr + * + * Returns a pointer to the first instance of the specified character in the + * provided string. It returns null if the character is not found, or if the + * provided string is null. The character may be the null character. + */ + +PR_EXTERN(char *) +PL_strchr(const char *s, char c); + +/* + * PL_strrchr + * + * Returns a pointer to the last instance of the specified character in the + * provided string. It returns null if the character is not found, or if the + * provided string is null. The character may be the null character. + */ + +PR_EXTERN(char *) +PL_strrchr(const char *s, char c); + +/* + * PL_strnchr + * + * Returns a pointer to the first instance of the specified character within the + * first n characters of the provided string. It returns null if the character + * is not found, or if the provided string is null. The character may be the + * null character. + */ + +PR_EXTERN(char *) +PL_strnchr(const char *s, char c, PRUint32 n); + +/* + * PL_strnrchr + * + * Returns a pointer to the last instance of the specified character within the + * first n characters of the provided string. It returns null if the character is + * not found, or if the provided string is null. The character may be the null + * character. + */ + +PR_EXTERN(char *) +PL_strnrchr(const char *s, char c, PRUint32 n); + +/* + * NOTE: Looking for strcasechr, strcaserchr, strncasechr, or strncaserchr? + * Use strpbrk, strprbrk, strnpbrk or strnprbrk. + */ + +/* + * PL_strpbrk + * + * Returns a pointer to the first instance in the first string of any character + * (not including the terminating null character) of the second string. It returns + * null if either string is null. + */ + +PR_EXTERN(char *) +PL_strpbrk(const char *s, const char *list); + +/* + * PL_strprbrk + * + * Returns a pointer to the last instance in the first string of any character + * (not including the terminating null character) of the second string. It returns + * null if either string is null. + */ + +PR_EXTERN(char *) +PL_strprbrk(const char *s, const char *list); + +/* + * PL_strnpbrk + * + * Returns a pointer to the first instance (within the first n characters) of any + * character (not including the terminating null character) of the second string. + * It returns null if either string is null. + */ + +PR_EXTERN(char *) +PL_strnpbrk(const char *s, const char *list, PRUint32 n); + +/* + * PL_strnprbrk + * + * Returns a pointer to the last instance (within the first n characters) of any + * character (not including the terminating null character) of the second string. + * It returns null if either string is null. + */ + +PR_EXTERN(char *) +PL_strnprbrk(const char *s, const char *list, PRUint32 n); + +/* + * PL_strstr + * + * Returns a pointer to the first instance of the little string within the + * big one. It returns null if either string is null. + */ + +PR_EXTERN(char *) +PL_strstr(const char *big, const char *little); + +/* + * PL_strrstr + * + * Returns a pointer to the last instance of the little string within the big one. + * It returns null if either string is null. + */ + +PR_EXTERN(char *) +PL_strrstr(const char *big, const char *little); + +/* + * PL_strnstr + * + * Returns a pointer to the first instance of the little string within the first + * n characters of the big one. It returns null if either string is null. It + * returns null if the length of the little string is greater than n. + */ + +PR_EXTERN(char *) +PL_strnstr(const char *big, const char *little, PRUint32 n); + +/* + * PL_strnrstr + * + * Returns a pointer to the last instance of the little string within the first + * n characters of the big one. It returns null if either string is null. It + * returns null if the length of the little string is greater than n. + */ + +PR_EXTERN(char *) +PL_strnrstr(const char *big, const char *little, PRUint32 max); + +/* + * PL_strcasestr + * + * Returns a pointer to the first instance of the little string within the big one, + * ignoring case. It returns null if either string is null. + */ + +PR_EXTERN(char *) +PL_strcasestr(const char *big, const char *little); + +/* + * PL_strcaserstr + * + * Returns a pointer to the last instance of the little string within the big one, + * ignoring case. It returns null if either string is null. + */ + +PR_EXTERN(char *) +PL_strcaserstr(const char *big, const char *little); + +/* + * PL_strncasestr + * + * Returns a pointer to the first instance of the little string within the first + * n characters of the big one, ignoring case. It returns null if either string is + * null. It returns null if the length of the little string is greater than n. + */ + +PR_EXTERN(char *) +PL_strncasestr(const char *big, const char *little, PRUint32 max); + +/* + * PL_strncaserstr + * + * Returns a pointer to the last instance of the little string within the first + * n characters of the big one, ignoring case. It returns null if either string is + * null. It returns null if the length of the little string is greater than n. + */ + +PR_EXTERN(char *) +PL_strncaserstr(const char *big, const char *little, PRUint32 max); + +/* + * PL_strtok_r + * + * Splits the string s1 into tokens, separated by one or more characters + * from the separator string s2. The argument lasts points to a + * user-supplied char * pointer in which PL_strtok_r stores information + * for it to continue scanning the same string. + * + * In the first call to PL_strtok_r, s1 points to a string and the value + * of *lasts is ignored. PL_strtok_r returns a pointer to the first + * token, writes '\0' into the character following the first token, and + * updates *lasts. + * + * In subsequent calls, s1 is null and lasts must stay unchanged from the + * previous call. The separator string s2 may be different from call to + * call. PL_strtok_r returns a pointer to the next token in s1. When no + * token remains in s1, PL_strtok_r returns null. + */ + +PR_EXTERN(char *) +PL_strtok_r(char *s1, const char *s2, char **lasts); + +/* + * Things not (yet?) included: strspn/strcspn, strsep. + * memchr, memcmp, memcpy, memccpy, index, rindex, bcmp, bcopy, bzero. + * Any and all i18n/l10n stuff. + */ + +PR_END_EXTERN_C + +#endif /* _plstr_h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/pratom.h b/Src/nprt_plugin/gecko/1.8/win/include/pratom.h new file mode 100644 index 00000000..57d069b0 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/pratom.h @@ -0,0 +1,161 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* GLOBAL FUNCTIONS: +** DESCRIPTION: +** PR Atomic operations +*/ + +#ifndef pratom_h___ +#define pratom_h___ + +#include "prtypes.h" +#include "prlock.h" + +PR_BEGIN_EXTERN_C + +/* +** FUNCTION: PR_AtomicIncrement +** DESCRIPTION: +** Atomically increment a 32 bit value. +** INPUTS: +** val: a pointer to the value to increment +** RETURN: +** the returned value is the result of the increment +*/ +NSPR_API(PRInt32) PR_AtomicIncrement(PRInt32 *val); + +/* +** FUNCTION: PR_AtomicDecrement +** DESCRIPTION: +** Atomically decrement a 32 bit value. +** INPUTS: +** val: a pointer to the value to decrement +** RETURN: +** the returned value is the result of the decrement +*/ +NSPR_API(PRInt32) PR_AtomicDecrement(PRInt32 *val); + +/* +** FUNCTION: PR_AtomicSet +** DESCRIPTION: +** Atomically set a 32 bit value. +** INPUTS: +** val: A pointer to a 32 bit value to be set +** newval: The newvalue to assign to val +** RETURN: +** Returns the prior value +*/ +NSPR_API(PRInt32) PR_AtomicSet(PRInt32 *val, PRInt32 newval); + +/* +** FUNCTION: PR_AtomicAdd +** DESCRIPTION: +** Atomically add a 32 bit value. +** INPUTS: +** ptr: a pointer to the value to increment +** val: value to be added +** RETURN: +** the returned value is the result of the addition +*/ +NSPR_API(PRInt32) PR_AtomicAdd(PRInt32 *ptr, PRInt32 val); + +/* +** LIFO linked-list (stack) +*/ +typedef struct PRStackElemStr PRStackElem; + +struct PRStackElemStr { + PRStackElem *prstk_elem_next; /* next pointer MUST be at offset 0; + assembly language code relies on this */ +}; + +typedef struct PRStackStr PRStack; + +/* +** FUNCTION: PR_CreateStack +** DESCRIPTION: +** Create a stack, a LIFO linked list +** INPUTS: +** stack_name: a pointer to string containing the name of the stack +** RETURN: +** A pointer to the created stack, if successful, else NULL. +*/ +NSPR_API(PRStack *) PR_CreateStack(const char *stack_name); + +/* +** FUNCTION: PR_StackPush +** DESCRIPTION: +** Push an element on the top of the stack +** INPUTS: +** stack: pointer to the stack +** stack_elem: pointer to the stack element +** RETURN: +** None +*/ +NSPR_API(void) PR_StackPush(PRStack *stack, PRStackElem *stack_elem); + +/* +** FUNCTION: PR_StackPop +** DESCRIPTION: +** Remove the element on the top of the stack +** INPUTS: +** stack: pointer to the stack +** RETURN: +** A pointer to the stack element removed from the top of the stack, +** if non-empty, +** else NULL +*/ +NSPR_API(PRStackElem *) PR_StackPop(PRStack *stack); + +/* +** FUNCTION: PR_DestroyStack +** DESCRIPTION: +** Destroy the stack +** INPUTS: +** stack: pointer to the stack +** RETURN: +** PR_SUCCESS - if successfully deleted +** PR_FAILURE - if the stack is not empty +** PR_GetError will return +** PR_INVALID_STATE_ERROR - stack is not empty +*/ +NSPR_API(PRStatus) PR_DestroyStack(PRStack *stack); + +PR_END_EXTERN_C + +#endif /* pratom_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prbit.h b/Src/nprt_plugin/gecko/1.8/win/include/prbit.h new file mode 100644 index 00000000..379971e8 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prbit.h @@ -0,0 +1,111 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prbit_h___ +#define prbit_h___ + +#include "prtypes.h" +PR_BEGIN_EXTERN_C + +/* +** A prbitmap_t is a long integer that can be used for bitmaps +*/ +typedef unsigned long prbitmap_t; + +#define PR_TEST_BIT(_map,_bit) \ + ((_map)[(_bit)>>PR_BITS_PER_LONG_LOG2] & (1L << ((_bit) & (PR_BITS_PER_LONG-1)))) +#define PR_SET_BIT(_map,_bit) \ + ((_map)[(_bit)>>PR_BITS_PER_LONG_LOG2] |= (1L << ((_bit) & (PR_BITS_PER_LONG-1)))) +#define PR_CLEAR_BIT(_map,_bit) \ + ((_map)[(_bit)>>PR_BITS_PER_LONG_LOG2] &= ~(1L << ((_bit) & (PR_BITS_PER_LONG-1)))) + +/* +** Compute the log of the least power of 2 greater than or equal to n +*/ +NSPR_API(PRIntn) PR_CeilingLog2(PRUint32 i); + +/* +** Compute the log of the greatest power of 2 less than or equal to n +*/ +NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i); + +/* +** Macro version of PR_CeilingLog2: Compute the log of the least power of +** 2 greater than or equal to _n. The result is returned in _log2. +*/ +#define PR_CEILING_LOG2(_log2,_n) \ + PR_BEGIN_MACRO \ + PRUint32 j_ = (PRUint32)(_n); \ + (_log2) = 0; \ + if ((j_) & ((j_)-1)) \ + (_log2) += 1; \ + if ((j_) >> 16) \ + (_log2) += 16, (j_) >>= 16; \ + if ((j_) >> 8) \ + (_log2) += 8, (j_) >>= 8; \ + if ((j_) >> 4) \ + (_log2) += 4, (j_) >>= 4; \ + if ((j_) >> 2) \ + (_log2) += 2, (j_) >>= 2; \ + if ((j_) >> 1) \ + (_log2) += 1; \ + PR_END_MACRO + +/* +** Macro version of PR_FloorLog2: Compute the log of the greatest power of +** 2 less than or equal to _n. The result is returned in _log2. +** +** This is equivalent to finding the highest set bit in the word. +*/ +#define PR_FLOOR_LOG2(_log2,_n) \ + PR_BEGIN_MACRO \ + PRUint32 j_ = (PRUint32)(_n); \ + (_log2) = 0; \ + if ((j_) >> 16) \ + (_log2) += 16, (j_) >>= 16; \ + if ((j_) >> 8) \ + (_log2) += 8, (j_) >>= 8; \ + if ((j_) >> 4) \ + (_log2) += 4, (j_) >>= 4; \ + if ((j_) >> 2) \ + (_log2) += 2, (j_) >>= 2; \ + if ((j_) >> 1) \ + (_log2) += 1; \ + PR_END_MACRO + +PR_END_EXTERN_C +#endif /* prbit_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prclist.h b/Src/nprt_plugin/gecko/1.8/win/include/prclist.h new file mode 100644 index 00000000..1680ac17 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prclist.h @@ -0,0 +1,140 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prclist_h___ +#define prclist_h___ + +#include "prtypes.h" + +typedef struct PRCListStr PRCList; + +/* +** Circular linked list +*/ +struct PRCListStr { + PRCList *next; + PRCList *prev; +}; + +/* +** Insert element "_e" into the list, before "_l". +*/ +#define PR_INSERT_BEFORE(_e,_l) \ + PR_BEGIN_MACRO \ + (_e)->next = (_l); \ + (_e)->prev = (_l)->prev; \ + (_l)->prev->next = (_e); \ + (_l)->prev = (_e); \ + PR_END_MACRO + +/* +** Insert element "_e" into the list, after "_l". +*/ +#define PR_INSERT_AFTER(_e,_l) \ + PR_BEGIN_MACRO \ + (_e)->next = (_l)->next; \ + (_e)->prev = (_l); \ + (_l)->next->prev = (_e); \ + (_l)->next = (_e); \ + PR_END_MACRO + +/* +** Return the element following element "_e" +*/ +#define PR_NEXT_LINK(_e) \ + ((_e)->next) +/* +** Return the element preceding element "_e" +*/ +#define PR_PREV_LINK(_e) \ + ((_e)->prev) + +/* +** Append an element "_e" to the end of the list "_l" +*/ +#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l) + +/* +** Insert an element "_e" at the head of the list "_l" +*/ +#define PR_INSERT_LINK(_e,_l) PR_INSERT_AFTER(_e,_l) + +/* Return the head/tail of the list */ +#define PR_LIST_HEAD(_l) (_l)->next +#define PR_LIST_TAIL(_l) (_l)->prev + +/* +** Remove the element "_e" from it's circular list. +*/ +#define PR_REMOVE_LINK(_e) \ + PR_BEGIN_MACRO \ + (_e)->prev->next = (_e)->next; \ + (_e)->next->prev = (_e)->prev; \ + PR_END_MACRO + +/* +** Remove the element "_e" from it's circular list. Also initializes the +** linkage. +*/ +#define PR_REMOVE_AND_INIT_LINK(_e) \ + PR_BEGIN_MACRO \ + (_e)->prev->next = (_e)->next; \ + (_e)->next->prev = (_e)->prev; \ + (_e)->next = (_e); \ + (_e)->prev = (_e); \ + PR_END_MACRO + +/* +** Return non-zero if the given circular list "_l" is empty, zero if the +** circular list is not empty +*/ +#define PR_CLIST_IS_EMPTY(_l) \ + ((_l)->next == (_l)) + +/* +** Initialize a circular list +*/ +#define PR_INIT_CLIST(_l) \ + PR_BEGIN_MACRO \ + (_l)->next = (_l); \ + (_l)->prev = (_l); \ + PR_END_MACRO + +#define PR_INIT_STATIC_CLIST(_l) \ + {(_l), (_l)} + +#endif /* prclist_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prcmon.h b/Src/nprt_plugin/gecko/1.8/win/include/prcmon.h new file mode 100644 index 00000000..f61cf56a --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prcmon.h @@ -0,0 +1,98 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prcmon_h___ +#define prcmon_h___ + +/* +** Interface to cached monitors. Cached monitors use an address to find a +** given PR monitor. In this way a monitor can be associated with another +** object without preallocating a monitor for all objects. +** +** A hash table is used to quickly map addresses to individual monitors +** and the system automatically grows the hash table as needed. +** +** Cache monitors are about 5 times slower to use than uncached monitors. +*/ +#include "prmon.h" +#include "prinrval.h" + +PR_BEGIN_EXTERN_C + +/** +** Like PR_EnterMonitor except use the "address" to find a monitor in the +** monitor cache. If successful, returns the PRMonitor now associated +** with "address". Note that you must PR_CExitMonitor the address to +** release the monitor cache entry (otherwise the monitor cache will fill +** up). This call will return NULL if the monitor cache needs to be +** expanded and the system is out of memory. +*/ +NSPR_API(PRMonitor*) PR_CEnterMonitor(void *address); + +/* +** Like PR_ExitMonitor except use the "address" to find a monitor in the +** monitor cache. +*/ +NSPR_API(PRStatus) PR_CExitMonitor(void *address); + +/* +** Like PR_Wait except use the "address" to find a monitor in the +** monitor cache. +*/ +NSPR_API(PRStatus) PR_CWait(void *address, PRIntervalTime timeout); + +/* +** Like PR_Notify except use the "address" to find a monitor in the +** monitor cache. +*/ +NSPR_API(PRStatus) PR_CNotify(void *address); + +/* +** Like PR_NotifyAll except use the "address" to find a monitor in the +** monitor cache. +*/ +NSPR_API(PRStatus) PR_CNotifyAll(void *address); + +/* +** Set a callback to be invoked each time a monitor is recycled from the cache +** freelist, with the monitor's cache-key passed in address. +*/ +NSPR_API(void) PR_CSetOnMonitorRecycle(void (PR_CALLBACK *callback)(void *address)); + +PR_END_EXTERN_C + +#endif /* prcmon_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prcountr.h b/Src/nprt_plugin/gecko/1.8/win/include/prcountr.h new file mode 100644 index 00000000..4b197e97 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prcountr.h @@ -0,0 +1,557 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prcountr_h___ +#define prcountr_h___ + +/*---------------------------------------------------------------------------- +** prcountr.h -- NSPR Instrumentation counters +** +** The NSPR Counter Feature provides a means to "count +** something." Counters can be dynamically defined, incremented, +** decremented, set, and deleted under application program +** control. +** +** The Counter Feature is intended to be used as instrumentation, +** not as operational data. If you need a counter for operational +** data, use native integral types. +** +** Counters are 32bit unsigned intergers. On overflow, a counter +** will wrap. No exception is recognized or reported. +** +** A counter can be dynamically created using a two level naming +** convention. A "handle" is returned when the counter is +** created. The counter can subsequently be addressed by its +** handle. An API is provided to get an existing counter's handle +** given the names with which it was originally created. +** Similarly, a counter's name can be retrieved given its handle. +** +** The counter naming convention is a two-level hierarchy. The +** QName is the higher level of the hierarchy; RName is the +** lower level. RNames can be thought of as existing within a +** QName. The same RName can exist within multiple QNames. QNames +** are unique. The NSPR Counter is not a near-zero overhead +** feature. Application designers should be aware of +** serialization issues when using the Counter API. Creating a +** counter locks a large asset, potentially causing a stall. This +** suggest that applications should create counters at component +** initialization, for example, and not create and destroy them +** willy-nilly. ... You have been warned. +** +** Incrementing and Adding to counters uses atomic operations. +** The performance of these operations will vary from platform +** to platform. On platforms where atomic operations are not +** supported the overhead may be substantial. +** +** When traversing the counter database with FindNext functions, +** the instantaneous values of any given counter is that at the +** moment of extraction. The state of the entire counter database +** may not be viewed as atomic. +** +** The counter interface may be disabled (No-Op'd) at compile +** time. When DEBUG is defined at compile time, the Counter +** Feature is compiled into NSPR and applications invoking it. +** When DEBUG is not defined, the counter macros compile to +** nothing. To force the Counter Feature to be compiled into an +** optimized build, define FORCE_NSPR_COUNTERS at compile time +** for both NSPR and the application intending to use it. +** +** Application designers should use the macro form of the Counter +** Feature methods to minimize performance impact in optimized +** builds. The macros normally compile to nothing on optimized +** builds. +** +** Application designers should be aware of the effects of +** debug and optimized build differences when using result of the +** Counter Feature macros in expressions. +** +** The Counter Feature is thread-safe and SMP safe. +** +** /lth. 09-Jun-1998. +*/ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* +** Opaque counter handle type. +** ... don't even think of looking in here. +** +*/ +typedef void * PRCounterHandle; + +#define PRCOUNTER_NAME_MAX 31 +#define PRCOUNTER_DESC_MAX 255 + + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_DEFINE_COUNTER() -- Define a PRCounterHandle +** +** DESCRIPTION: PR_DEFINE_COUNTER() is used to define a counter +** handle. +** +*/ +#define PR_DEFINE_COUNTER(name) PRCounterHandle name + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_INIT_COUNTER_HANDLE() -- Set the value of a PRCounterHandle +** +** DESCRIPTION: +** PR_INIT_COUNTER_HANDLE() sets the value of a PRCounterHandle +** to value. +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_INIT_COUNTER_HANDLE(handle,value)\ + (handle) = (PRCounterHandle)(value) +#else +#define PR_INIT_COUNTER_HANDLE(handle,value) +#endif + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_CreateCounter() -- Create a counter +** +** DESCRIPTION: PR_CreateCounter() creates a counter object and +** initializes it to zero. +** +** The macro form takes as its first argument the name of the +** PRCounterHandle to receive the handle returned from +** PR_CreateCounter(). +** +** INPUTS: +** qName: The QName for the counter object. The maximum length +** of qName is defined by PRCOUNTER_NAME_MAX +** +** rName: The RName for the counter object. The maximum length +** of qName is defined by PRCOUNTER_NAME_MAX +** +** descrioption: The description of the counter object. The +** maximum length of description is defined by +** PRCOUNTER_DESC_MAX. +** +** OUTPUTS: +** +** RETURNS: +** PRCounterHandle. +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_CREATE_COUNTER(handle,qName,rName,description)\ + (handle) = PR_CreateCounter((qName),(rName),(description)) +#else +#define PR_CREATE_COUNTER(handle,qName,rName,description) +#endif + +NSPR_API(PRCounterHandle) + PR_CreateCounter( + const char *qName, + const char *rName, + const char *description +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_DestroyCounter() -- Destroy a counter object. +** +** DESCRIPTION: PR_DestroyCounter() removes a counter and +** unregisters its handle from the counter database. +** +** INPUTS: +** handle: the PRCounterHandle of the counter to be destroyed. +** +** OUTPUTS: +** The counter is destroyed. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_DESTROY_COUNTER(handle) PR_DestroyCounter((handle)) +#else +#define PR_DESTROY_COUNTER(handle) +#endif + +NSPR_API(void) + PR_DestroyCounter( + PRCounterHandle handle +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_GetCounterHandleFromName() -- Retreive a +** counter's handle give its name. +** +** DESCRIPTION: PR_GetCounterHandleFromName() retreives a +** counter's handle from the counter database, given the name +** the counter was originally created with. +** +** INPUTS: +** qName: Counter's original QName. +** rName: Counter's original RName. +** +** OUTPUTS: +** +** RETURNS: +** PRCounterHandle or PRCounterError. +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_GET_COUNTER_HANDLE_FROM_NAME(handle,qName,rName)\ + (handle) = PR_GetCounterHandleFromName((qName),(rName)) +#else +#define PR_GET_COUNTER_HANDLE_FROM_NAME(handle,qName,rName) +#endif + +NSPR_API(PRCounterHandle) + PR_GetCounterHandleFromName( + const char *qName, + const char *rName +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_GetCounterNameFromHandle() -- Retreive a +** counter's name, given its handle. +** +** DESCRIPTION: PR_GetCounterNameFromHandle() retreives a +** counter's name given its handle. +** +** INPUTS: +** qName: Where to store a pointer to qName. +** rName: Where to store a pointer to rName. +** description: Where to store a pointer to description. +** +** OUTPUTS: Pointers to the Counter Feature's copies of the names +** used when the counters were created. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_GET_COUNTER_NAME_FROM_HANDLE(handle,qName,rName,description)\ + PR_GetCounterNameFromHandle((handle),(qName),(rName),(description)) +#else +#define PR_GET_COUNTER_NAME_FROM_HANDLE(handle,qName,rName,description ) +#endif + +NSPR_API(void) + PR_GetCounterNameFromHandle( + PRCounterHandle handle, + const char **qName, + const char **rName, + const char **description +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_IncrementCounter() -- Add one to the referenced +** counter. +** +** DESCRIPTION: Add one to the referenced counter. +** +** INPUTS: +** handle: The PRCounterHandle of the counter to be incremented +** +** OUTPUTS: The counter is incrementd. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_INCREMENT_COUNTER(handle) PR_IncrementCounter(handle) +#else +#define PR_INCREMENT_COUNTER(handle) +#endif + +NSPR_API(void) + PR_IncrementCounter( + PRCounterHandle handle +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_DecrementCounter() -- Subtract one from the +** referenced counter +** +** DESCRIPTION: Subtract one from the referenced counter. +** +** INPUTS: +** handle: The PRCounterHandle of the coutner to be +** decremented. +** +** OUTPUTS: the counter is decremented. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_DECREMENT_COUNTER(handle) PR_DecrementCounter(handle) +#else +#define PR_DECREMENT_COUNTER(handle) +#endif + +NSPR_API(void) + PR_DecrementCounter( + PRCounterHandle handle +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_AddToCounter() -- Add a value to a counter. +** +** DESCRIPTION: Add value to the counter referenced by handle. +** +** INPUTS: +** handle: the PRCounterHandle of the counter to be added to. +** +** value: the value to be added to the counter. +** +** OUTPUTS: new value for counter. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_ADD_TO_COUNTER(handle,value)\ + PR_AddToCounter((handle),(value)) +#else +#define PR_ADD_TO_COUNTER(handle,value) +#endif + +NSPR_API(void) + PR_AddToCounter( + PRCounterHandle handle, + PRUint32 value +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_SubtractFromCounter() -- A value is subtracted +** from a counter. +** +** DESCRIPTION: +** Subtract a value from a counter. +** +** INPUTS: +** handle: the PRCounterHandle of the counter to be subtracted +** from. +** +** value: the value to be subtracted from the counter. +** +** OUTPUTS: new value for counter +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_SUBTRACT_FROM_COUNTER(handle,value)\ + PR_SubtractFromCounter((handle),(value)) +#else +#define PR_SUBTRACT_FROM_COUNTER(handle,value) +#endif + +NSPR_API(void) + PR_SubtractFromCounter( + PRCounterHandle handle, + PRUint32 value +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_GetCounter() -- Retreive the value of a counter +** +** DESCRIPTION: +** Retreive the value of a counter. +** +** INPUTS: +** handle: the PR_CounterHandle of the counter to be retreived +** +** OUTPUTS: +** +** RETURNS: The value of the referenced counter +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_GET_COUNTER(counter,handle)\ + (counter) = PR_GetCounter((handle)) +#else +#define PR_GET_COUNTER(counter,handle) 0 +#endif + +NSPR_API(PRUint32) + PR_GetCounter( + PRCounterHandle handle +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_SetCounter() -- Replace the content of counter +** with value. +** +** DESCRIPTION: The contents of the referenced counter are +** replaced by value. +** +** INPUTS: +** handle: the PRCounterHandle of the counter whose contents +** are to be replaced. +** +** value: the new value of the counter. +** +** OUTPUTS: +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_SET_COUNTER(handle,value) PR_SetCounter((handle),(value)) +#else +#define PR_SET_COUNTER(handle,value) +#endif + +NSPR_API(void) + PR_SetCounter( + PRCounterHandle handle, + PRUint32 value +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_FindNextCounterQname() -- Retreive the next QName counter +** handle iterator +** +** DESCRIPTION: +** PR_FindNextCounterQname() retreives the first or next Qname +** the counter data base, depending on the value of handle. When +** handle is NULL, the function attempts to retreive the first +** QName handle in the database. When handle is a handle previosly +** retreived QName handle, then the function attempts to retreive +** the next QName handle. +** +** INPUTS: +** handle: PRCounterHandle or NULL. +** +** OUTPUTS: returned +** +** RETURNS: PRCounterHandle or NULL when no more QName counter +** handles are present. +** +** RESTRICTIONS: +** A concurrent PR_CreateCounter() or PR_DestroyCounter() may +** cause unpredictable results. +** +** A PRCounterHandle returned from this function may only be used +** in another PR_FindNextCounterQname() function call; other +** operations may cause unpredictable results. +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\ + (next) = PR_FindNextCounterQname((handle)) +#else +#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) NULL +#endif + +NSPR_API(PRCounterHandle) + PR_FindNextCounterQname( + PRCounterHandle handle +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_FindNextCounterRname() -- Retreive the next RName counter +** handle iterator +** +** DESCRIPTION: +** PR_FindNextCounterRname() retreives the first or next RNname +** handle from the counter data base, depending on the +** value of handle. When handle is NULL, the function attempts to +** retreive the first RName handle in the database. When handle is +** a handle previosly retreived RName handle, then the function +** attempts to retreive the next RName handle. +** +** INPUTS: +** handle: PRCounterHandle or NULL. +** qhandle: PRCounterHandle of a previously aquired via +** PR_FIND_NEXT_QNAME_HANDLE() +** +** OUTPUTS: returned +** +** RETURNS: PRCounterHandle or NULL when no more RName counter +** handles are present. +** +** RESTRICTIONS: +** A concurrent PR_CreateCounter() or PR_DestroyCounter() may +** cause unpredictable results. +** +** A PRCounterHandle returned from this function may only be used +** in another PR_FindNextCounterRname() function call; other +** operations may cause unpredictable results. +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) +#define PR_FIND_NEXT_COUNTER_RNAME(next,rhandle,qhandle)\ + (next) = PR_FindNextCounterRname((rhandle),(qhandle)) +#else +#define PR_FIND_NEXT_COUNTER_RNAME(next,rhandle,qhandle) +#endif + +NSPR_API(PRCounterHandle) + PR_FindNextCounterRname( + PRCounterHandle rhandle, + PRCounterHandle qhandle +); + +PR_END_EXTERN_C + +#endif /* prcountr_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prcpucfg.h b/Src/nprt_plugin/gecko/1.8/win/include/prcpucfg.h new file mode 100644 index 00000000..310fff89 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prcpucfg.h @@ -0,0 +1,200 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef nspr_cpucfg___ +#define nspr_cpucfg___ + +#ifndef XP_PC +#define XP_PC +#endif + +#ifndef WIN32 +#define WIN32 +#endif + +#ifndef WIN95 +#define WIN95 +#endif + +#define PR_AF_INET6 23 /* same as AF_INET6 */ + +#if defined(_M_IX86) || defined(_X86_) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 +#define PR_BYTES_PER_DOUBLE 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_WORD 32 +#define PR_BITS_PER_DWORD 64 +#define PR_BITS_PER_DOUBLE 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_WORD_LOG2 5 +#define PR_BITS_PER_DWORD_LOG2 6 +#define PR_BITS_PER_DOUBLE_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_WORD 4 +#define PR_ALIGN_OF_DWORD 8 +#define PR_ALIGN_OF_DOUBLE 4 +#define PR_ALIGN_OF_POINTER 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 2 + +#elif defined(_ALPHA_) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 4 + +#else /* defined(_M_IX86) || defined(_X86_) */ + +#error unknown processor architecture + +#endif /* defined(_M_IX86) || defined(_X86_) */ + +#define HAVE_LONG_LONG + +#ifndef NO_NSPR_10_SUPPORT + +#define BYTES_PER_BYTE PR_BYTES_PER_BYTE +#define BYTES_PER_SHORT PR_BYTES_PER_SHORT +#define BYTES_PER_INT PR_BYTES_PER_INT +#define BYTES_PER_INT64 PR_BYTES_PER_INT64 +#define BYTES_PER_LONG PR_BYTES_PER_LONG +#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT +#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE +#define BYTES_PER_WORD PR_BYTES_PER_WORD +#define BYTES_PER_DWORD PR_BYTES_PER_DWORD + +#define BITS_PER_BYTE PR_BITS_PER_BYTE +#define BITS_PER_SHORT PR_BITS_PER_SHORT +#define BITS_PER_INT PR_BITS_PER_INT +#define BITS_PER_INT64 PR_BITS_PER_INT64 +#define BITS_PER_LONG PR_BITS_PER_LONG +#define BITS_PER_FLOAT PR_BITS_PER_FLOAT +#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE +#define BITS_PER_WORD PR_BITS_PER_WORD + +#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 +#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 +#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 +#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 +#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 +#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 +#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 +#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 + +#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT +#define ALIGN_OF_INT PR_ALIGN_OF_INT +#define ALIGN_OF_LONG PR_ALIGN_OF_LONG +#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 +#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT +#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE +#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER +#define ALIGN_OF_WORD PR_ALIGN_OF_WORD + +#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 +#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 +#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 + +#endif /* NO_NSPR_10_SUPPORT */ + +#endif /* nspr_cpucfg___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prcvar.h b/Src/nprt_plugin/gecko/1.8/win/include/prcvar.h new file mode 100644 index 00000000..c6684937 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prcvar.h @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prcvar_h___ +#define prcvar_h___ + +#include "prlock.h" +#include "prinrval.h" + +PR_BEGIN_EXTERN_C + +typedef struct PRCondVar PRCondVar; + +/* +** Create a new condition variable. +** +** "lock" is the lock used to protect the condition variable. +** +** Condition variables are synchronization objects that threads can use +** to wait for some condition to occur. +** +** This may fail if memory is tight or if some operating system resource +** is low. In such cases, a NULL will be returned. +*/ +NSPR_API(PRCondVar*) PR_NewCondVar(PRLock *lock); + +/* +** Destroy a condition variable. There must be no thread +** waiting on the condvar. The caller is responsible for guaranteeing +** that the condvar is no longer in use. +** +*/ +NSPR_API(void) PR_DestroyCondVar(PRCondVar *cvar); + +/* +** The thread that waits on a condition is blocked in a "waiting on +** condition" state until another thread notifies the condition or a +** caller specified amount of time expires. The lock associated with +** the condition variable will be released, which must have be held +** prior to the call to wait. +** +** Logically a notified thread is moved from the "waiting on condition" +** state and made "ready." When scheduled, it will attempt to reacquire +** the lock that it held when wait was called. +** +** The timeout has two well known values, PR_INTERVAL_NO_TIMEOUT and +** PR_INTERVAL_NO_WAIT. The former value requires that a condition be +** notified (or the thread interrupted) before it will resume from the +** wait. If the timeout has a value of PR_INTERVAL_NO_WAIT, the effect +** is to release the lock, possibly causing a rescheduling within the +** runtime, then immediately attempting to reacquire the lock and resume. +** +** Any other value for timeout will cause the thread to be rescheduled +** either due to explicit notification or an expired interval. The latter +** must be determined by treating time as one part of the monitored data +** being protected by the lock and tested explicitly for an expired +** interval. +** +** Returns PR_FAILURE if the caller has not locked the lock associated +** with the condition variable or the thread was interrupted (PR_Interrupt()). +** The particular reason can be extracted with PR_GetError(). +*/ +NSPR_API(PRStatus) PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout); + +/* +** Notify ONE thread that is currently waiting on 'cvar'. Which thread is +** dependent on the implementation of the runtime. Common sense would dictate +** that all threads waiting on a single condition have identical semantics, +** therefore which one gets notified is not significant. +** +** The calling thead must hold the lock that protects the condition, as +** well as the invariants that are tightly bound to the condition, when +** notify is called. +** +** Returns PR_FAILURE if the caller has not locked the lock associated +** with the condition variable. +*/ +NSPR_API(PRStatus) PR_NotifyCondVar(PRCondVar *cvar); + +/* +** Notify all of the threads waiting on the condition variable. The order +** that the threads are notified is indeterminant. The lock that protects +** the condition must be held. +** +** Returns PR_FAILURE if the caller has not locked the lock associated +** with the condition variable. +*/ +NSPR_API(PRStatus) PR_NotifyAllCondVar(PRCondVar *cvar); + +PR_END_EXTERN_C + +#endif /* prcvar_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prdtoa.h b/Src/nprt_plugin/gecko/1.8/win/include/prdtoa.h new file mode 100644 index 00000000..54e8c34f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prdtoa.h @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prdtoa_h___ +#define prdtoa_h___ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* +** PR_strtod() returns as a double-precision floating-point number +** the value represented by the character string pointed to by +** s00. The string is scanned up to the first unrecognized +** character. +**a +** If the value of se is not (char **)NULL, a pointer to +** the character terminating the scan is returned in the location pointed +** to by se. If no number can be formed, se is set to s00, and +** zero is returned. +*/ +#if defined(HAVE_WATCOM_BUG_1) +/* this is a hack to circumvent a bug in the Watcom C/C++ 11.0 compiler +** When Watcom fixes the bug, remove the special case for Win16 +*/ +PRFloat64 __pascal __loadds __export +#else +NSPR_API(PRFloat64) +#endif +PR_strtod(const char *s00, char **se); + +/* +** PR_cnvtf() +** conversion routines for floating point +** prcsn - number of digits of precision to generate floating +** point value. +*/ +NSPR_API(void) PR_cnvtf(char *buf, PRIntn bufsz, PRIntn prcsn, PRFloat64 fval); + +/* +** PR_dtoa() converts double to a string. +** +** ARGUMENTS: +** If rve is not null, *rve is set to point to the end of the return value. +** If d is +-Infinity or NaN, then *decpt is set to 9999. +** +** mode: +** 0 ==> shortest string that yields d when read in +** and rounded to nearest. +*/ +NSPR_API(PRStatus) PR_dtoa(PRFloat64 d, PRIntn mode, PRIntn ndigits, + PRIntn *decpt, PRIntn *sign, char **rve, char *buf, PRSize bufsize); + +PR_END_EXTERN_C + +#endif /* prdtoa_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prenv.h b/Src/nprt_plugin/gecko/1.8/win/include/prenv.h new file mode 100644 index 00000000..2cae7d79 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prenv.h @@ -0,0 +1,157 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prenv_h___ +#define prenv_h___ + +#include "prtypes.h" + +/*******************************************************************************/ +/*******************************************************************************/ +/****************** THESE FUNCTIONS MAY NOT BE THREAD SAFE *********************/ +/*******************************************************************************/ +/*******************************************************************************/ + +PR_BEGIN_EXTERN_C + +/* +** PR_GetEnv() -- Retrieve value of environment variable +** +** Description: +** PR_GetEnv() is modeled on Unix getenv(). +** +** +** Inputs: +** var -- The name of the environment variable +** +** Returns: +** The value of the environment variable 'var' or NULL if +** the variable is undefined. +** +** Restrictions: +** You'd think that a POSIX getenv(), putenv() would be +** consistently implemented everywhere. Surprise! It is not. On +** some platforms, a putenv() where the argument is of +** the form "name" causes the named environment variable to +** be un-set; that is: a subsequent getenv() returns NULL. On +** other platforms, the putenv() fails, on others, it is a +** no-op. Similarly, a putenv() where the argument is of the +** form "name=" causes the named environment variable to be +** un-set; a subsequent call to getenv() returns NULL. On +** other platforms, a subsequent call to getenv() returns a +** pointer to a null-string (a byte of zero). +** +** PR_GetEnv(), PR_SetEnv() provide a consistent behavior +** across all supported platforms. There are, however, some +** restrictions and some practices you must use to achieve +** consistent results everywhere. +** +** When manipulating the environment there is no way to un-set +** an environment variable across all platforms. We suggest +** you interpret the return of a pointer to null-string to +** mean the same as a return of NULL from PR_GetEnv(). +** +** A call to PR_SetEnv() where the parameter is of the form +** "name" will return PR_FAILURE; the environment remains +** unchanged. A call to PR_SetEnv() where the parameter is +** of the form "name=" may un-set the envrionment variable on +** some platforms; on others it may set the value of the +** environment variable to the null-string. +** +** For example, to test for NULL return or return of the +** null-string from PR_GetEnv(), use the following code +** fragment: +** +** char *val = PR_GetEnv("foo"); +** if ((NULL == val) || ('\0' == *val)) { +** ... interpret this as un-set ... +** } +** +** The caller must ensure that the string passed +** to PR_SetEnv() is persistent. That is: The string should +** not be on the stack, where it can be overwritten +** on return from the function calling PR_SetEnv(). +** Similarly, the string passed to PR_SetEnv() must not be +** overwritten by other actions of the process. ... Some +** platforms use the string by reference rather than copying +** it into the environment space. ... You have been warned! +** +** Use of platform-native functions that manipulate the +** environment (getenv(), putenv(), +** SetEnvironmentVariable(), etc.) must not be used with +** NSPR's similar functions. The platform-native functions +** may not be thread safe and/or may operate on different +** conceptual environment space than that operated upon by +** NSPR's functions or other environment manipulating +** functions on the same platform. (!) +** +*/ +NSPR_API(char*) PR_GetEnv(const char *var); + +/* +** PR_SetEnv() -- set, unset or change an environment variable +** +** Description: +** PR_SetEnv() is modeled on the Unix putenv() function. +** +** Inputs: +** string -- pointer to a caller supplied +** constant, persistent string of the form name=value. Where +** name is the name of the environment variable to be set or +** changed; value is the value assigned to the variable. +** +** Returns: +** PRStatus. +** +** Restrictions: +** See the Restrictions documented in the description of +** PR_GetEnv() in this header file. +** +** +*/ +NSPR_API(PRStatus) PR_SetEnv(const char *string); + +/* +** DEPRECATED. Use PR_SetEnv() instead. +*/ +#ifdef XP_MAC +NSPR_API(PRIntn) PR_PutEnv(const char *string); +#endif + +PR_END_EXTERN_C + +#endif /* prenv_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prerr.h b/Src/nprt_plugin/gecko/1.8/win/include/prerr.h new file mode 100644 index 00000000..79294847 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prerr.h @@ -0,0 +1,278 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prerr_h___ +#define prerr_h___ + +/* + * + * prerr.h + * This file is automatically generated; please do not edit it. + */ + +/* Memory allocation attempt failed */ +#define PR_OUT_OF_MEMORY_ERROR (-6000L) + +/* Invalid file descriptor */ +#define PR_BAD_DESCRIPTOR_ERROR (-5999L) + +/* The operation would have blocked */ +#define PR_WOULD_BLOCK_ERROR (-5998L) + +/* Invalid memory address argument */ +#define PR_ACCESS_FAULT_ERROR (-5997L) + +/* Invalid function for file type */ +#define PR_INVALID_METHOD_ERROR (-5996L) + +/* Invalid memory address argument */ +#define PR_ILLEGAL_ACCESS_ERROR (-5995L) + +/* Some unknown error has occurred */ +#define PR_UNKNOWN_ERROR (-5994L) + +/* Operation interrupted by another thread */ +#define PR_PENDING_INTERRUPT_ERROR (-5993L) + +/* function not implemented */ +#define PR_NOT_IMPLEMENTED_ERROR (-5992L) + +/* I/O function error */ +#define PR_IO_ERROR (-5991L) + +/* I/O operation timed out */ +#define PR_IO_TIMEOUT_ERROR (-5990L) + +/* I/O operation on busy file descriptor */ +#define PR_IO_PENDING_ERROR (-5989L) + +/* The directory could not be opened */ +#define PR_DIRECTORY_OPEN_ERROR (-5988L) + +/* Invalid function argument */ +#define PR_INVALID_ARGUMENT_ERROR (-5987L) + +/* Network address not available (in use?) */ +#define PR_ADDRESS_NOT_AVAILABLE_ERROR (-5986L) + +/* Network address type not supported */ +#define PR_ADDRESS_NOT_SUPPORTED_ERROR (-5985L) + +/* Already connected */ +#define PR_IS_CONNECTED_ERROR (-5984L) + +/* Network address is invalid */ +#define PR_BAD_ADDRESS_ERROR (-5983L) + +/* Local Network address is in use */ +#define PR_ADDRESS_IN_USE_ERROR (-5982L) + +/* Connection refused by peer */ +#define PR_CONNECT_REFUSED_ERROR (-5981L) + +/* Network address is presently unreachable */ +#define PR_NETWORK_UNREACHABLE_ERROR (-5980L) + +/* Connection attempt timed out */ +#define PR_CONNECT_TIMEOUT_ERROR (-5979L) + +/* Network file descriptor is not connected */ +#define PR_NOT_CONNECTED_ERROR (-5978L) + +/* Failure to load dynamic library */ +#define PR_LOAD_LIBRARY_ERROR (-5977L) + +/* Failure to unload dynamic library */ +#define PR_UNLOAD_LIBRARY_ERROR (-5976L) + +/* Symbol not found in any of the loaded dynamic libraries */ +#define PR_FIND_SYMBOL_ERROR (-5975L) + +/* Insufficient system resources */ +#define PR_INSUFFICIENT_RESOURCES_ERROR (-5974L) + +/* A directory lookup on a network address has failed */ +#define PR_DIRECTORY_LOOKUP_ERROR (-5973L) + +/* Attempt to access a TPD key that is out of range */ +#define PR_TPD_RANGE_ERROR (-5972L) + +/* Process open FD table is full */ +#define PR_PROC_DESC_TABLE_FULL_ERROR (-5971L) + +/* System open FD table is full */ +#define PR_SYS_DESC_TABLE_FULL_ERROR (-5970L) + +/* Network operation attempted on non-network file descriptor */ +#define PR_NOT_SOCKET_ERROR (-5969L) + +/* TCP-specific function attempted on a non-TCP file descriptor */ +#define PR_NOT_TCP_SOCKET_ERROR (-5968L) + +/* TCP file descriptor is already bound */ +#define PR_SOCKET_ADDRESS_IS_BOUND_ERROR (-5967L) + +/* Access Denied */ +#define PR_NO_ACCESS_RIGHTS_ERROR (-5966L) + +/* The requested operation is not supported by the platform */ +#define PR_OPERATION_NOT_SUPPORTED_ERROR (-5965L) + +/* The host operating system does not support the protocol requested */ +#define PR_PROTOCOL_NOT_SUPPORTED_ERROR (-5964L) + +/* Access to the remote file has been severed */ +#define PR_REMOTE_FILE_ERROR (-5963L) + +/* The value requested is too large to be stored in the data buffer provided */ +#define PR_BUFFER_OVERFLOW_ERROR (-5962L) + +/* TCP connection reset by peer */ +#define PR_CONNECT_RESET_ERROR (-5961L) + +/* Unused */ +#define PR_RANGE_ERROR (-5960L) + +/* The operation would have deadlocked */ +#define PR_DEADLOCK_ERROR (-5959L) + +/* The file is already locked */ +#define PR_FILE_IS_LOCKED_ERROR (-5958L) + +/* Write would result in file larger than the system allows */ +#define PR_FILE_TOO_BIG_ERROR (-5957L) + +/* The device for storing the file is full */ +#define PR_NO_DEVICE_SPACE_ERROR (-5956L) + +/* Unused */ +#define PR_PIPE_ERROR (-5955L) + +/* Unused */ +#define PR_NO_SEEK_DEVICE_ERROR (-5954L) + +/* Cannot perform a normal file operation on a directory */ +#define PR_IS_DIRECTORY_ERROR (-5953L) + +/* Symbolic link loop */ +#define PR_LOOP_ERROR (-5952L) + +/* File name is too long */ +#define PR_NAME_TOO_LONG_ERROR (-5951L) + +/* File not found */ +#define PR_FILE_NOT_FOUND_ERROR (-5950L) + +/* Cannot perform directory operation on a normal file */ +#define PR_NOT_DIRECTORY_ERROR (-5949L) + +/* Cannot write to a read-only file system */ +#define PR_READ_ONLY_FILESYSTEM_ERROR (-5948L) + +/* Cannot delete a directory that is not empty */ +#define PR_DIRECTORY_NOT_EMPTY_ERROR (-5947L) + +/* Cannot delete or rename a file object while the file system is busy */ +#define PR_FILESYSTEM_MOUNTED_ERROR (-5946L) + +/* Cannot rename a file to a file system on another device */ +#define PR_NOT_SAME_DEVICE_ERROR (-5945L) + +/* The directory object in the file system is corrupted */ +#define PR_DIRECTORY_CORRUPTED_ERROR (-5944L) + +/* Cannot create or rename a filename that already exists */ +#define PR_FILE_EXISTS_ERROR (-5943L) + +/* Directory is full. No additional filenames may be added */ +#define PR_MAX_DIRECTORY_ENTRIES_ERROR (-5942L) + +/* The required device was in an invalid state */ +#define PR_INVALID_DEVICE_STATE_ERROR (-5941L) + +/* The device is locked */ +#define PR_DEVICE_IS_LOCKED_ERROR (-5940L) + +/* No more entries in the directory */ +#define PR_NO_MORE_FILES_ERROR (-5939L) + +/* Encountered end of file */ +#define PR_END_OF_FILE_ERROR (-5938L) + +/* Seek error */ +#define PR_FILE_SEEK_ERROR (-5937L) + +/* The file is busy */ +#define PR_FILE_IS_BUSY_ERROR (-5936L) + +/* The I/O operation was aborted */ +#define PR_OPERATION_ABORTED_ERROR (-5935L) + +/* Operation is still in progress (probably a non-blocking connect) */ +#define PR_IN_PROGRESS_ERROR (-5934L) + +/* Operation has already been initiated (probably a non-blocking connect) */ +#define PR_ALREADY_INITIATED_ERROR (-5933L) + +/* The wait group is empty */ +#define PR_GROUP_EMPTY_ERROR (-5932L) + +/* Object state improper for request */ +#define PR_INVALID_STATE_ERROR (-5931L) + +/* Network is down */ +#define PR_NETWORK_DOWN_ERROR (-5930L) + +/* Socket shutdown */ +#define PR_SOCKET_SHUTDOWN_ERROR (-5929L) + +/* Connection aborted */ +#define PR_CONNECT_ABORTED_ERROR (-5928L) + +/* Host is unreachable */ +#define PR_HOST_UNREACHABLE_ERROR (-5927L) + +/* The library is not loaded */ +#define PR_LIBRARY_NOT_LOADED_ERROR (-5926L) + +/* Placeholder for the end of the list */ +#define PR_MAX_ERROR (-5925L) + +extern void nspr_InitializePRErrorTable(void); +#define ERROR_TABLE_BASE_nspr (-6000L) + +#endif /* prerr_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prerror.h b/Src/nprt_plugin/gecko/1.8/win/include/prerror.h new file mode 100644 index 00000000..cf94872e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prerror.h @@ -0,0 +1,326 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prerror_h___ +#define prerror_h___ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +typedef PRInt32 PRErrorCode; + +#define PR_NSPR_ERROR_BASE -6000 + +#include "prerr.h" + +/* +** Set error will preserve an error condition within a thread context. +** The values stored are the NSPR (platform independent) translation of +** the error. Also, if available, the platform specific oserror is stored. +** If there is no appropriate OS error number, a zero my be supplied. +*/ +NSPR_API(void) PR_SetError(PRErrorCode errorCode, PRInt32 oserr); + +/* +** The text value specified may be NULL. If it is not NULL and the text length +** is zero, the string is assumed to be a null terminated C string. Otherwise +** the text is assumed to be the length specified and possibly include NULL +** characters (e.g., a multi-national string). +** +** The text will be copied into to thread structure and remain there +** until the next call to PR_SetError. +*/ +NSPR_API(void) PR_SetErrorText( + PRIntn textLength, const char *text); + +/* +** Return the current threads last set error code. +*/ +NSPR_API(PRErrorCode) PR_GetError(void); + +/* +** Return the current threads last set os error code. This is used for +** machine specific code that desires the underlying os error. +*/ +NSPR_API(PRInt32) PR_GetOSError(void); + +/* +** Get the length of the error text. If a zero is returned, then there +** is no text. Otherwise, the value returned is sufficient to contain +** the error text currently available. +*/ +NSPR_API(PRInt32) PR_GetErrorTextLength(void); + +/* +** Copy the current threads current error text. Then actual number of bytes +** copied is returned as the result. If the result is zero, the 'text' area +** is unaffected. +*/ +NSPR_API(PRInt32) PR_GetErrorText(char *text); + + +/* +Copyright (C) 1987, 1988 Student Information Processing Board of the +Massachusetts Institute of Technology. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of M.I.T. and the M.I.T. S.I.P.B. not be +used in advertising or publicity pertaining to distribution of the software +without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B. +make no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. +*/ + + +/* + * NOTE: + * The interfaces for error-code-translation described in the rest of + * this file are preliminary in the 3.1 release of nspr and are subject + * to change in future releases. + */ + +/* +** Description: Localizable error code to string function. +** +** +** NSPR provides a mechanism for converting an error code to a +** descriptive string, in a caller-specified language. +** +** Error codes themselves are 32 bit (signed) integers. Typically, +** the high order 24 bits are an identifier of which error table the +** error code is from, and the low order 8 bits are a sequential error +** number within the table. NSPR supports error tables whose first +** error code is not a multiple of 256, such error code assignments +** should be avoided when possible. +** +** Error table 0 is defined to match the UNIX system call error table +** (sys_errlist); this allows errno values to be used directly in the +** library. Other error table numbers are typically formed by +** compacting together the first four characters of the error table +** name. The mapping between characters in the name and numeric +** values in the error code are defined in a system-independent +** fashion, so that two systems that can pass integral values between +** them can reliably pass error codes without loss of meaning; this +** should work even if the character sets used are not the +** same. (However, if this is to be done, error table 0 should be +** avoided, since the local system call error tables may differ.) +** +** Libraries defining error codes need only provide a table mapping +** error code numbers to names and default English descriptions, +** calling a routine to install the table, making it ``known'' to NSPR +** library. Once installed, a table may not be removed. Any error +** code the library generates can be converted to the corresponding +** error message. There is also a default format for error codes +** accidentally returned before making the table known, which is of +** the form "unknown code foo 32", where "foo" would be the name of +** the table. +** +** Normally, the error code conversion routine only supports the +** languages "i-default" and "en", returning the error-table-provided +** English description for both languages. The application may +** provide a localization plugin, allowing support for additional +** languages. +** +**/ + +/**********************************************************************/ +/************************* TYPES AND CONSTANTS ************************/ +/**********************************************************************/ + +/* + * PRLanguageCode -- + * + * NSPR represents a language code as a non-negative integer. + * Languages 0 is always "i-default" the language you get without + * explicit negotiation. Language 1 is always "en", English + * which has been explicitly negotiated. Additional language + * codes are defined by an application-provided localization plugin. + */ +typedef PRUint32 PRLanguageCode; +#define PR_LANGUAGE_I_DEFAULT 0 /* i-default, the default language */ +#define PR_LANGUAGE_EN 1 /* English, explicitly negotiated */ + +/* + * struct PRErrorMessage -- + * + * An error message in an error table. + */ +struct PRErrorMessage { + const char * name; /* Macro name for error */ + const char * en_text; /* Default English text */ +}; + +/* + * struct PRErrorTable -- + * + * An error table, provided by a library. + */ +struct PRErrorTable { + const struct PRErrorMessage * msgs; /* Array of error information */ + const char *name; /* Name of error table source */ + PRErrorCode base; /* Error code for first error in table */ + int n_msgs; /* Number of codes in table */ +}; + +/* + * struct PRErrorCallbackPrivate -- + * + * A private structure for the localization plugin + */ +struct PRErrorCallbackPrivate; + +/* + * struct PRErrorCallbackTablePrivate -- + * + * A data structure under which the localization plugin may store information, + * associated with an error table, that is private to itself. + */ +struct PRErrorCallbackTablePrivate; + +/* + * PRErrorCallbackLookupFn -- + * + * A function of PRErrorCallbackLookupFn type is a localization + * plugin callback which converts an error code into a description + * in the requested language. The callback is provided the + * appropriate error table, private data for the plugin and the table. + * The callback returns the appropriate UTF-8 encoded description, or NULL + * if no description can be found. + */ +typedef const char * +PRErrorCallbackLookupFn(PRErrorCode code, PRLanguageCode language, + const struct PRErrorTable *table, + struct PRErrorCallbackPrivate *cb_private, + struct PRErrorCallbackTablePrivate *table_private); + +/* + * PRErrorCallbackNewTableFn -- + * + * A function PRErrorCallbackNewTableFn type is a localization plugin + * callback which is called once with each error table registered + * with NSPR. The callback is provided with the error table and + * the plugin's private structure. The callback returns any table private + * data it wishes to associate with the error table. Does not need to be thread + * safe. + */ +typedef struct PRErrorCallbackTablePrivate * +PRErrorCallbackNewTableFn(const struct PRErrorTable *table, + struct PRErrorCallbackPrivate *cb_private); + +/**********************************************************************/ +/****************************** FUNCTIONS *****************************/ +/**********************************************************************/ + +/*********************************************************************** +** FUNCTION: PR_ErrorToString +** DESCRIPTION: +** Returns the UTF-8 message for an error code in +** the requested language. May return the message +** in the default language if a translation in the requested +** language is not available. The returned string is +** valid for the duration of the process. Never returns NULL. +** +***********************************************************************/ +NSPR_API(const char *) PR_ErrorToString(PRErrorCode code, + PRLanguageCode language); + + +/*********************************************************************** +** FUNCTION: PR_ErrorToName +** DESCRIPTION: +** Returns the macro name for an error code, or NULL +** if the error code is not known. The returned string is +** valid for the duration of the process. +** +** Does not work for error table 0, the system error codes. +** +***********************************************************************/ +NSPR_API(const char *) PR_ErrorToName(PRErrorCode code); + + +/*********************************************************************** +** FUNCTION: PR_ErrorLanguages +** DESCRIPTION: +** Returns the RFC 1766 language tags for the language +** codes PR_ErrorToString() supports. The returned array is valid +** for the duration of the process. Never returns NULL. The first +** item in the returned array is the language tag for PRLanguageCode 0, +** the second is for PRLanguageCode 1, and so on. The array is terminated +** with a null pointer. +** +***********************************************************************/ +NSPR_API(const char * const *) PR_ErrorLanguages(void); + + +/*********************************************************************** +** FUNCTION: PR_ErrorInstallTable +** DESCRIPTION: +** Registers an error table with NSPR. Must be done exactly once per +** table. Memory pointed to by `table' must remain valid for the life +** of the process. +** +** NOT THREAD SAFE! +** +***********************************************************************/ +NSPR_API(PRErrorCode) PR_ErrorInstallTable(const struct PRErrorTable *table); + + +/*********************************************************************** +** FUNCTION: PR_ErrorInstallCallback +** DESCRIPTION: +** Registers an error localization plugin with NSPR. May be called +** at most one time. `languages' contains the language codes supported +** by this plugin. Languages 0 and 1 must be "i-default" and "en" +** respectively. `lookup' and `newtable' contain pointers to +** the plugin callback functions. `cb_private' contains any information +** private to the plugin functions. +** +** NOT THREAD SAFE! +** +***********************************************************************/ +NSPR_API(void) PR_ErrorInstallCallback(const char * const * languages, + PRErrorCallbackLookupFn *lookup, + PRErrorCallbackNewTableFn *newtable, + struct PRErrorCallbackPrivate *cb_private); + +PR_END_EXTERN_C + +#endif /* prerror_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prinet.h b/Src/nprt_plugin/gecko/1.8/win/include/prinet.h new file mode 100644 index 00000000..2c733b0b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prinet.h @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* + * File: prinet.h + * Description: + * Header file used to find the system header files for socket support. + * This file serves the following purposes: + * - A cross-platform, "get-everything" socket header file. On + * Unix, socket support is scattered in several header files, + * while Windows and Mac have a "get-everything" socket header + * file. + * - NSPR needs the following macro definitions and function + * prototype declarations from these header files: + * AF_INET + * INADDR_ANY, INADDR_LOOPBACK, INADDR_BROADCAST + * ntohl(), ntohs(), htonl(), ntons(). + * NSPR does not define its own versions of these macros and + * functions. It simply uses the native versions, which have + * the same names on all supported platforms. + * This file is intended to be included by nspr20 public header + * files, such as prio.h. One should not include this file directly. + */ + +#ifndef prinet_h__ +#define prinet_h__ + +#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS) +#ifdef LINUX +#undef __STRICT_ANSI__ +#define __STRICT_ANSI__ +#endif +#include <sys/types.h> +#include <sys/socket.h> /* AF_INET */ +#include <netinet/in.h> /* INADDR_ANY, ..., ntohl(), ... */ +#ifdef XP_OS2 +#include <sys/ioctl.h> +#endif +#ifdef XP_UNIX +#ifdef AIX +/* + * On AIX 4.3, the header <arpa/inet.h> refers to struct + * ether_addr and struct sockaddr_dl that are not declared. + * The following struct declarations eliminate the compiler + * warnings. + */ +struct ether_addr; +struct sockaddr_dl; +#endif /* AIX */ +#include <arpa/inet.h> +#endif /* XP_UNIX */ +#include <netdb.h> + +#if defined(FREEBSD) || defined(BSDI) || defined(QNX) +#include <rpc/types.h> /* the only place that defines INADDR_LOOPBACK */ +#endif + +/* + * OS/2 hack. For some reason INADDR_LOOPBACK is not defined in the + * socket headers. + */ +#if defined(OS2) && !defined(INADDR_LOOPBACK) +#define INADDR_LOOPBACK 0x7f000001 +#endif + +/* + * Prototypes of ntohl() etc. are declared in <machine/endian.h> + * on these platforms. + */ +#if defined(BSDI) || defined(OSF1) +#include <machine/endian.h> +#endif + +#elif defined(WIN32) + +/* Do not include any system header files. */ + +#elif defined(WIN16) + +#include <winsock.h> + +#elif defined(XP_MAC) + +#include "macsocket.h" + +#else + +#error Unknown platform + +#endif + +#endif /* prinet_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prinit.h b/Src/nprt_plugin/gecko/1.8/win/include/prinit.h new file mode 100644 index 00000000..029cfccb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prinit.h @@ -0,0 +1,242 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prinit_h___ +#define prinit_h___ + +#include "prthread.h" +#include "prtypes.h" +#include "prwin16.h" +#include <stdio.h> + +PR_BEGIN_EXTERN_C + +/************************************************************************/ +/**************************IDENTITY AND VERSIONING***********************/ +/************************************************************************/ + +/* +** NSPR's name, this should persist until at least the turn of the +** century. +*/ +#define PR_NAME "NSPR" + +/* +** NSPR's version is used to determine the likelihood that the version you +** used to build your component is anywhere close to being compatible with +** what is in the underlying library. +** +** The format of the version string is +** "<major version>.<minor version>[.<patch level>] [<Beta>]" +*/ +#define PR_VERSION "4.6.1" +#define PR_VMAJOR 4 +#define PR_VMINOR 6 +#define PR_VPATCH 1 +#define PR_BETA PR_FALSE + +/* +** PRVersionCheck +** +** The basic signature of the function that is called to provide version +** checking. The result will be a boolean that indicates the likelihood +** that the underling library will perform as the caller expects. +** +** The only argument is a string, which should be the verson identifier +** of the library in question. That string will be compared against an +** equivalent string that represents the actual build version of the +** exporting library. +** +** The result will be the logical union of the directly called library +** and all dependent libraries. +*/ + +typedef PRBool (*PRVersionCheck)(const char*); + +/* +** PR_VersionCheck +** +** NSPR's existance proof of the version check function. +** +** Note that NSPR has no cooperating dependencies. +*/ + +NSPR_API(PRBool) PR_VersionCheck(const char *importedVersion); + + +/************************************************************************/ +/*******************************INITIALIZATION***************************/ +/************************************************************************/ + +/* +** Initialize the runtime. Attach a thread object to the currently +** executing native thread of type "type". +** +** The specificaiton of 'maxPTDs' is ignored. +*/ +NSPR_API(void) PR_Init( + PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs); + +/* +** And alternate form of initialization, one that may become the default if +** not the only mechanism, provides a method to get the NSPR runtime init- +** ialized and place NSPR between the caller and the runtime library. This +** allows main() to be treated as any other thread root function, signalling +** its compeletion by returning and allowing the runtime to coordinate the +** completion of the other threads of the runtime. +** +** The priority of the main (or primordial) thread will be PR_PRIORITY_NORMAL. +** The thread may adjust its own priority by using PR_SetPriority(), though +** at this time the support for priorities is somewhat weak. +** +** The specificaiton of 'maxPTDs' is ignored. +** +** The value returned by PR_Initialize is the value returned from the root +** function, 'prmain'. +*/ + +typedef PRIntn (PR_CALLBACK *PRPrimordialFn)(PRIntn argc, char **argv); + +NSPR_API(PRIntn) PR_Initialize( + PRPrimordialFn prmain, PRIntn argc, char **argv, PRUintn maxPTDs); + +/* +** Return PR_TRUE if PR_Init has already been called. +*/ +NSPR_API(PRBool) PR_Initialized(void); + +/* + * Perform a graceful shutdown of NSPR. PR_Cleanup() may be called by + * the primordial thread near the end of the main() function. + * + * PR_Cleanup() attempts to synchronize the natural termination of + * process. It does that by blocking the caller, if and only if it is + * the primordial thread, until the number of user threads has dropped + * to zero. When the primordial thread returns from main(), the process + * will immediately and silently exit. That is, it will (if necessary) + * forcibly terminate any existing threads and exit without significant + * blocking and there will be no error messages or core files. + * + * PR_Cleanup() returns PR_SUCCESS if NSPR is successfully shutdown, + * or PR_FAILURE if the calling thread of this function is not the + * primordial thread. + */ +NSPR_API(PRStatus) PR_Cleanup(void); + +/* +** Disable Interrupts +** Disables timer signals used for pre-emptive scheduling. +*/ +NSPR_API(void) PR_DisableClockInterrupts(void); + +/* +** Enables Interrupts +** Enables timer signals used for pre-emptive scheduling. +*/ +NSPR_API(void) PR_EnableClockInterrupts(void); + +/* +** Block Interrupts +** Blocks the timer signal used for pre-emptive scheduling +*/ +NSPR_API(void) PR_BlockClockInterrupts(void); + +/* +** Unblock Interrupts +** Unblocks the timer signal used for pre-emptive scheduling +*/ +NSPR_API(void) PR_UnblockClockInterrupts(void); + +/* +** Create extra virtual processor threads. Generally used with MP systems. +*/ +NSPR_API(void) PR_SetConcurrency(PRUintn numCPUs); + +/* +** Control the method and size of the file descriptor (PRFileDesc*) +** cache used by the runtime. Setting 'high' to zero is for performance, +** any other value probably for debugging (see memo on FD caching). +*/ +NSPR_API(PRStatus) PR_SetFDCacheSize(PRIntn low, PRIntn high); + +/* + * Cause an immediate, nongraceful, forced termination of the process. + * It takes a PRIntn argument, which is the exit status code of the + * process. + */ +NSPR_API(void) PR_ProcessExit(PRIntn status); + +/* +** Abort the process in a non-graceful manner. This will cause a core file, +** call to the debugger or other moral equivalent as well as causing the +** entire process to stop. +*/ +NSPR_API(void) PR_Abort(void); + +/* + **************************************************************** + * + * Module initialization: + * + **************************************************************** + */ + +typedef struct PRCallOnceType { + PRIntn initialized; + PRInt32 inProgress; + PRStatus status; +} PRCallOnceType; + +typedef PRStatus (PR_CALLBACK *PRCallOnceFN)(void); + +typedef PRStatus (PR_CALLBACK *PRCallOnceWithArgFN)(void *arg); + +NSPR_API(PRStatus) PR_CallOnce( + PRCallOnceType *once, + PRCallOnceFN func +); + +NSPR_API(PRStatus) PR_CallOnceWithArg( + PRCallOnceType *once, + PRCallOnceWithArgFN func, + void *arg +); + + +PR_END_EXTERN_C + +#endif /* prinit_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prinrval.h b/Src/nprt_plugin/gecko/1.8/win/include/prinrval.h new file mode 100644 index 00000000..9d9d0189 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prinrval.h @@ -0,0 +1,175 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: prinrval.h +** Description: API to interval timing functions of NSPR. +** +** +** NSPR provides interval times that are independent of network time +** of day values. Interval times are (in theory) accurate regardless +** of host processing requirements and also very cheap to acquire. It +** is expected that getting an interval time while in a synchronized +** function (holding one's lock). +**/ + +#if !defined(prinrval_h) +#define prinrval_h + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/**********************************************************************/ +/************************* TYPES AND CONSTANTS ************************/ +/**********************************************************************/ + +typedef PRUint32 PRIntervalTime; + +/*********************************************************************** +** DEFINES: PR_INTERVAL_MIN +** PR_INTERVAL_MAX +** DESCRIPTION: +** These two constants define the range (in ticks / second) of the +** platform dependent type, PRIntervalTime. These constants bound both +** the period and the resolution of a PRIntervalTime. +***********************************************************************/ +#define PR_INTERVAL_MIN 1000UL +#define PR_INTERVAL_MAX 100000UL + +/*********************************************************************** +** DEFINES: PR_INTERVAL_NO_WAIT +** PR_INTERVAL_NO_TIMEOUT +** DESCRIPTION: +** Two reserved constants are defined in the PRIntervalTime namespace. +** They are used to indicate that the process should wait no time (return +** immediately) or wait forever (never time out), respectively. +***********************************************************************/ +#define PR_INTERVAL_NO_WAIT 0UL +#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL + +/**********************************************************************/ +/****************************** FUNCTIONS *****************************/ +/**********************************************************************/ + +/*********************************************************************** +** FUNCTION: PR_IntervalNow +** DESCRIPTION: +** Return the value of NSPR's free running interval timer. That timer +** can be used to establish epochs and determine intervals (be computing +** the difference between two times). +** INPUTS: void +** OUTPUTS: void +** RETURN: PRIntervalTime +** +** SIDE EFFECTS: +** None +** RESTRICTIONS: +** The units of PRIntervalTime are platform dependent. They are chosen +** such that they are appropriate for the host OS, yet provide sufficient +** resolution and period to be useful to clients. +** MEMORY: N/A +** ALGORITHM: Platform dependent +***********************************************************************/ +NSPR_API(PRIntervalTime) PR_IntervalNow(void); + +/*********************************************************************** +** FUNCTION: PR_TicksPerSecond +** DESCRIPTION: +** Return the number of ticks per second for PR_IntervalNow's clock. +** The value will be in the range [PR_INTERVAL_MIN..PR_INTERVAL_MAX]. +** INPUTS: void +** OUTPUTS: void +** RETURN: PRUint32 +** +** SIDE EFFECTS: +** None +** RESTRICTIONS: +** None +** MEMORY: N/A +** ALGORITHM: N/A +***********************************************************************/ +NSPR_API(PRUint32) PR_TicksPerSecond(void); + +/*********************************************************************** +** FUNCTION: PR_SecondsToInterval +** PR_MillisecondsToInterval +** PR_MicrosecondsToInterval +** DESCRIPTION: +** Convert standard clock units to platform dependent intervals. +** INPUTS: PRUint32 +** OUTPUTS: void +** RETURN: PRIntervalTime +** +** SIDE EFFECTS: +** None +** RESTRICTIONS: +** Conversion may cause overflow, which is not reported. +** MEMORY: N/A +** ALGORITHM: N/A +***********************************************************************/ +NSPR_API(PRIntervalTime) PR_SecondsToInterval(PRUint32 seconds); +NSPR_API(PRIntervalTime) PR_MillisecondsToInterval(PRUint32 milli); +NSPR_API(PRIntervalTime) PR_MicrosecondsToInterval(PRUint32 micro); + +/*********************************************************************** +** FUNCTION: PR_IntervalToSeconds +** PR_IntervalToMilliseconds +** PR_IntervalToMicroseconds +** DESCRIPTION: +** Convert platform dependent intervals to standard clock units. +** INPUTS: PRIntervalTime +** OUTPUTS: void +** RETURN: PRUint32 +** +** SIDE EFFECTS: +** None +** RESTRICTIONS: +** Conversion may cause overflow, which is not reported. +** MEMORY: N/A +** ALGORITHM: N/A +***********************************************************************/ +NSPR_API(PRUint32) PR_IntervalToSeconds(PRIntervalTime ticks); +NSPR_API(PRUint32) PR_IntervalToMilliseconds(PRIntervalTime ticks); +NSPR_API(PRUint32) PR_IntervalToMicroseconds(PRIntervalTime ticks); + +PR_END_EXTERN_C + + +#endif /* !defined(prinrval_h) */ + +/* prinrval.h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prio.h b/Src/nprt_plugin/gecko/1.8/win/include/prio.h new file mode 100644 index 00000000..626d860d --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prio.h @@ -0,0 +1,2030 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* + * File: prio.h + * + * Description: PR i/o related stuff, such as file system access, file + * i/o, socket i/o, etc. + */ + +#ifndef prio_h___ +#define prio_h___ + +#include "prlong.h" +#include "prtime.h" +#include "prinrval.h" +#include "prinet.h" + +PR_BEGIN_EXTERN_C + +/* Typedefs */ +typedef struct PRDir PRDir; +typedef struct PRDirEntry PRDirEntry; +#ifdef MOZ_UNICODE +typedef struct PRDirUTF16 PRDirUTF16; +typedef struct PRDirEntryUTF16 PRDirEntryUTF16; +#endif /* MOZ_UNICODE */ +typedef struct PRFileDesc PRFileDesc; +typedef struct PRFileInfo PRFileInfo; +typedef struct PRFileInfo64 PRFileInfo64; +typedef union PRNetAddr PRNetAddr; +typedef struct PRIOMethods PRIOMethods; +typedef struct PRPollDesc PRPollDesc; +typedef struct PRFilePrivate PRFilePrivate; +typedef struct PRSendFileData PRSendFileData; + +/* +*************************************************************************** +** The file descriptor. +** This is the primary structure to represent any active open socket, +** whether it be a normal file or a network connection. Such objects +** are stackable (or layerable). Each layer may have its own set of +** method pointers and context private to that layer. All each layer +** knows about its neighbors is how to get to their method table. +*************************************************************************** +*/ + +typedef PRIntn PRDescIdentity; /* see: Layering file descriptors */ + +struct PRFileDesc { + const PRIOMethods *methods; /* the I/O methods table */ + PRFilePrivate *secret; /* layer dependent data */ + PRFileDesc *lower, *higher; /* pointers to adjacent layers */ + void (PR_CALLBACK *dtor)(PRFileDesc *fd); + /* A destructor function for layer */ + PRDescIdentity identity; /* Identity of this particular layer */ +}; + +/* +*************************************************************************** +** PRTransmitFileFlags +** +** Flags for PR_TransmitFile. Pass PR_TRANSMITFILE_CLOSE_SOCKET to +** PR_TransmitFile if the connection should be closed after the file +** is transmitted. +*************************************************************************** +*/ +typedef enum PRTransmitFileFlags { + PR_TRANSMITFILE_KEEP_OPEN = 0, /* socket is left open after file + * is transmitted. */ + PR_TRANSMITFILE_CLOSE_SOCKET = 1 /* socket is closed after file + * is transmitted. */ +} PRTransmitFileFlags; + +/* +************************************************************************** +** Macros for PRNetAddr +** +** Address families: PR_AF_INET, PR_AF_INET6, PR_AF_LOCAL +** IP addresses: PR_INADDR_ANY, PR_INADDR_LOOPBACK, PR_INADDR_BROADCAST +************************************************************************** +*/ + +#ifdef WIN32 + +#define PR_AF_INET 2 +#define PR_AF_LOCAL 1 +#define PR_INADDR_ANY (unsigned long)0x00000000 +#define PR_INADDR_LOOPBACK 0x7f000001 +#define PR_INADDR_BROADCAST (unsigned long)0xffffffff + +#else /* WIN32 */ + +#define PR_AF_INET AF_INET +#define PR_AF_LOCAL AF_UNIX +#define PR_INADDR_ANY INADDR_ANY +#define PR_INADDR_LOOPBACK INADDR_LOOPBACK +#define PR_INADDR_BROADCAST INADDR_BROADCAST + +#endif /* WIN32 */ + +/* +** Define PR_AF_INET6 in prcpucfg.h with the same +** value as AF_INET6 on platforms with IPv6 support. +** Otherwise define it here. +*/ +#ifndef PR_AF_INET6 +#define PR_AF_INET6 100 +#endif + +#ifndef PR_AF_UNSPEC +#define PR_AF_UNSPEC 0 +#endif + +/* +************************************************************************** +** A network address +** +** Only Internet Protocol (IPv4 and IPv6) addresses are supported. +** The address family must always represent IPv4 (AF_INET, probably == 2) +** or IPv6 (AF_INET6). +************************************************************************** +*************************************************************************/ + +struct PRIPv6Addr { + union { + PRUint8 _S6_u8[16]; + PRUint16 _S6_u16[8]; + PRUint32 _S6_u32[4]; + PRUint64 _S6_u64[2]; + } _S6_un; +}; +#define pr_s6_addr _S6_un._S6_u8 +#define pr_s6_addr16 _S6_un._S6_u16 +#define pr_s6_addr32 _S6_un._S6_u32 +#define pr_s6_addr64 _S6_un._S6_u64 + +typedef struct PRIPv6Addr PRIPv6Addr; + +union PRNetAddr { + struct { + PRUint16 family; /* address family (0x00ff maskable) */ +#ifdef XP_BEOS + char data[10]; /* Be has a smaller structure */ +#else + char data[14]; /* raw address data */ +#endif + } raw; + struct { + PRUint16 family; /* address family (AF_INET) */ + PRUint16 port; /* port number */ + PRUint32 ip; /* The actual 32 bits of address */ +#ifdef XP_BEOS + char pad[4]; /* Be has a smaller structure */ +#else + char pad[8]; +#endif + } inet; + struct { + PRUint16 family; /* address family (AF_INET6) */ + PRUint16 port; /* port number */ + PRUint32 flowinfo; /* routing information */ + PRIPv6Addr ip; /* the actual 128 bits of address */ + PRUint32 scope_id; /* set of interfaces for a scope */ + } ipv6; +#if defined(XP_UNIX) || defined(XP_OS2_EMX) + struct { /* Unix domain socket address */ + PRUint16 family; /* address family (AF_UNIX) */ +#ifdef XP_OS2 + char path[108]; /* null-terminated pathname */ + /* bind fails if size is not 108. */ +#else + char path[104]; /* null-terminated pathname */ +#endif + } local; +#endif +}; + +/* +*************************************************************************** +** PRSockOption +** +** The file descriptors can have predefined options set after they file +** descriptor is created to change their behavior. Only the options in +** the following enumeration are supported. +*************************************************************************** +*/ +typedef enum PRSockOption +{ + PR_SockOpt_Nonblocking, /* nonblocking io */ + PR_SockOpt_Linger, /* linger on close if data present */ + PR_SockOpt_Reuseaddr, /* allow local address reuse */ + PR_SockOpt_Keepalive, /* keep connections alive */ + PR_SockOpt_RecvBufferSize, /* send buffer size */ + PR_SockOpt_SendBufferSize, /* receive buffer size */ + + PR_SockOpt_IpTimeToLive, /* time to live */ + PR_SockOpt_IpTypeOfService, /* type of service and precedence */ + + PR_SockOpt_AddMember, /* add an IP group membership */ + PR_SockOpt_DropMember, /* drop an IP group membership */ + PR_SockOpt_McastInterface, /* multicast interface address */ + PR_SockOpt_McastTimeToLive, /* multicast timetolive */ + PR_SockOpt_McastLoopback, /* multicast loopback */ + + PR_SockOpt_NoDelay, /* don't delay send to coalesce packets */ + PR_SockOpt_MaxSegment, /* maximum segment size */ + PR_SockOpt_Broadcast, /* enable broadcast */ + PR_SockOpt_Last +} PRSockOption; + +typedef struct PRLinger { + PRBool polarity; /* Polarity of the option's setting */ + PRIntervalTime linger; /* Time to linger before closing */ +} PRLinger; + +typedef struct PRMcastRequest { + PRNetAddr mcaddr; /* IP multicast address of group */ + PRNetAddr ifaddr; /* local IP address of interface */ +} PRMcastRequest; + +typedef struct PRSocketOptionData +{ + PRSockOption option; + union + { + PRUintn ip_ttl; /* IP time to live */ + PRUintn mcast_ttl; /* IP multicast time to live */ + PRUintn tos; /* IP type of service and precedence */ + PRBool non_blocking; /* Non-blocking (network) I/O */ + PRBool reuse_addr; /* Allow local address reuse */ + PRBool keep_alive; /* Keep connections alive */ + PRBool mcast_loopback; /* IP multicast loopback */ + PRBool no_delay; /* Don't delay send to coalesce packets */ + PRBool broadcast; /* Enable broadcast */ + PRSize max_segment; /* Maximum segment size */ + PRSize recv_buffer_size; /* Receive buffer size */ + PRSize send_buffer_size; /* Send buffer size */ + PRLinger linger; /* Time to linger on close if data present */ + PRMcastRequest add_member; /* add an IP group membership */ + PRMcastRequest drop_member; /* Drop an IP group membership */ + PRNetAddr mcast_if; /* multicast interface address */ + } value; +} PRSocketOptionData; + +/* +*************************************************************************** +** PRIOVec +** +** The I/O vector is used by the write vector method to describe the areas +** that are affected by the ouput operation. +*************************************************************************** +*/ +typedef struct PRIOVec { + char *iov_base; + int iov_len; +} PRIOVec; + +/* +*************************************************************************** +** Discover what type of socket is being described by the file descriptor. +*************************************************************************** +*/ +typedef enum PRDescType +{ + PR_DESC_FILE = 1, + PR_DESC_SOCKET_TCP = 2, + PR_DESC_SOCKET_UDP = 3, + PR_DESC_LAYERED = 4, + PR_DESC_PIPE = 5 +} PRDescType; + +typedef enum PRSeekWhence { + PR_SEEK_SET = 0, + PR_SEEK_CUR = 1, + PR_SEEK_END = 2 +} PRSeekWhence; + +NSPR_API(PRDescType) PR_GetDescType(PRFileDesc *file); + +/* +*************************************************************************** +** PRIOMethods +** +** The I/O methods table provides procedural access to the functions of +** the file descriptor. It is the responsibility of a layer implementor +** to provide suitable functions at every entry point. If a layer provides +** no functionality, it should call the next lower(higher) function of the +** same name (e.g., return fd->lower->method->close(fd->lower)); +** +** Not all functions are implemented for all types of files. In cases where +** that is true, the function will return a error indication with an error +** code of PR_INVALID_METHOD_ERROR. +*************************************************************************** +*/ + +typedef PRStatus (PR_CALLBACK *PRCloseFN)(PRFileDesc *fd); +typedef PRInt32 (PR_CALLBACK *PRReadFN)(PRFileDesc *fd, void *buf, PRInt32 amount); +typedef PRInt32 (PR_CALLBACK *PRWriteFN)(PRFileDesc *fd, const void *buf, PRInt32 amount); +typedef PRInt32 (PR_CALLBACK *PRAvailableFN)(PRFileDesc *fd); +typedef PRInt64 (PR_CALLBACK *PRAvailable64FN)(PRFileDesc *fd); +typedef PRStatus (PR_CALLBACK *PRFsyncFN)(PRFileDesc *fd); +typedef PROffset32 (PR_CALLBACK *PRSeekFN)(PRFileDesc *fd, PROffset32 offset, PRSeekWhence how); +typedef PROffset64 (PR_CALLBACK *PRSeek64FN)(PRFileDesc *fd, PROffset64 offset, PRSeekWhence how); +typedef PRStatus (PR_CALLBACK *PRFileInfoFN)(PRFileDesc *fd, PRFileInfo *info); +typedef PRStatus (PR_CALLBACK *PRFileInfo64FN)(PRFileDesc *fd, PRFileInfo64 *info); +typedef PRInt32 (PR_CALLBACK *PRWritevFN)( + PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, + PRIntervalTime timeout); +typedef PRStatus (PR_CALLBACK *PRConnectFN)( + PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout); +typedef PRFileDesc* (PR_CALLBACK *PRAcceptFN) ( + PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout); +typedef PRStatus (PR_CALLBACK *PRBindFN)(PRFileDesc *fd, const PRNetAddr *addr); +typedef PRStatus (PR_CALLBACK *PRListenFN)(PRFileDesc *fd, PRIntn backlog); +typedef PRStatus (PR_CALLBACK *PRShutdownFN)(PRFileDesc *fd, PRIntn how); +typedef PRInt32 (PR_CALLBACK *PRRecvFN)( + PRFileDesc *fd, void *buf, PRInt32 amount, + PRIntn flags, PRIntervalTime timeout); +typedef PRInt32 (PR_CALLBACK *PRSendFN) ( + PRFileDesc *fd, const void *buf, PRInt32 amount, + PRIntn flags, PRIntervalTime timeout); +typedef PRInt32 (PR_CALLBACK *PRRecvfromFN)( + PRFileDesc *fd, void *buf, PRInt32 amount, + PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout); +typedef PRInt32 (PR_CALLBACK *PRSendtoFN)( + PRFileDesc *fd, const void *buf, PRInt32 amount, + PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout); +typedef PRInt16 (PR_CALLBACK *PRPollFN)( + PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags); +typedef PRInt32 (PR_CALLBACK *PRAcceptreadFN)( + PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr, + void *buf, PRInt32 amount, PRIntervalTime t); +typedef PRInt32 (PR_CALLBACK *PRTransmitfileFN)( + PRFileDesc *sd, PRFileDesc *fd, const void *headers, + PRInt32 hlen, PRTransmitFileFlags flags, PRIntervalTime t); +typedef PRStatus (PR_CALLBACK *PRGetsocknameFN)(PRFileDesc *fd, PRNetAddr *addr); +typedef PRStatus (PR_CALLBACK *PRGetpeernameFN)(PRFileDesc *fd, PRNetAddr *addr); +typedef PRStatus (PR_CALLBACK *PRGetsocketoptionFN)( + PRFileDesc *fd, PRSocketOptionData *data); +typedef PRStatus (PR_CALLBACK *PRSetsocketoptionFN)( + PRFileDesc *fd, const PRSocketOptionData *data); +typedef PRInt32 (PR_CALLBACK *PRSendfileFN)( + PRFileDesc *networkSocket, PRSendFileData *sendData, + PRTransmitFileFlags flags, PRIntervalTime timeout); +typedef PRStatus (PR_CALLBACK *PRConnectcontinueFN)( + PRFileDesc *fd, PRInt16 out_flags); +typedef PRIntn (PR_CALLBACK *PRReservedFN)(PRFileDesc *fd); + +struct PRIOMethods { + PRDescType file_type; /* Type of file represented (tos) */ + PRCloseFN close; /* close file and destroy descriptor */ + PRReadFN read; /* read up to specified bytes into buffer */ + PRWriteFN write; /* write specified bytes from buffer */ + PRAvailableFN available; /* determine number of bytes available */ + PRAvailable64FN available64; /* ditto, 64 bit */ + PRFsyncFN fsync; /* flush all buffers to permanent store */ + PRSeekFN seek; /* position the file to the desired place */ + PRSeek64FN seek64; /* ditto, 64 bit */ + PRFileInfoFN fileInfo; /* Get information about an open file */ + PRFileInfo64FN fileInfo64; /* ditto, 64 bit */ + PRWritevFN writev; /* Write segments as described by iovector */ + PRConnectFN connect; /* Connect to the specified (net) address */ + PRAcceptFN accept; /* Accept a connection for a (net) peer */ + PRBindFN bind; /* Associate a (net) address with the fd */ + PRListenFN listen; /* Prepare to listen for (net) connections */ + PRShutdownFN shutdown; /* Shutdown a (net) connection */ + PRRecvFN recv; /* Solicit up the the specified bytes */ + PRSendFN send; /* Send all the bytes specified */ + PRRecvfromFN recvfrom; /* Solicit (net) bytes and report source */ + PRSendtoFN sendto; /* Send bytes to (net) address specified */ + PRPollFN poll; /* Test the fd to see if it is ready */ + PRAcceptreadFN acceptread; /* Accept and read on a new (net) fd */ + PRTransmitfileFN transmitfile; /* Transmit at entire file */ + PRGetsocknameFN getsockname; /* Get (net) address associated with fd */ + PRGetpeernameFN getpeername; /* Get peer's (net) address */ + PRReservedFN reserved_fn_6; /* reserved for future use */ + PRReservedFN reserved_fn_5; /* reserved for future use */ + PRGetsocketoptionFN getsocketoption; + /* Get current setting of specified option */ + PRSetsocketoptionFN setsocketoption; + /* Set value of specified option */ + PRSendfileFN sendfile; /* Send a (partial) file with header/trailer*/ + PRConnectcontinueFN connectcontinue; + /* Continue a nonblocking connect */ + PRReservedFN reserved_fn_3; /* reserved for future use */ + PRReservedFN reserved_fn_2; /* reserved for future use */ + PRReservedFN reserved_fn_1; /* reserved for future use */ + PRReservedFN reserved_fn_0; /* reserved for future use */ +}; + +/* + ************************************************************************** + * FUNCTION: PR_GetSpecialFD + * DESCRIPTION: Get the file descriptor that represents the standard input, + * output, or error stream. + * INPUTS: + * PRSpecialFD id + * A value indicating the type of stream desired: + * PR_StandardInput: standard input + * PR_StandardOuput: standard output + * PR_StandardError: standard error + * OUTPUTS: none + * RETURNS: PRFileDesc * + * If the argument is valid, PR_GetSpecialFD returns a file descriptor + * that represents the corresponding standard I/O stream. Otherwise, + * PR_GetSpecialFD returns NULL and sets error PR_INVALID_ARGUMENT_ERROR. + ************************************************************************** + */ + +typedef enum PRSpecialFD +{ + PR_StandardInput, /* standard input */ + PR_StandardOutput, /* standard output */ + PR_StandardError /* standard error */ +} PRSpecialFD; + +NSPR_API(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD id); + +#define PR_STDIN PR_GetSpecialFD(PR_StandardInput) +#define PR_STDOUT PR_GetSpecialFD(PR_StandardOutput) +#define PR_STDERR PR_GetSpecialFD(PR_StandardError) + +/* + ************************************************************************** + * Layering file descriptors + * + * File descriptors may be layered. Each layer has it's own identity. + * Identities are allocated by the runtime and are to be associated + * (by the layer implementor) with all layers that are of that type. + * It is then possible to scan the chain of layers and find a layer + * that one recongizes and therefore predict that it will implement + * a desired protocol. + * + * There are three well-known identities: + * PR_INVALID_IO_LAYER => an invalid layer identity, for error return + * PR_TOP_IO_LAYER => the identity of the top of the stack + * PR_NSPR_IO_LAYER => the identity used by NSPR proper + * PR_TOP_IO_LAYER may be used as a shorthand for identifying the topmost + * layer of an existing stack. Ie., the following two constructs are + * equivalent. + * + * rv = PR_PushIOLayer(stack, PR_TOP_IO_LAYER, my_layer); + * rv = PR_PushIOLayer(stack, PR_GetLayersIdentity(stack), my_layer) + * + * A string may be associated with the creation of the identity. It + * will be copied by the runtime. If queried the runtime will return + * a reference to that copied string (not yet another copy). There + * is no facility for deleting an identity. + ************************************************************************** + */ + +#define PR_IO_LAYER_HEAD (PRDescIdentity)-3 +#define PR_INVALID_IO_LAYER (PRDescIdentity)-1 +#define PR_TOP_IO_LAYER (PRDescIdentity)-2 +#define PR_NSPR_IO_LAYER (PRDescIdentity)0 + +NSPR_API(PRDescIdentity) PR_GetUniqueIdentity(const char *layer_name); +NSPR_API(const char*) PR_GetNameForIdentity(PRDescIdentity ident); +NSPR_API(PRDescIdentity) PR_GetLayersIdentity(PRFileDesc* fd); +NSPR_API(PRFileDesc*) PR_GetIdentitiesLayer(PRFileDesc* fd_stack, PRDescIdentity id); + +/* + ************************************************************************** + * PR_GetDefaultIOMethods: Accessing the default methods table. + * You may get a pointer to the default methods table by calling this function. + * You may then select any elements from that table with which to build your + * layer's methods table. You may NOT modify the table directly. + ************************************************************************** + */ +NSPR_API(const PRIOMethods *) PR_GetDefaultIOMethods(void); + +/* + ************************************************************************** + * Creating a layer + * + * A new layer may be allocated by calling PR_CreateIOLayerStub(). The + * file descriptor returned will contain the pointer to the methods table + * provided. The runtime will not modify the table nor test its correctness. + ************************************************************************** + */ +NSPR_API(PRFileDesc*) PR_CreateIOLayerStub( + PRDescIdentity ident, const PRIOMethods *methods); + +/* + ************************************************************************** + * Creating a layer + * + * A new stack may be created by calling PR_CreateIOLayer(). The + * file descriptor returned will point to the top of the stack, which has + * the layer 'fd' as the topmost layer. + * + * NOTE: This function creates a new style stack, which has a fixed, dummy + * header. The old style stack, created by a call to PR_PushIOLayer, + * results in modifying contents of the top layer of the stack, when + * pushing and popping layers of the stack. + ************************************************************************** + */ +NSPR_API(PRFileDesc*) PR_CreateIOLayer(PRFileDesc* fd); + +/* + ************************************************************************** + * Pushing a layer + * + * A file descriptor (perhaps allocated using PR_CreateIOLayerStub()) may + * be pushed into an existing stack of file descriptors at any point the + * caller deems appropriate. The new layer will be inserted into the stack + * just above the layer with the indicated identity. + * + * Note: Even if the identity parameter indicates the top-most layer of + * the stack, the value of the file descriptor describing the original + * stack will not change. + ************************************************************************** + */ +NSPR_API(PRStatus) PR_PushIOLayer( + PRFileDesc *fd_stack, PRDescIdentity id, PRFileDesc *layer); + +/* + ************************************************************************** + * Popping a layer + * + * A layer may be popped from a stack by indicating the identity of the + * layer to be removed. If found, a pointer to the removed object will + * be returned to the caller. The object then becomes the responsibility + * of the caller. + * + * Note: Even if the identity indicates the top layer of the stack, the + * reference returned will not be the file descriptor for the stack and + * that file descriptor will remain valid. + ************************************************************************** + */ +NSPR_API(PRFileDesc*) PR_PopIOLayer(PRFileDesc *fd_stack, PRDescIdentity id); + +/* + ************************************************************************** + * FUNCTION: PR_Open + * DESCRIPTION: Open a file for reading, writing, or both. + * INPUTS: + * const char *name + * The path name of the file to be opened + * PRIntn flags + * The file status flags. + * It is a bitwise OR of the following bit flags (only one of + * the first three flags below may be used): + * PR_RDONLY Open for reading only. + * PR_WRONLY Open for writing only. + * PR_RDWR Open for reading and writing. + * PR_CREATE_FILE If the file does not exist, the file is created + * If the file exists, this flag has no effect. + * PR_SYNC If set, each write will wait for both the file data + * and file status to be physically updated. + * PR_APPEND The file pointer is set to the end of + * the file prior to each write. + * PR_TRUNCATE If the file exists, its length is truncated to 0. + * PR_EXCL With PR_CREATE_FILE, if the file does not exist, + * the file is created. If the file already + * exists, no action and NULL is returned + * + * PRIntn mode + * The access permission bits of the file mode, if the file is + * created when PR_CREATE_FILE is on. + * OUTPUTS: None + * RETURNS: PRFileDesc * + * If the file is successfully opened, + * returns a pointer to the PRFileDesc + * created for the newly opened file. + * Returns a NULL pointer if the open + * failed. + * SIDE EFFECTS: + * RESTRICTIONS: + * MEMORY: + * The return value, if not NULL, points to a dynamically allocated + * PRFileDesc object. + * ALGORITHM: + ************************************************************************** + */ + +/* Open flags */ +#define PR_RDONLY 0x01 +#define PR_WRONLY 0x02 +#define PR_RDWR 0x04 +#define PR_CREATE_FILE 0x08 +#define PR_APPEND 0x10 +#define PR_TRUNCATE 0x20 +#define PR_SYNC 0x40 +#define PR_EXCL 0x80 + +/* +** File modes .... +** +** CAVEAT: 'mode' is currently only applicable on UNIX platforms. +** The 'mode' argument may be ignored by PR_Open on other platforms. +** +** 00400 Read by owner. +** 00200 Write by owner. +** 00100 Execute (search if a directory) by owner. +** 00040 Read by group. +** 00020 Write by group. +** 00010 Execute by group. +** 00004 Read by others. +** 00002 Write by others +** 00001 Execute by others. +** +*/ + +NSPR_API(PRFileDesc*) PR_Open(const char *name, PRIntn flags, PRIntn mode); + +/* + ************************************************************************** + * FUNCTION: PR_OpenFile + * DESCRIPTION: + * Open a file for reading, writing, or both. + * PR_OpenFile has the same prototype as PR_Open but implements + * the specified file mode where possible. + ************************************************************************** + */ + +/* File mode bits */ +#define PR_IRWXU 00700 /* read, write, execute/search by owner */ +#define PR_IRUSR 00400 /* read permission, owner */ +#define PR_IWUSR 00200 /* write permission, owner */ +#define PR_IXUSR 00100 /* execute/search permission, owner */ +#define PR_IRWXG 00070 /* read, write, execute/search by group */ +#define PR_IRGRP 00040 /* read permission, group */ +#define PR_IWGRP 00020 /* write permission, group */ +#define PR_IXGRP 00010 /* execute/search permission, group */ +#define PR_IRWXO 00007 /* read, write, execute/search by others */ +#define PR_IROTH 00004 /* read permission, others */ +#define PR_IWOTH 00002 /* write permission, others */ +#define PR_IXOTH 00001 /* execute/search permission, others */ + +NSPR_API(PRFileDesc*) PR_OpenFile( + const char *name, PRIntn flags, PRIntn mode); + +#ifdef MOZ_UNICODE +/* + * EXPERIMENTAL: This function may be removed in a future release. + */ +NSPR_API(PRFileDesc*) PR_OpenFileUTF16( + const PRUnichar *name, PRIntn flags, PRIntn mode); +#endif /* MOZ_UNICODE */ + +/* + ************************************************************************** + * FUNCTION: PR_Close + * DESCRIPTION: + * Close a file or socket. + * INPUTS: + * PRFileDesc *fd + * a pointer to a PRFileDesc. + * OUTPUTS: + * None. + * RETURN: + * PRStatus + * SIDE EFFECTS: + * RESTRICTIONS: + * None. + * MEMORY: + * The dynamic memory pointed to by the argument fd is freed. + ************************************************************************** + */ + +NSPR_API(PRStatus) PR_Close(PRFileDesc *fd); + +/* + ************************************************************************** + * FUNCTION: PR_Read + * DESCRIPTION: + * Read bytes from a file or socket. + * The operation will block until either an end of stream indication is + * encountered, some positive number of bytes are transferred, or there + * is an error. No more than 'amount' bytes will be transferred. + * INPUTS: + * PRFileDesc *fd + * pointer to the PRFileDesc object for the file or socket + * void *buf + * pointer to a buffer to hold the data read in. + * PRInt32 amount + * the size of 'buf' (in bytes) + * OUTPUTS: + * RETURN: + * PRInt32 + * a positive number indicates the number of bytes actually read in. + * 0 means end of file is reached or the network connection is closed. + * -1 indicates a failure. The reason for the failure is obtained + * by calling PR_GetError(). + * SIDE EFFECTS: + * data is written into the buffer pointed to by 'buf'. + * RESTRICTIONS: + * None. + * MEMORY: + * N/A + * ALGORITHM: + * N/A + ************************************************************************** + */ + +NSPR_API(PRInt32) PR_Read(PRFileDesc *fd, void *buf, PRInt32 amount); + +/* + *************************************************************************** + * FUNCTION: PR_Write + * DESCRIPTION: + * Write a specified number of bytes to a file or socket. The thread + * invoking this function blocks until all the data is written. + * INPUTS: + * PRFileDesc *fd + * pointer to a PRFileDesc object that refers to a file or socket + * const void *buf + * pointer to the buffer holding the data + * PRInt32 amount + * amount of data in bytes to be written from the buffer + * OUTPUTS: + * None. + * RETURN: PRInt32 + * A positive number indicates the number of bytes successfully written. + * A -1 is an indication that the operation failed. The reason + * for the failure is obtained by calling PR_GetError(). + *************************************************************************** + */ + +NSPR_API(PRInt32) PR_Write(PRFileDesc *fd,const void *buf,PRInt32 amount); + +/* + *************************************************************************** + * FUNCTION: PR_Writev + * DESCRIPTION: + * Write data to a socket. The data is organized in a PRIOVec array. The + * operation will block until all the data is written or the operation + * fails. + * INPUTS: + * PRFileDesc *fd + * Pointer that points to a PRFileDesc object for a socket. + * const PRIOVec *iov + * An array of PRIOVec. PRIOVec is a struct with the following + * two fields: + * char *iov_base; + * int iov_len; + * PRInt32 iov_size + * Number of elements in the iov array. The value of this + * argument must not be greater than PR_MAX_IOVECTOR_SIZE. + * If it is, the method will fail (PR_BUFFER_OVERFLOW_ERROR). + * PRIntervalTime timeout + * Time limit for completion of the entire write operation. + * OUTPUTS: + * None + * RETURN: + * A positive number indicates the number of bytes successfully written. + * A -1 is an indication that the operation failed. The reason + * for the failure is obtained by calling PR_GetError(). + *************************************************************************** + */ + +#define PR_MAX_IOVECTOR_SIZE 16 /* 'iov_size' must be <= */ + +NSPR_API(PRInt32) PR_Writev( + PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, + PRIntervalTime timeout); + +/* + *************************************************************************** + * FUNCTION: PR_Delete + * DESCRIPTION: + * Delete a file from the filesystem. The operation may fail if the + * file is open. + * INPUTS: + * const char *name + * Path name of the file to be deleted. + * OUTPUTS: + * None. + * RETURN: PRStatus + * The function returns PR_SUCCESS if the file is successfully + * deleted, otherwise it returns PR_FAILURE. + *************************************************************************** + */ + +NSPR_API(PRStatus) PR_Delete(const char *name); + +/**************************************************************************/ + +typedef enum PRFileType +{ + PR_FILE_FILE = 1, + PR_FILE_DIRECTORY = 2, + PR_FILE_OTHER = 3 +} PRFileType; + +struct PRFileInfo { + PRFileType type; /* Type of file */ + PROffset32 size; /* Size, in bytes, of file's contents */ + PRTime creationTime; /* Creation time per definition of PRTime */ + PRTime modifyTime; /* Last modification time per definition of PRTime */ +}; + +struct PRFileInfo64 { + PRFileType type; /* Type of file */ + PROffset64 size; /* Size, in bytes, of file's contents */ + PRTime creationTime; /* Creation time per definition of PRTime */ + PRTime modifyTime; /* Last modification time per definition of PRTime */ +}; + +/**************************************************************************** + * FUNCTION: PR_GetFileInfo, PR_GetFileInfo64 + * DESCRIPTION: + * Get the information about the file with the given path name. This is + * applicable only to NSFileDesc describing 'file' types (see + * INPUTS: + * const char *fn + * path name of the file + * OUTPUTS: + * PRFileInfo *info + * Information about the given file is written into the file + * information object pointer to by 'info'. + * RETURN: PRStatus + * PR_GetFileInfo returns PR_SUCCESS if file information is successfully + * obtained, otherwise it returns PR_FAILURE. + *************************************************************************** + */ + +NSPR_API(PRStatus) PR_GetFileInfo(const char *fn, PRFileInfo *info); +NSPR_API(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info); + +#ifdef MOZ_UNICODE +/* + * EXPERIMENTAL: This function may be removed in a future release. + */ +NSPR_API(PRStatus) PR_GetFileInfo64UTF16(const PRUnichar *fn, PRFileInfo64 *info); +#endif /* MOZ_UNICODE */ + +/* + ************************************************************************** + * FUNCTION: PR_GetOpenFileInfo, PR_GetOpenFileInfo64 + * DESCRIPTION: + * Get information about an open file referred to by the + * given PRFileDesc object. + * INPUTS: + * const PRFileDesc *fd + * A reference to a valid, open file. + * OUTPUTS: + * Same as PR_GetFileInfo, PR_GetFileInfo64 + * RETURN: PRStatus + * PR_GetFileInfo returns PR_SUCCESS if file information is successfully + * obtained, otherwise it returns PR_FAILURE. + *************************************************************************** + */ + +NSPR_API(PRStatus) PR_GetOpenFileInfo(PRFileDesc *fd, PRFileInfo *info); +NSPR_API(PRStatus) PR_GetOpenFileInfo64(PRFileDesc *fd, PRFileInfo64 *info); + +/* + ************************************************************************** + * FUNCTION: PR_Rename + * DESCRIPTION: + * Rename a file from the old name 'from' to the new name 'to'. + * INPUTS: + * const char *from + * The old name of the file to be renamed. + * const char *to + * The new name of the file. + * OUTPUTS: + * None. + * RETURN: PRStatus + ************************************************************************** + */ + +NSPR_API(PRStatus) PR_Rename(const char *from, const char *to); + +/* + ************************************************************************* + * FUNCTION: PR_Access + * DESCRIPTION: + * Determine accessibility of a file. + * INPUTS: + * const char *name + * path name of the file + * PRAccessHow how + * specifies which access permission to check for. + * It can be one of the following values: + * PR_ACCESS_READ_OK Test for read permission + * PR_ACCESS_WRITE_OK Test for write permission + * PR_ACCESS_EXISTS Check existence of file + * OUTPUTS: + * None. + * RETURN: PRStatus + * PR_SUCCESS is returned if the requested access is permitted. + * Otherwise, PR_FAILURE is returned. Additional information + * regarding the reason for the failure may be retrieved from + * PR_GetError(). + ************************************************************************* + */ + +typedef enum PRAccessHow { + PR_ACCESS_EXISTS = 1, + PR_ACCESS_WRITE_OK = 2, + PR_ACCESS_READ_OK = 3 +} PRAccessHow; + +NSPR_API(PRStatus) PR_Access(const char *name, PRAccessHow how); + +/* + ************************************************************************* + * FUNCTION: PR_Seek, PR_Seek64 + * DESCRIPTION: + * Moves read-write file offset + * INPUTS: + * PRFileDesc *fd + * Pointer to a PRFileDesc object. + * PROffset32, PROffset64 offset + * Specifies a value, in bytes, that is used in conjunction + * with the 'whence' parameter to set the file pointer. A + * negative value causes seeking in the reverse direction. + * PRSeekWhence whence + * Specifies how to interpret the 'offset' parameter in setting + * the file pointer associated with the 'fd' parameter. + * Values for the 'whence' parameter are: + * PR_SEEK_SET Sets the file pointer to the value of the + * 'offset' parameter + * PR_SEEK_CUR Sets the file pointer to its current location + * plus the value of the offset parameter. + * PR_SEEK_END Sets the file pointer to the size of the + * file plus the value of the offset parameter. + * OUTPUTS: + * None. + * RETURN: PROffset32, PROffset64 + * Upon successful completion, the resulting pointer location, + * measured in bytes from the beginning of the file, is returned. + * If the PR_Seek() function fails, the file offset remains + * unchanged, and the returned value is -1. The error code can + * then be retrieved via PR_GetError(). + ************************************************************************* + */ + +NSPR_API(PROffset32) PR_Seek(PRFileDesc *fd, PROffset32 offset, PRSeekWhence whence); +NSPR_API(PROffset64) PR_Seek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence); + +/* + ************************************************************************ + * FUNCTION: PR_Available + * DESCRIPTION: + * Determine the amount of data in bytes available for reading + * in the given file or socket. + * INPUTS: + * PRFileDesc *fd + * Pointer to a PRFileDesc object that refers to a file or + * socket. + * OUTPUTS: + * None + * RETURN: PRInt32, PRInt64 + * Upon successful completion, PR_Available returns the number of + * bytes beyond the current read pointer that is available for + * reading. Otherwise, it returns a -1 and the reason for the + * failure can be retrieved via PR_GetError(). + ************************************************************************ + */ + +NSPR_API(PRInt32) PR_Available(PRFileDesc *fd); +NSPR_API(PRInt64) PR_Available64(PRFileDesc *fd); + +/* + ************************************************************************ + * FUNCTION: PR_Sync + * DESCRIPTION: + * Sync any buffered data for a fd to its backing device (disk). + * INPUTS: + * PRFileDesc *fd + * Pointer to a PRFileDesc object that refers to a file or + * socket + * OUTPUTS: + * None + * RETURN: PRStatus + * PR_SUCCESS is returned if the requested access is permitted. + * Otherwise, PR_FAILURE is returned. + ************************************************************************ + */ + +NSPR_API(PRStatus) PR_Sync(PRFileDesc *fd); + +/************************************************************************/ + +struct PRDirEntry { + const char *name; /* name of entry, relative to directory name */ +}; + +#ifdef MOZ_UNICODE +struct PRDirEntryUTF16 { + const PRUnichar *name; /* name of entry in UTF16, relative to + * directory name */ +}; +#endif /* MOZ_UNICODE */ + +#if !defined(NO_NSPR_10_SUPPORT) +#define PR_DirName(dirEntry) (dirEntry->name) +#endif + +/* + ************************************************************************* + * FUNCTION: PR_OpenDir + * DESCRIPTION: + * Open the directory by the given name + * INPUTS: + * const char *name + * path name of the directory to be opened + * OUTPUTS: + * None + * RETURN: PRDir * + * If the directory is sucessfully opened, a PRDir object is + * dynamically allocated and a pointer to it is returned. + * If the directory cannot be opened, a NULL pointer is returned. + * MEMORY: + * Upon successful completion, the return value points to + * dynamically allocated memory. + ************************************************************************* + */ + +NSPR_API(PRDir*) PR_OpenDir(const char *name); + +#ifdef MOZ_UNICODE +/* + * EXPERIMENTAL: This function may be removed in a future release. + */ +NSPR_API(PRDirUTF16*) PR_OpenDirUTF16(const PRUnichar *name); +#endif /* MOZ_UNICODE */ + +/* + ************************************************************************* + * FUNCTION: PR_ReadDir + * DESCRIPTION: + * INPUTS: + * PRDir *dir + * pointer to a PRDir object that designates an open directory + * PRDirFlags flags + * PR_SKIP_NONE Do not skip any files + * PR_SKIP_DOT Skip the directory entry "." that + * represents the current directory + * PR_SKIP_DOT_DOT Skip the directory entry ".." that + * represents the parent directory. + * PR_SKIP_BOTH Skip both '.' and '..' + * PR_SKIP_HIDDEN Skip hidden files + * OUTPUTS: + * RETURN: PRDirEntry* + * Returns a pointer to the next entry in the directory. Returns + * a NULL pointer upon reaching the end of the directory or when an + * error occurs. The actual reason can be retrieved via PR_GetError(). + ************************************************************************* + */ + +typedef enum PRDirFlags { + PR_SKIP_NONE = 0x0, + PR_SKIP_DOT = 0x1, + PR_SKIP_DOT_DOT = 0x2, + PR_SKIP_BOTH = 0x3, + PR_SKIP_HIDDEN = 0x4 +} PRDirFlags; + +NSPR_API(PRDirEntry*) PR_ReadDir(PRDir *dir, PRDirFlags flags); + +#ifdef MOZ_UNICODE +/* + * EXPERIMENTAL: This function may be removed in a future release. + */ +NSPR_API(PRDirEntryUTF16*) PR_ReadDirUTF16(PRDirUTF16 *dir, PRDirFlags flags); +#endif /* MOZ_UNICODE */ + +/* + ************************************************************************* + * FUNCTION: PR_CloseDir + * DESCRIPTION: + * Close the specified directory. + * INPUTS: + * PRDir *dir + * The directory to be closed. + * OUTPUTS: + * None + * RETURN: PRStatus + * If successful, will return a status of PR_SUCCESS. Otherwise + * a value of PR_FAILURE. The reason for the failure may be re- + * trieved using PR_GetError(). + ************************************************************************* + */ + +NSPR_API(PRStatus) PR_CloseDir(PRDir *dir); + +#ifdef MOZ_UNICODE +/* + * EXPERIMENTAL: This function may be removed in a future release. + */ +NSPR_API(PRStatus) PR_CloseDirUTF16(PRDirUTF16 *dir); +#endif /* MOZ_UNICODE */ + +/* + ************************************************************************* + * FUNCTION: PR_MkDir + * DESCRIPTION: + * Create a new directory with the given name and access mode. + * INPUTS: + * const char *name + * The name of the directory to be created. All the path components + * up to but not including the leaf component must already exist. + * PRIntn mode + * See 'mode' definiton in PR_Open(). + * OUTPUTS: + * None + * RETURN: PRStatus + * If successful, will return a status of PR_SUCCESS. Otherwise + * a value of PR_FAILURE. The reason for the failure may be re- + * trieved using PR_GetError(). + ************************************************************************* + */ + +NSPR_API(PRStatus) PR_MkDir(const char *name, PRIntn mode); + +/* + ************************************************************************* + * FUNCTION: PR_MakeDir + * DESCRIPTION: + * Create a new directory with the given name and access mode. + * PR_MakeDir has the same prototype as PR_MkDir but implements + * the specified access mode where possible. + ************************************************************************* + */ + +NSPR_API(PRStatus) PR_MakeDir(const char *name, PRIntn mode); + +/* + ************************************************************************* + * FUNCTION: PR_RmDir + * DESCRIPTION: + * Remove a directory by the given name. + * INPUTS: + * const char *name + * The name of the directory to be removed. All the path components + * must already exist. Only the leaf component will be removed. + * OUTPUTS: + * None + * RETURN: PRStatus + * If successful, will return a status of PR_SUCCESS. Otherwise + * a value of PR_FAILURE. The reason for the failure may be re- + * trieved using PR_GetError(). + ************************************************************************** + */ + +NSPR_API(PRStatus) PR_RmDir(const char *name); + +/* + ************************************************************************* + * FUNCTION: PR_NewUDPSocket + * DESCRIPTION: + * Create a new UDP socket. + * INPUTS: + * None + * OUTPUTS: + * None + * RETURN: PRFileDesc* + * Upon successful completion, PR_NewUDPSocket returns a pointer + * to the PRFileDesc created for the newly opened UDP socket. + * Returns a NULL pointer if the creation of a new UDP socket failed. + * + ************************************************************************** + */ + +NSPR_API(PRFileDesc*) PR_NewUDPSocket(void); + +/* + ************************************************************************* + * FUNCTION: PR_NewTCPSocket + * DESCRIPTION: + * Create a new TCP socket. + * INPUTS: + * None + * OUTPUTS: + * None + * RETURN: PRFileDesc* + * Upon successful completion, PR_NewTCPSocket returns a pointer + * to the PRFileDesc created for the newly opened TCP socket. + * Returns a NULL pointer if the creation of a new TCP socket failed. + * + ************************************************************************** + */ + +NSPR_API(PRFileDesc*) PR_NewTCPSocket(void); + +/* + ************************************************************************* + * FUNCTION: PR_OpenUDPSocket + * DESCRIPTION: + * Create a new UDP socket of the specified address family. + * INPUTS: + * PRIntn af + * Address family + * OUTPUTS: + * None + * RETURN: PRFileDesc* + * Upon successful completion, PR_OpenUDPSocket returns a pointer + * to the PRFileDesc created for the newly opened UDP socket. + * Returns a NULL pointer if the creation of a new UDP socket failed. + * + ************************************************************************** + */ + +NSPR_API(PRFileDesc*) PR_OpenUDPSocket(PRIntn af); + +/* + ************************************************************************* + * FUNCTION: PR_OpenTCPSocket + * DESCRIPTION: + * Create a new TCP socket of the specified address family. + * INPUTS: + * PRIntn af + * Address family + * OUTPUTS: + * None + * RETURN: PRFileDesc* + * Upon successful completion, PR_NewTCPSocket returns a pointer + * to the PRFileDesc created for the newly opened TCP socket. + * Returns a NULL pointer if the creation of a new TCP socket failed. + * + ************************************************************************** + */ + +NSPR_API(PRFileDesc*) PR_OpenTCPSocket(PRIntn af); + +/* + ************************************************************************* + * FUNCTION: PR_Connect + * DESCRIPTION: + * Initiate a connection on a socket. + * INPUTS: + * PRFileDesc *fd + * Points to a PRFileDesc object representing a socket + * PRNetAddr *addr + * Specifies the address of the socket in its own communication + * space. + * PRIntervalTime timeout + * Time limit for completion of the connect operation. + * OUTPUTS: + * None + * RETURN: PRStatus + * Upon successful completion of connection initiation, PR_Connect + * returns PR_SUCCESS. Otherwise, it returns PR_FAILURE. Further + * failure information can be obtained by calling PR_GetError(). + ************************************************************************** + */ + +NSPR_API(PRStatus) PR_Connect( + PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout); + +/* + ************************************************************************* + * FUNCTION: PR_ConnectContinue + * DESCRIPTION: + * Continue a nonblocking connect. After a nonblocking connect + * is initiated with PR_Connect() (which fails with + * PR_IN_PROGRESS_ERROR), one should call PR_Poll() on the socket, + * with the in_flags PR_POLL_WRITE | PR_POLL_EXCEPT. When + * PR_Poll() returns, one calls PR_ConnectContinue() on the + * socket to determine whether the nonblocking connect has + * completed or is still in progress. Repeat the PR_Poll(), + * PR_ConnectContinue() sequence until the nonblocking connect + * has completed. + * INPUTS: + * PRFileDesc *fd + * the file descriptor representing a socket + * PRInt16 out_flags + * the out_flags field of the poll descriptor returned by + * PR_Poll() + * RETURN: PRStatus + * If the nonblocking connect has successfully completed, + * PR_ConnectContinue returns PR_SUCCESS. If PR_ConnectContinue() + * returns PR_FAILURE, call PR_GetError(): + * - PR_IN_PROGRESS_ERROR: the nonblocking connect is still in + * progress and has not completed yet. The caller should poll + * on the file descriptor for the in_flags + * PR_POLL_WRITE|PR_POLL_EXCEPT and retry PR_ConnectContinue + * later when PR_Poll() returns. + * - Other errors: the nonblocking connect has failed with this + * error code. + */ + +NSPR_API(PRStatus) PR_ConnectContinue(PRFileDesc *fd, PRInt16 out_flags); + +/* + ************************************************************************* + * THIS FUNCTION IS DEPRECATED. USE PR_ConnectContinue INSTEAD. + * + * FUNCTION: PR_GetConnectStatus + * DESCRIPTION: + * Get the completion status of a nonblocking connect. After + * a nonblocking connect is initiated with PR_Connect() (which + * fails with PR_IN_PROGRESS_ERROR), one should call PR_Poll() + * on the socket, with the in_flags PR_POLL_WRITE | PR_POLL_EXCEPT. + * When PR_Poll() returns, one calls PR_GetConnectStatus on the + * PRPollDesc structure to determine whether the nonblocking + * connect has succeeded or failed. + * INPUTS: + * const PRPollDesc *pd + * Pointer to a PRPollDesc whose fd member is the socket, + * and in_flags must contain PR_POLL_WRITE and PR_POLL_EXCEPT. + * PR_Poll() should have been called and set the out_flags. + * RETURN: PRStatus + * If the nonblocking connect has successfully completed, + * PR_GetConnectStatus returns PR_SUCCESS. If PR_GetConnectStatus() + * returns PR_FAILURE, call PR_GetError(): + * - PR_IN_PROGRESS_ERROR: the nonblocking connect is still in + * progress and has not completed yet. + * - Other errors: the nonblocking connect has failed with this + * error code. + */ + +NSPR_API(PRStatus) PR_GetConnectStatus(const PRPollDesc *pd); + +/* + ************************************************************************* + * FUNCTION: PR_Accept + * DESCRIPTION: + * Accept a connection on a socket. + * INPUTS: + * PRFileDesc *fd + * Points to a PRFileDesc object representing the rendezvous socket + * on which the caller is willing to accept new connections. + * PRIntervalTime timeout + * Time limit for completion of the accept operation. + * OUTPUTS: + * PRNetAddr *addr + * Returns the address of the connecting entity in its own + * communication space. It may be NULL. + * RETURN: PRFileDesc* + * Upon successful acceptance of a connection, PR_Accept + * returns a valid file descriptor. Otherwise, it returns NULL. + * Further failure information can be obtained by calling PR_GetError(). + ************************************************************************** + */ + +NSPR_API(PRFileDesc*) PR_Accept( + PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout); + +/* + ************************************************************************* + * FUNCTION: PR_Bind + * DESCRIPTION: + * Bind an address to a socket. + * INPUTS: + * PRFileDesc *fd + * Points to a PRFileDesc object representing a socket. + * PRNetAddr *addr + * Specifies the address to which the socket will be bound. + * OUTPUTS: + * None + * RETURN: PRStatus + * Upon successful binding of an address to a socket, PR_Bind + * returns PR_SUCCESS. Otherwise, it returns PR_FAILURE. Further + * failure information can be obtained by calling PR_GetError(). + ************************************************************************** + */ + +NSPR_API(PRStatus) PR_Bind(PRFileDesc *fd, const PRNetAddr *addr); + +/* + ************************************************************************* + * FUNCTION: PR_Listen + * DESCRIPTION: + * Listen for connections on a socket. + * INPUTS: + * PRFileDesc *fd + * Points to a PRFileDesc object representing a socket that will be + * used to listen for new connections. + * PRIntn backlog + * Specifies the maximum length of the queue of pending connections. + * OUTPUTS: + * None + * RETURN: PRStatus + * Upon successful completion of listen request, PR_Listen + * returns PR_SUCCESS. Otherwise, it returns PR_FAILURE. Further + * failure information can be obtained by calling PR_GetError(). + ************************************************************************** + */ + +NSPR_API(PRStatus) PR_Listen(PRFileDesc *fd, PRIntn backlog); + +/* + ************************************************************************* + * FUNCTION: PR_Shutdown + * DESCRIPTION: + * Shut down part of a full-duplex connection on a socket. + * INPUTS: + * PRFileDesc *fd + * Points to a PRFileDesc object representing a connected socket. + * PRIntn how + * Specifies the kind of disallowed operations on the socket. + * PR_SHUTDOWN_RCV - Further receives will be disallowed + * PR_SHUTDOWN_SEND - Further sends will be disallowed + * PR_SHUTDOWN_BOTH - Further sends and receives will be disallowed + * OUTPUTS: + * None + * RETURN: PRStatus + * Upon successful completion of shutdown request, PR_Shutdown + * returns PR_SUCCESS. Otherwise, it returns PR_FAILURE. Further + * failure information can be obtained by calling PR_GetError(). + ************************************************************************** + */ + +typedef enum PRShutdownHow +{ + PR_SHUTDOWN_RCV = 0, /* disallow further receives */ + PR_SHUTDOWN_SEND = 1, /* disallow further sends */ + PR_SHUTDOWN_BOTH = 2 /* disallow further receives and sends */ +} PRShutdownHow; + +NSPR_API(PRStatus) PR_Shutdown(PRFileDesc *fd, PRShutdownHow how); + +/* + ************************************************************************* + * FUNCTION: PR_Recv + * DESCRIPTION: + * Receive a specified number of bytes from a connected socket. + * The operation will block until some positive number of bytes are + * transferred, a time out has occurred, or there is an error. + * No more than 'amount' bytes will be transferred. + * INPUTS: + * PRFileDesc *fd + * points to a PRFileDesc object representing a socket. + * void *buf + * pointer to a buffer to hold the data received. + * PRInt32 amount + * the size of 'buf' (in bytes) + * PRIntn flags + * must be zero or PR_MSG_PEEK. + * PRIntervalTime timeout + * Time limit for completion of the receive operation. + * OUTPUTS: + * None + * RETURN: PRInt32 + * a positive number indicates the number of bytes actually received. + * 0 means the network connection is closed. + * -1 indicates a failure. The reason for the failure is obtained + * by calling PR_GetError(). + ************************************************************************** + */ + +#define PR_MSG_PEEK 0x2 + +NSPR_API(PRInt32) PR_Recv(PRFileDesc *fd, void *buf, PRInt32 amount, + PRIntn flags, PRIntervalTime timeout); + +/* + ************************************************************************* + * FUNCTION: PR_Send + * DESCRIPTION: + * Send a specified number of bytes from a connected socket. + * The operation will block until all bytes are + * processed, a time out has occurred, or there is an error. + * INPUTS: + * PRFileDesc *fd + * points to a PRFileDesc object representing a socket. + * void *buf + * pointer to a buffer from where the data is sent. + * PRInt32 amount + * the size of 'buf' (in bytes) + * PRIntn flags + * (OBSOLETE - must always be zero) + * PRIntervalTime timeout + * Time limit for completion of the send operation. + * OUTPUTS: + * None + * RETURN: PRInt32 + * A positive number indicates the number of bytes successfully processed. + * This number must always equal 'amount'. A -1 is an indication that the + * operation failed. The reason for the failure is obtained by calling + * PR_GetError(). + ************************************************************************** + */ + +NSPR_API(PRInt32) PR_Send(PRFileDesc *fd, const void *buf, PRInt32 amount, + PRIntn flags, PRIntervalTime timeout); + +/* + ************************************************************************* + * FUNCTION: PR_RecvFrom + * DESCRIPTION: + * Receive up to a specified number of bytes from socket which may + * or may not be connected. + * The operation will block until one or more bytes are + * transferred, a time out has occurred, or there is an error. + * No more than 'amount' bytes will be transferred. + * INPUTS: + * PRFileDesc *fd + * points to a PRFileDesc object representing a socket. + * void *buf + * pointer to a buffer to hold the data received. + * PRInt32 amount + * the size of 'buf' (in bytes) + * PRIntn flags + * (OBSOLETE - must always be zero) + * PRNetAddr *addr + * Specifies the address of the sending peer. It may be NULL. + * PRIntervalTime timeout + * Time limit for completion of the receive operation. + * OUTPUTS: + * None + * RETURN: PRInt32 + * a positive number indicates the number of bytes actually received. + * 0 means the network connection is closed. + * -1 indicates a failure. The reason for the failure is obtained + * by calling PR_GetError(). + ************************************************************************** + */ + +NSPR_API(PRInt32) PR_RecvFrom( + PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, + PRNetAddr *addr, PRIntervalTime timeout); + +/* + ************************************************************************* + * FUNCTION: PR_SendTo + * DESCRIPTION: + * Send a specified number of bytes from an unconnected socket. + * The operation will block until all bytes are + * sent, a time out has occurred, or there is an error. + * INPUTS: + * PRFileDesc *fd + * points to a PRFileDesc object representing an unconnected socket. + * void *buf + * pointer to a buffer from where the data is sent. + * PRInt32 amount + * the size of 'buf' (in bytes) + * PRIntn flags + * (OBSOLETE - must always be zero) + * PRNetAddr *addr + * Specifies the address of the peer. +.* PRIntervalTime timeout + * Time limit for completion of the send operation. + * OUTPUTS: + * None + * RETURN: PRInt32 + * A positive number indicates the number of bytes successfully sent. + * -1 indicates a failure. The reason for the failure is obtained + * by calling PR_GetError(). + ************************************************************************** + */ + +NSPR_API(PRInt32) PR_SendTo( + PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, + const PRNetAddr *addr, PRIntervalTime timeout); + +/* +************************************************************************* +** FUNCTION: PR_TransmitFile +** DESCRIPTION: +** Transmitfile sends a complete file (sourceFile) across a socket +** (networkSocket). If headers is non-NULL, the headers will be sent across +** the socket prior to sending the file. +** +** Optionally, the PR_TRANSMITFILE_CLOSE_SOCKET flag may be passed to +** transmitfile. This flag specifies that transmitfile should close the +** socket after sending the data. +** +** INPUTS: +** PRFileDesc *networkSocket +** The socket to send data over +** PRFileDesc *sourceFile +** The file to send +** const void *headers +** A pointer to headers to be sent before sending data +** PRInt32 hlen +** length of header buffers in bytes. +** PRTransmitFileFlags flags +** If the flags indicate that the connection should be closed, +** it will be done immediately after transferring the file, unless +** the operation is unsuccessful. +.* PRIntervalTime timeout + * Time limit for completion of the transmit operation. +** +** RETURNS: +** Returns the number of bytes written or -1 if the operation failed. +** If an error occurs while sending the file, the PR_TRANSMITFILE_CLOSE_ +** SOCKET flag is ignored. The reason for the failure is obtained +** by calling PR_GetError(). +************************************************************************** +*/ + +NSPR_API(PRInt32) PR_TransmitFile( + PRFileDesc *networkSocket, PRFileDesc *sourceFile, + const void *headers, PRInt32 hlen, PRTransmitFileFlags flags, + PRIntervalTime timeout); + +/* +************************************************************************* +** FUNCTION: PR_SendFile +** DESCRIPTION: +** PR_SendFile sends data from a file (sendData->fd) across a socket +** (networkSocket). If specified, a header and/or trailer buffer are sent +** before and after the file, respectively. The file offset, number of bytes +** of file data to send, the header and trailer buffers are specified in the +** sendData argument. +** +** Optionally, if the PR_TRANSMITFILE_CLOSE_SOCKET flag is passed, the +** socket is closed after successfully sending the data. +** +** INPUTS: +** PRFileDesc *networkSocket +** The socket to send data over +** PRSendFileData *sendData +** Contains the FD, file offset and length, header and trailer +** buffer specifications. +** PRTransmitFileFlags flags +** If the flags indicate that the connection should be closed, +** it will be done immediately after transferring the file, unless +** the operation is unsuccessful. +.* PRIntervalTime timeout + * Time limit for completion of the send operation. +** +** RETURNS: +** Returns the number of bytes written or -1 if the operation failed. +** If an error occurs while sending the file, the PR_TRANSMITFILE_CLOSE_ +** SOCKET flag is ignored. The reason for the failure is obtained +** by calling PR_GetError(). +************************************************************************** +*/ + +struct PRSendFileData { + PRFileDesc *fd; /* file to send */ + PRUint32 file_offset; /* file offset */ + PRSize file_nbytes; /* number of bytes of file data to send */ + /* if 0, send data from file_offset to */ + /* end-of-file. */ + const void *header; /* header buffer */ + PRInt32 hlen; /* header len */ + const void *trailer; /* trailer buffer */ + PRInt32 tlen; /* trailer len */ +}; + + +NSPR_API(PRInt32) PR_SendFile( + PRFileDesc *networkSocket, PRSendFileData *sendData, + PRTransmitFileFlags flags, PRIntervalTime timeout); + +/* +************************************************************************* +** FUNCTION: PR_AcceptRead +** DESCRIPTION: +** AcceptRead accepts a new connection, returns the newly created +** socket's descriptor and also returns the connecting peer's address. +** AcceptRead, as its name suggests, also receives the first block of data +** sent by the peer. +** +** INPUTS: +** PRFileDesc *listenSock +** A socket descriptor that has been called with the PR_Listen() +** function, also known as the rendezvous socket. +** void *buf +** A pointer to a buffer to receive data sent by the client. This +** buffer must be large enough to receive <amount> bytes of data +** and two PRNetAddr structures, plus an extra 32 bytes. See: +** PR_ACCEPT_READ_BUF_OVERHEAD. +** PRInt32 amount +** The number of bytes of client data to receive. Does not include +** the size of the PRNetAddr structures. If 0, no data will be read +** from the client. +** PRIntervalTime timeout +** The timeout interval only applies to the read portion of the +** operation. PR_AcceptRead will block indefinitely until the +** connection is accepted; the read will timeout after the timeout +** interval elapses. +** OUTPUTS: +** PRFileDesc **acceptedSock +** The file descriptor for the newly connected socket. This parameter +** will only be valid if the function return does not indicate failure. +** PRNetAddr **peerAddr, +** The address of the remote socket. This parameter will only be +** valid if the function return does not indicate failure. The +** returned address is not guaranteed to be properly aligned. +** +** RETURNS: +** The number of bytes read from the client or -1 on failure. The reason +** for the failure is obtained by calling PR_GetError(). +************************************************************************** +**/ +/* define buffer overhead constant. Add this value to the user's +** data length when allocating a buffer to accept data. +** Example: +** #define USER_DATA_SIZE 10 +** char buf[USER_DATA_SIZE + PR_ACCEPT_READ_BUF_OVERHEAD]; +** bytesRead = PR_AcceptRead( s, fd, &a, &p, USER_DATA_SIZE, ...); +*/ +#define PR_ACCEPT_READ_BUF_OVERHEAD (32+(2*sizeof(PRNetAddr))) + +NSPR_API(PRInt32) PR_AcceptRead( + PRFileDesc *listenSock, PRFileDesc **acceptedSock, + PRNetAddr **peerAddr, void *buf, PRInt32 amount, PRIntervalTime timeout); + +/* +************************************************************************* +** FUNCTION: PR_NewTCPSocketPair +** DESCRIPTION: +** Create a new TCP socket pair. The returned descriptors can be used +** interchangeably; they are interconnected full-duplex descriptors: data +** written to one can be read from the other and vice-versa. +** +** INPUTS: +** None +** OUTPUTS: +** PRFileDesc *fds[2] +** The file descriptor pair for the newly created TCP sockets. +** RETURN: PRStatus +** Upon successful completion of TCP socket pair, PR_NewTCPSocketPair +** returns PR_SUCCESS. Otherwise, it returns PR_FAILURE. Further +** failure information can be obtained by calling PR_GetError(). +** XXX can we implement this on windoze and mac? +************************************************************************** +**/ +NSPR_API(PRStatus) PR_NewTCPSocketPair(PRFileDesc *fds[2]); + +/* +************************************************************************* +** FUNCTION: PR_GetSockName +** DESCRIPTION: +** Get socket name. Return the network address for this socket. +** +** INPUTS: +** PRFileDesc *fd +** Points to a PRFileDesc object representing the socket. +** OUTPUTS: +** PRNetAddr *addr +** Returns the address of the socket in its own communication space. +** RETURN: PRStatus +** Upon successful completion, PR_GetSockName returns PR_SUCCESS. +** Otherwise, it returns PR_FAILURE. Further failure information can +** be obtained by calling PR_GetError(). +************************************************************************** +**/ +NSPR_API(PRStatus) PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr); + +/* +************************************************************************* +** FUNCTION: PR_GetPeerName +** DESCRIPTION: +** Get name of the connected peer. Return the network address for the +** connected peer socket. +** +** INPUTS: +** PRFileDesc *fd +** Points to a PRFileDesc object representing the connected peer. +** OUTPUTS: +** PRNetAddr *addr +** Returns the address of the connected peer in its own communication +** space. +** RETURN: PRStatus +** Upon successful completion, PR_GetPeerName returns PR_SUCCESS. +** Otherwise, it returns PR_FAILURE. Further failure information can +** be obtained by calling PR_GetError(). +************************************************************************** +**/ +NSPR_API(PRStatus) PR_GetPeerName(PRFileDesc *fd, PRNetAddr *addr); + +NSPR_API(PRStatus) PR_GetSocketOption( + PRFileDesc *fd, PRSocketOptionData *data); + +NSPR_API(PRStatus) PR_SetSocketOption( + PRFileDesc *fd, const PRSocketOptionData *data); + +/* + ********************************************************************* + * + * File descriptor inheritance + * + ********************************************************************* + */ + +/* + ************************************************************************ + * FUNCTION: PR_SetFDInheritable + * DESCRIPTION: + * Set the inheritance attribute of a file descriptor. + * + * INPUTS: + * PRFileDesc *fd + * Points to a PRFileDesc object. + * PRBool inheritable + * If PR_TRUE, the file descriptor fd is set to be inheritable + * by a child process. If PR_FALSE, the file descriptor is set + * to be not inheritable by a child process. + * RETURN: PRStatus + * Upon successful completion, PR_SetFDInheritable returns PR_SUCCESS. + * Otherwise, it returns PR_FAILURE. Further failure information can + * be obtained by calling PR_GetError(). + ************************************************************************* + */ +NSPR_API(PRStatus) PR_SetFDInheritable( + PRFileDesc *fd, + PRBool inheritable); + +/* + ************************************************************************ + * FUNCTION: PR_GetInheritedFD + * DESCRIPTION: + * Get an inherited file descriptor with the specified name. + * + * INPUTS: + * const char *name + * The name of the inherited file descriptor. + * RETURN: PRFileDesc * + * Upon successful completion, PR_GetInheritedFD returns the + * inherited file descriptor with the specified name. Otherwise, + * it returns NULL. Further failure information can be obtained + * by calling PR_GetError(). + ************************************************************************* + */ +NSPR_API(PRFileDesc *) PR_GetInheritedFD(const char *name); + +/* + ********************************************************************* + * + * Memory-mapped files + * + ********************************************************************* + */ + +typedef struct PRFileMap PRFileMap; + +/* + * protection options for read and write accesses of a file mapping + */ +typedef enum PRFileMapProtect { + PR_PROT_READONLY, /* read only */ + PR_PROT_READWRITE, /* readable, and write is shared */ + PR_PROT_WRITECOPY /* readable, and write is private (copy-on-write) */ +} PRFileMapProtect; + +NSPR_API(PRFileMap *) PR_CreateFileMap( + PRFileDesc *fd, + PRInt64 size, + PRFileMapProtect prot); + +/* + * return the alignment (in bytes) of the offset argument to PR_MemMap + */ +NSPR_API(PRInt32) PR_GetMemMapAlignment(void); + +NSPR_API(void *) PR_MemMap( + PRFileMap *fmap, + PROffset64 offset, /* must be aligned and sized according to the + * return value of PR_GetMemMapAlignment() */ + PRUint32 len); + +NSPR_API(PRStatus) PR_MemUnmap(void *addr, PRUint32 len); + +NSPR_API(PRStatus) PR_CloseFileMap(PRFileMap *fmap); + +/* + ****************************************************************** + * + * Interprocess communication + * + ****************************************************************** + */ + +/* + * Creates an anonymous pipe and returns file descriptors for the + * read and write ends of the pipe. + */ + +NSPR_API(PRStatus) PR_CreatePipe( + PRFileDesc **readPipe, + PRFileDesc **writePipe +); + +/************************************************************************/ +/************** The following definitions are for poll ******************/ +/************************************************************************/ + +struct PRPollDesc { + PRFileDesc* fd; + PRInt16 in_flags; + PRInt16 out_flags; +}; + +/* +** Bit values for PRPollDesc.in_flags or PRPollDesc.out_flags. Binary-or +** these together to produce the desired poll request. +*/ + +#if defined(_PR_POLL_BACKCOMPAT) + +#include <poll.h> +#define PR_POLL_READ POLLIN +#define PR_POLL_WRITE POLLOUT +#define PR_POLL_EXCEPT POLLPRI +#define PR_POLL_ERR POLLERR /* only in out_flags */ +#define PR_POLL_NVAL POLLNVAL /* only in out_flags when fd is bad */ +#define PR_POLL_HUP POLLHUP /* only in out_flags */ + +#else /* _PR_POLL_BACKCOMPAT */ + +#define PR_POLL_READ 0x1 +#define PR_POLL_WRITE 0x2 +#define PR_POLL_EXCEPT 0x4 +#define PR_POLL_ERR 0x8 /* only in out_flags */ +#define PR_POLL_NVAL 0x10 /* only in out_flags when fd is bad */ +#define PR_POLL_HUP 0x20 /* only in out_flags */ + +#endif /* _PR_POLL_BACKCOMPAT */ + +/* +************************************************************************* +** FUNCTION: PR_Poll +** DESCRIPTION: +** +** The call returns as soon as I/O is ready on one or more of the underlying +** socket objects. A count of the number of ready descriptors is +** returned unless a timeout occurs in which case zero is returned. +** +** PRPollDesc.fd should be set to a pointer to a PRFileDesc object +** representing a socket. This field can be set to NULL to indicate to +** PR_Poll that this PRFileDesc object should be ignored. +** PRPollDesc.in_flags should be set to the desired request +** (read/write/except or some combination). Upon successful return from +** this call PRPollDesc.out_flags will be set to indicate what kind of +** i/o can be performed on the respective descriptor. PR_Poll() uses the +** out_flags fields as scratch variables during the call. If PR_Poll() +** returns 0 or -1, the out_flags fields do not contain meaningful values +** and must not be used. +** +** INPUTS: +** PRPollDesc *pds A pointer to an array of PRPollDesc +** +** PRIntn npds The number of elements in the array +** If this argument is zero PR_Poll is +** equivalent to a PR_Sleep(timeout). +** +** PRIntervalTime timeout Amount of time the call will block waiting +** for I/O to become ready. If this time expires +** w/o any I/O becoming ready, the result will +** be zero. +** +** OUTPUTS: None +** RETURN: +** PRInt32 Number of PRPollDesc's with events or zero +** if the function timed out or -1 on failure. +** The reason for the failure is obtained by +** calling PR_GetError(). +************************************************************************** +*/ +NSPR_API(PRInt32) PR_Poll( + PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout); + +/* +************************************************************************** +** +** Pollable events +** +** A pollable event is a special kind of file descriptor. +** The only I/O operation you can perform on a pollable event +** is to poll it with the PR_POLL_READ flag. You can't +** read from or write to a pollable event. +** +** The purpose of a pollable event is to combine event waiting +** with I/O waiting in a single PR_Poll call. Pollable events +** are implemented using a pipe or a pair of TCP sockets +** connected via the loopback address, therefore setting and +** waiting for pollable events are expensive operating system +** calls. Do not use pollable events for general thread +** synchronization. Use condition variables instead. +** +** A pollable event has two states: set and unset. Events +** are not queued, so there is no notion of an event count. +** A pollable event is either set or unset. +** +** A new pollable event is created by a PR_NewPollableEvent +** call and is initially in the unset state. +** +** PR_WaitForPollableEvent blocks the calling thread until +** the pollable event is set, and then it atomically unsets +** the pollable event before it returns. +** +** To set a pollable event, call PR_SetPollableEvent. +** +** One can call PR_Poll with the PR_POLL_READ flag on a pollable +** event. When the pollable event is set, PR_Poll returns with +** the PR_POLL_READ flag set in the out_flags. +** +** To close a pollable event, call PR_DestroyPollableEvent +** (not PR_Close). +** +************************************************************************** +*/ + +NSPR_API(PRFileDesc *) PR_NewPollableEvent(void); + +NSPR_API(PRStatus) PR_DestroyPollableEvent(PRFileDesc *event); + +NSPR_API(PRStatus) PR_SetPollableEvent(PRFileDesc *event); + +NSPR_API(PRStatus) PR_WaitForPollableEvent(PRFileDesc *event); + +PR_END_EXTERN_C + +#endif /* prio_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/pripcsem.h b/Src/nprt_plugin/gecko/1.8/win/include/pripcsem.h new file mode 100644 index 00000000..5a96be58 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/pripcsem.h @@ -0,0 +1,133 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1999-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* + * File: pripcsem.h + * + * Description: named semaphores for interprocess + * synchronization + * + * Unrelated processes obtain access to a shared semaphore + * by specifying its name. + * + * Our goal is to support named semaphores on at least + * Unix and Win32 platforms. The implementation will use + * one of the three native semaphore APIs: POSIX, System V, + * and Win32. + * + * Because POSIX named semaphores have kernel persistence, + * we are forced to have a delete function in this API. + */ + +#ifndef pripcsem_h___ +#define pripcsem_h___ + +#include "prtypes.h" +#include "prio.h" + +PR_BEGIN_EXTERN_C + +/* + * PRSem is an opaque structure that represents a named + * semaphore. + */ +typedef struct PRSem PRSem; + +/* + * PR_OpenSemaphore -- + * + * Create or open a named semaphore with the specified name. + * A handle to the semaphore is returned. + * + * If the named semaphore doesn't exist and the PR_SEM_CREATE + * flag is specified, the named semaphore is created. The + * created semaphore needs to be removed from the system with + * a PR_DeleteSemaphore call. + * + * If PR_SEM_CREATE is specified, the third argument is the + * access permission bits of the new semaphore (same + * interpretation as the mode argument to PR_Open) and the + * fourth argument is the initial value of the new semaphore. + * If PR_SEM_CREATE is not specified, the third and fourth + * arguments are ignored. + */ + +#define PR_SEM_CREATE 0x1 /* create if not exist */ +#define PR_SEM_EXCL 0x2 /* fail if already exists */ + +NSPR_API(PRSem *) PR_OpenSemaphore( + const char *name, PRIntn flags, PRIntn mode, PRUintn value); + +/* + * PR_WaitSemaphore -- + * + * If the value of the semaphore is > 0, decrement the value and return. + * If the value is 0, sleep until the value becomes > 0, then decrement + * the value and return. + * + * The "test and decrement" operation is performed atomically. + */ + +NSPR_API(PRStatus) PR_WaitSemaphore(PRSem *sem); + +/* + * PR_PostSemaphore -- + * + * Increment the value of the named semaphore by 1. + */ + +NSPR_API(PRStatus) PR_PostSemaphore(PRSem *sem); + +/* + * PR_CloseSemaphore -- + * + * Close a named semaphore handle. + */ + +NSPR_API(PRStatus) PR_CloseSemaphore(PRSem *sem); + +/* + * PR_DeleteSemaphore -- + * + * Remove a named semaphore from the system. + */ + +NSPR_API(PRStatus) PR_DeleteSemaphore(const char *name); + +PR_END_EXTERN_C + +#endif /* pripcsem_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/private/pprio.h b/Src/nprt_plugin/gecko/1.8/win/include/private/pprio.h new file mode 100644 index 00000000..55417cf2 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/private/pprio.h @@ -0,0 +1,265 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: pprio.h +** +** Description: Private definitions for I/O related structures +*/ + +#ifndef pprio_h___ +#define pprio_h___ + +#include "prtypes.h" +#include "prio.h" + +PR_BEGIN_EXTERN_C + +/************************************************************************/ +/************************************************************************/ + +/* Return the method tables for files, tcp sockets and udp sockets */ +NSPR_API(const PRIOMethods*) PR_GetFileMethods(void); +NSPR_API(const PRIOMethods*) PR_GetTCPMethods(void); +NSPR_API(const PRIOMethods*) PR_GetUDPMethods(void); +NSPR_API(const PRIOMethods*) PR_GetPipeMethods(void); + +/* +** Convert a NSPR Socket Handle to a Native Socket handle. +** This function will be obsoleted with the next release; avoid using it. +*/ +NSPR_API(PRInt32) PR_FileDesc2NativeHandle(PRFileDesc *); +NSPR_API(void) PR_ChangeFileDescNativeHandle(PRFileDesc *, PRInt32); +NSPR_API(PRFileDesc*) PR_AllocFileDesc(PRInt32 osfd, + const PRIOMethods *methods); +NSPR_API(void) PR_FreeFileDesc(PRFileDesc *fd); +/* +** Import an existing OS file to NSPR. +*/ +NSPR_API(PRFileDesc*) PR_ImportFile(PRInt32 osfd); +NSPR_API(PRFileDesc*) PR_ImportPipe(PRInt32 osfd); +NSPR_API(PRFileDesc*) PR_ImportTCPSocket(PRInt32 osfd); +NSPR_API(PRFileDesc*) PR_ImportUDPSocket(PRInt32 osfd); + + +/* + ************************************************************************* + * FUNCTION: PR_CreateSocketPollFd + * DESCRIPTION: + * Create a PRFileDesc wrapper for a native socket handle, for use with + * PR_Poll only + * INPUTS: + * None + * OUTPUTS: + * None + * RETURN: PRFileDesc* + * Upon successful completion, PR_CreateSocketPollFd returns a pointer + * to the PRFileDesc created for the native socket handle + * Returns a NULL pointer if the create of a new PRFileDesc failed + * + ************************************************************************** + */ + +NSPR_API(PRFileDesc*) PR_CreateSocketPollFd(PRInt32 osfd); + +/* + ************************************************************************* + * FUNCTION: PR_DestroySocketPollFd + * DESCRIPTION: + * Destroy the PRFileDesc wrapper created by PR_CreateSocketPollFd + * INPUTS: + * None + * OUTPUTS: + * None + * RETURN: PRFileDesc* + * Upon successful completion, PR_DestroySocketPollFd returns + * PR_SUCCESS, else PR_FAILURE + * + ************************************************************************** + */ + +NSPR_API(PRStatus) PR_DestroySocketPollFd(PRFileDesc *fd); + + +/* +** Macros for PR_Socket +** +** Socket types: PR_SOCK_STREAM, PR_SOCK_DGRAM +*/ + +#ifdef WIN32 + +#define PR_SOCK_STREAM 1 +#define PR_SOCK_DGRAM 2 + +#else /* WIN32 */ + +#define PR_SOCK_STREAM SOCK_STREAM +#define PR_SOCK_DGRAM SOCK_DGRAM + +#endif /* WIN32 */ + +/* +** Create a new Socket; this function is obsolete. +*/ +NSPR_API(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto); + +/* FUNCTION: PR_LockFile +** DESCRIPTION: +** Lock a file for exclusive access. +** RETURNS: +** PR_SUCCESS when the lock is held +** PR_FAILURE otherwise +*/ +NSPR_API(PRStatus) PR_LockFile(PRFileDesc *fd); + +/* FUNCTION: PR_TLockFile +** DESCRIPTION: +** Test and Lock a file for exclusive access. Do not block if the +** file cannot be locked immediately. +** RETURNS: +** PR_SUCCESS when the lock is held +** PR_FAILURE otherwise +*/ +NSPR_API(PRStatus) PR_TLockFile(PRFileDesc *fd); + +/* FUNCTION: PR_UnlockFile +** DESCRIPTION: +** Unlock a file which has been previously locked successfully by this +** process. +** RETURNS: +** PR_SUCCESS when the lock is released +** PR_FAILURE otherwise +*/ +NSPR_API(PRStatus) PR_UnlockFile(PRFileDesc *fd); + +/* +** Emulate acceptread by accept and recv. +*/ +NSPR_API(PRInt32) PR_EmulateAcceptRead(PRFileDesc *sd, PRFileDesc **nd, + PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout); + +/* +** Emulate sendfile by reading from the file and writing to the socket. +** The file is memory-mapped if memory-mapped files are supported. +*/ +NSPR_API(PRInt32) PR_EmulateSendFile( + PRFileDesc *networkSocket, PRSendFileData *sendData, + PRTransmitFileFlags flags, PRIntervalTime timeout); + +#ifdef WIN32 +/* FUNCTION: PR_NTFast_AcceptRead +** DESCRIPTION: +** NT has the notion of an "accept context", which is only needed in +** order to make certain calls. By default, a socket connected via +** AcceptEx can only do a limited number of things without updating +** the acceptcontext. The generic version of PR_AcceptRead always +** updates the accept context. This version does not. +**/ +NSPR_API(PRInt32) PR_NTFast_AcceptRead(PRFileDesc *sd, PRFileDesc **nd, + PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime t); + +typedef void (*_PR_AcceptTimeoutCallback)(void *); + +/* FUNCTION: PR_NTFast_AcceptRead_WithTimeoutCallback +** DESCRIPTION: +** The AcceptEx call combines the accept with the read function. However, +** our daemon threads need to be able to wakeup and reliably flush their +** log buffers if the Accept times out. However, with the current blocking +** interface to AcceptRead, there is no way for us to timeout the Accept; +** this is because when we timeout the Read, we can close the newly +** socket and continue; but when we timeout the accept itself, there is no +** new socket to timeout. So instead, this version of the function is +** provided. After the initial timeout period elapses on the accept() +** portion of the function, it will call the callback routine and then +** continue the accept. If the timeout occurs on the read, it will +** close the connection and return error. +*/ +NSPR_API(PRInt32) PR_NTFast_AcceptRead_WithTimeoutCallback( + PRFileDesc *sd, + PRFileDesc **nd, + PRNetAddr **raddr, + void *buf, + PRInt32 amount, + PRIntervalTime t, + _PR_AcceptTimeoutCallback callback, + void *callback_arg); + +/* FUNCTION: PR_NTFast_Accept +** DESCRIPTION: +** NT has the notion of an "accept context", which is only needed in +** order to make certain calls. By default, a socket connected via +** AcceptEx can only do a limited number of things without updating +** the acceptcontext. The generic version of PR_Accept always +** updates the accept context. This version does not. +**/ +NSPR_API(PRFileDesc*) PR_NTFast_Accept(PRFileDesc *fd, PRNetAddr *addr, + PRIntervalTime timeout); + +/* FUNCTION: PR_NTFast_Update +** DESCRIPTION: +** For sockets accepted with PR_NTFast_Accept or PR_NTFastAcceptRead, +** this function will update the accept context for those sockets, +** so that the socket can make general purpose socket calls. +** Without calling this, the only operations supported on the socket +** Are PR_Read, PR_Write, PR_Transmitfile, and PR_Close. +*/ +NSPR_API(void) PR_NTFast_UpdateAcceptContext(PRFileDesc *acceptSock, + PRFileDesc *listenSock); + + +/* FUNCTION: PR_NT_CancelIo +** DESCRIPTION: +** Cancel IO operations on fd. +*/ +NSPR_API(PRStatus) PR_NT_CancelIo(PRFileDesc *fd); + + +#endif /* WIN32 */ + +/* +** Need external access to this on Mac so we can first set up our faux +** environment vars +*/ +#ifdef XP_MAC +NSPR_API(void) PR_Init_Log(void); +#endif + + +PR_END_EXTERN_C + +#endif /* pprio_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/private/pprthred.h b/Src/nprt_plugin/gecko/1.8/win/include/private/pprthred.h new file mode 100644 index 00000000..c9413396 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/private/pprthred.h @@ -0,0 +1,373 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef pprthred_h___ +#define pprthred_h___ + +/* +** API for PR private functions. These calls are to be used by internal +** developers only. +*/ +#include "nspr.h" + +#if defined(XP_OS2) +#define INCL_DOS +#define INCL_DOSERRORS +#define INCL_WIN +#include <os2.h> +#endif + +PR_BEGIN_EXTERN_C + +/*--------------------------------------------------------------------------- +** THREAD PRIVATE FUNCTIONS +---------------------------------------------------------------------------*/ + +/* +** Associate a thread object with an existing native thread. +** "type" is the type of thread object to attach +** "priority" is the priority to assign to the thread +** "stack" defines the shape of the threads stack +** +** This can return NULL if some kind of error occurs, or if memory is +** tight. This call invokes "start(obj,arg)" and returns when the +** function returns. The thread object is automatically destroyed. +** +** This call is not normally needed unless you create your own native +** thread. PR_Init does this automatically for the primordial thread. +*/ +NSPR_API(PRThread*) PR_AttachThread(PRThreadType type, + PRThreadPriority priority, + PRThreadStack *stack); + +/* +** Detach the nspr thread from the currently executing native thread. +** The thread object will be destroyed and all related data attached +** to it. The exit procs will be invoked. +** +** This call is not normally needed unless you create your own native +** thread. PR_Exit will automatially detach the nspr thread object +** created by PR_Init for the primordial thread. +** +** This call returns after the nspr thread object is destroyed. +*/ +NSPR_API(void) PR_DetachThread(void); + +/* +** Get the id of the named thread. Each thread is assigned a unique id +** when it is created or attached. +*/ +NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread); + +/* +** Set the procedure that is called when a thread is dumped. The procedure +** will be applied to the argument, arg, when called. Setting the procedure +** to NULL effectively removes it. +*/ +typedef void (*PRThreadDumpProc)(PRFileDesc *fd, PRThread *t, void *arg); +NSPR_API(void) PR_SetThreadDumpProc( + PRThread* thread, PRThreadDumpProc dump, void *arg); + +/* +** Get this thread's affinity mask. The affinity mask is a 32 bit quantity +** marking a bit for each processor this process is allowed to run on. +** The processor mask is returned in the mask argument. +** The least-significant-bit represents processor 0. +** +** Returns 0 on success, -1 on failure. +*/ +NSPR_API(PRInt32) PR_GetThreadAffinityMask(PRThread *thread, PRUint32 *mask); + +/* +** Set this thread's affinity mask. +** +** Returns 0 on success, -1 on failure. +*/ +NSPR_API(PRInt32) PR_SetThreadAffinityMask(PRThread *thread, PRUint32 mask ); + +/* +** Set the default CPU Affinity mask. +** +*/ +NSPR_API(PRInt32) PR_SetCPUAffinityMask(PRUint32 mask); + +/* +** Show status of all threads to standard error output. +*/ +NSPR_API(void) PR_ShowStatus(void); + +/* +** Set thread recycle mode to on (1) or off (0) +*/ +NSPR_API(void) PR_SetThreadRecycleMode(PRUint32 flag); + + +/*--------------------------------------------------------------------------- +** THREAD PRIVATE FUNCTIONS FOR GARBAGE COLLECTIBLE THREADS +---------------------------------------------------------------------------*/ + +/* +** Only Garbage collectible threads participate in resume all, suspend all and +** enumeration operations. They are also different during creation when +** platform specific action may be needed (For example, all Solaris GC able +** threads are bound threads). +*/ + +/* +** Same as PR_CreateThread except that the thread is marked as garbage +** collectible. +*/ +NSPR_API(PRThread*) PR_CreateThreadGCAble(PRThreadType type, + void (*start)(void *arg), + void *arg, + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); + +/* +** Same as PR_AttachThread except that the thread being attached is marked as +** garbage collectible. +*/ +NSPR_API(PRThread*) PR_AttachThreadGCAble(PRThreadType type, + PRThreadPriority priority, + PRThreadStack *stack); + +/* +** Mark the thread as garbage collectible. +*/ +NSPR_API(void) PR_SetThreadGCAble(void); + +/* +** Unmark the thread as garbage collectible. +*/ +NSPR_API(void) PR_ClearThreadGCAble(void); + +/* +** This routine prevents all other GC able threads from running. This call is needed by +** the garbage collector. +*/ +NSPR_API(void) PR_SuspendAll(void); + +/* +** This routine unblocks all other GC able threads that were suspended from running by +** PR_SuspendAll(). This call is needed by the garbage collector. +*/ +NSPR_API(void) PR_ResumeAll(void); + +/* +** Return the thread stack pointer of the given thread. +** Needed by the garbage collector. +*/ +NSPR_API(void *) PR_GetSP(PRThread *thread); + +/* +** Save the registers that the GC would find interesting into the thread +** "t". isCurrent will be non-zero if the thread state that is being +** saved is the currently executing thread. Return the address of the +** first register to be scanned as well as the number of registers to +** scan in "np". +** +** If "isCurrent" is non-zero then it is allowed for the thread context +** area to be used as scratch storage to hold just the registers +** necessary for scanning. +** +** This function simply calls the internal function _MD_HomeGCRegisters(). +*/ +NSPR_API(PRWord *) PR_GetGCRegisters(PRThread *t, int isCurrent, int *np); + +/* +** (Get|Set)ExecutionEnvironent +** +** Used by Java to associate it's execution environment so garbage collector +** can find it. If return is NULL, then it's probably not a collectable thread. +** +** There's no locking required around these calls. +*/ +NSPR_API(void*) GetExecutionEnvironment(PRThread *thread); +NSPR_API(void) SetExecutionEnvironment(PRThread* thread, void *environment); + +/* +** Enumeration function that applies "func(thread,i,arg)" to each active +** thread in the process. The enumerator returns PR_SUCCESS if the enumeration +** should continue, any other value is considered failure, and enumeration +** stops, returning the failure value from PR_EnumerateThreads. +** Needed by the garbage collector. +*/ +typedef PRStatus (PR_CALLBACK *PREnumerator)(PRThread *t, int i, void *arg); +NSPR_API(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg); + +/* +** Signature of a thread stack scanning function. It is applied to every +** contiguous group of potential pointers within a thread. Count denotes the +** number of pointers. +*/ +typedef PRStatus +(PR_CALLBACK *PRScanStackFun)(PRThread* t, + void** baseAddr, PRUword count, void* closure); + +/* +** Applies scanFun to all contiguous groups of potential pointers +** within a thread. This includes the stack, registers, and thread-local +** data. If scanFun returns a status value other than PR_SUCCESS the scan +** is aborted, and the status value is returned. +*/ +NSPR_API(PRStatus) +PR_ThreadScanStackPointers(PRThread* t, + PRScanStackFun scanFun, void* scanClosure); + +/* +** Calls PR_ThreadScanStackPointers for every thread. +*/ +NSPR_API(PRStatus) +PR_ScanStackPointers(PRScanStackFun scanFun, void* scanClosure); + +/* +** Returns a conservative estimate on the amount of stack space left +** on a thread in bytes, sufficient for making decisions about whether +** to continue recursing or not. +*/ +NSPR_API(PRUword) +PR_GetStackSpaceLeft(PRThread* t); + +/*--------------------------------------------------------------------------- +** THREAD CPU PRIVATE FUNCTIONS +---------------------------------------------------------------------------*/ + +/* +** Get a pointer to the primordial CPU. +*/ +NSPR_API(struct _PRCPU *) _PR_GetPrimordialCPU(void); + +/*--------------------------------------------------------------------------- +** THREAD SYNCHRONIZATION PRIVATE FUNCTIONS +---------------------------------------------------------------------------*/ + +/* +** Create a new named monitor (named for debugging purposes). +** Monitors are re-entrant locks with a built-in condition variable. +** +** This may fail if memory is tight or if some operating system resource +** is low. +*/ +NSPR_API(PRMonitor*) PR_NewNamedMonitor(const char* name); + +/* +** Test and then lock the lock if it's not already locked by some other +** thread. Return PR_FALSE if some other thread owned the lock at the +** time of the call. +*/ +NSPR_API(PRBool) PR_TestAndLock(PRLock *lock); + +/* +** Test and then enter the mutex associated with the monitor if it's not +** already entered by some other thread. Return PR_FALSE if some other +** thread owned the mutex at the time of the call. +*/ +NSPR_API(PRBool) PR_TestAndEnterMonitor(PRMonitor *mon); + +/* +** Return the number of times that the current thread has entered the +** mutex. Returns zero if the current thread has not entered the mutex. +*/ +NSPR_API(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon); + +/* +** Just like PR_CEnterMonitor except that if the monitor is owned by +** another thread NULL is returned. +*/ +NSPR_API(PRMonitor*) PR_CTestAndEnterMonitor(void *address); + +/*--------------------------------------------------------------------------- +** PLATFORM-SPECIFIC THREAD SYNCHRONIZATION FUNCTIONS +---------------------------------------------------------------------------*/ +#if defined(XP_MAC) + +NSPR_API(void) PR_Mac_WaitForAsyncNotify(PRIntervalTime timeout); +NSPR_API(void) PR_Mac_PostAsyncNotify(PRThread *thread); + +#endif /* XP_MAC */ + +/*--------------------------------------------------------------------------- +** PLATFORM-SPECIFIC INITIALIZATION FUNCTIONS +---------------------------------------------------------------------------*/ +#if defined(IRIX) +/* +** Irix specific initialization funtion to be called before PR_Init +** is called by the application. Sets the CONF_INITUSERS and CONF_INITSIZE +** attributes of the shared arena set up by nspr. +** +** The environment variables _NSPR_IRIX_INITUSERS and _NSPR_IRIX_INITSIZE +** can also be used to set these arena attributes. If _NSPR_IRIX_INITUSERS +** is set, but not _NSPR_IRIX_INITSIZE, the value of the CONF_INITSIZE +** attribute of the nspr arena is scaled as a function of the +** _NSPR_IRIX_INITUSERS value. +** +** If the _PR_Irix_Set_Arena_Params() is called in addition to setting the +** environment variables, the values of the environment variables are used. +** +*/ +NSPR_API(void) _PR_Irix_Set_Arena_Params(PRInt32 initusers, PRInt32 initsize); + +#endif /* IRIX */ + +#if defined(XP_OS2) +/* +** These functions need to be called at the start and end of a thread. +** An EXCEPTIONREGISTRATIONRECORD must be declared on the stack and its +** address passed to the two functions. +*/ +NSPR_API(void) PR_OS2_SetFloatExcpHandler(EXCEPTIONREGISTRATIONRECORD* e); +NSPR_API(void) PR_OS2_UnsetFloatExcpHandler(EXCEPTIONREGISTRATIONRECORD* e); +#endif /* XP_OS2 */ + +/* I think PR_GetMonitorEntryCount is useless. All you really want is this... */ +#define PR_InMonitor(m) (PR_GetMonitorEntryCount(m) > 0) + +/*--------------------------------------------------------------------------- +** Special X-Lock hack for client +---------------------------------------------------------------------------*/ + +#ifdef XP_UNIX +extern void PR_XLock(void); +extern void PR_XUnlock(void); +extern PRBool PR_XIsLocked(void); +#endif /* XP_UNIX */ + +PR_END_EXTERN_C + +#endif /* pprthred_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/private/prpriv.h b/Src/nprt_plugin/gecko/1.8/win/include/private/prpriv.h new file mode 100644 index 00000000..780376e8 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/private/prpriv.h @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prpriv_h___ +#define prpriv_h___ + +/* + * NSPR 2.0 Private API + */ + +#ifndef XP_MAC +#include "private/pprio.h" +#include "private/pprthred.h" +#else +#include "pprio.h" +#include "pprthred.h" +#endif + +#endif /* prpriv_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prlink.h b/Src/nprt_plugin/gecko/1.8/win/include/prlink.h new file mode 100644 index 00000000..b2eb5141 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prlink.h @@ -0,0 +1,255 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prlink_h___ +#define prlink_h___ + +/* +** API to static and dynamic linking. +*/ +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +typedef struct PRLibrary PRLibrary; + +typedef struct PRStaticLinkTable { + const char *name; + void (*fp)(); +} PRStaticLinkTable; + +/* +** Change the default library path to the given string. The string is +** copied. This call will fail if it runs out of memory. +** +** The string provided as 'path' is copied. The caller can do whatever is +** convenient with the argument when the function is complete. +*/ +NSPR_API(PRStatus) PR_SetLibraryPath(const char *path); + +/* +** Return a character string which contains the path used to search for +** dynamically loadable libraries. +** +** The returned value is basically a copy of a PR_SetLibraryPath(). +** The storage is allocated by the runtime and becomes the responsibilty +** of the caller. +*/ +NSPR_API(char*) PR_GetLibraryPath(void); + +/* +** Given a directory name "dir" and a library name "lib" construct a full +** path name that will refer to the actual dynamically loaded +** library. This does not test for existance of said file, it just +** constructs the full filename. The name constructed is system dependent +** and prepared for PR_LoadLibrary. The result must be free'd when the +** caller is done with it. +** +** The storage for the result is allocated by the runtime and becomes the +** responsibility of the caller. +*/ +NSPR_API(char*) PR_GetLibraryName(const char *dir, const char *lib); + +/* +** +** Free the memory allocated, for the caller, by PR_GetLibraryName +*/ +NSPR_API(void) PR_FreeLibraryName(char *mem); + +/* +** Given a library "name" try to load the library. The argument "name" +** is a machine-dependent name for the library, such as the full pathname +** returned by PR_GetLibraryName. If the library is already loaded, +** this function will avoid loading the library twice. +** +** If the library is loaded successfully, then a pointer to the PRLibrary +** structure representing the library is returned. Otherwise, NULL is +** returned. +** +** This increments the reference count of the library. +*/ +NSPR_API(PRLibrary*) PR_LoadLibrary(const char *name); + +/* +** Each operating system has its preferred way of specifying +** a file in the file system. Most operating systems use +** a pathname. Mac OS, on the other hand, uses the FSSpec +** structure to specify a file. PRLibSpec allows NSPR clients +** to use the type of file specification that is most efficient +** for a particular platform. +** +** On some operating systems such as Mac OS, a shared library may +** contain code fragments that can be individually loaded. +** PRLibSpec also allows NSPR clients to identify a code fragment +** in a library, if code fragments are supported by the OS. +** A code fragment can be specified by name or by an integer index. +** +** Right now PRLibSpec supports three types of library specification: +** a pathname, a Mac code fragment by name, and a Mac code fragment +** by index. +*/ + +typedef enum PRLibSpecType { + PR_LibSpec_Pathname, + PR_LibSpec_MacNamedFragment, /* obsolete (for Mac OS Classic) */ + PR_LibSpec_MacIndexedFragment /* obsolete (for Mac OS Classic) */ +} PRLibSpecType; + +struct FSSpec; /* Mac OS FSSpec */ + +typedef struct PRLibSpec { + PRLibSpecType type; + union { + /* if type is PR_LibSpec_Pathname */ + const char *pathname; + + /* if type is PR_LibSpec_MacNamedFragment */ + struct { + const struct FSSpec *fsspec; + const char *name; + } mac_named_fragment; /* obsolete (for Mac OS Classic) */ + + /* if type is PR_LibSpec_MacIndexedFragment */ + struct { + const struct FSSpec *fsspec; + PRUint32 index; + } mac_indexed_fragment; /* obsolete (for Mac OS Classic) */ + } value; +} PRLibSpec; + +/* +** The following bit flags may be or'd together and passed +** as the 'flags' argument to PR_LoadLibraryWithFlags. +** Flags not supported by the underlying OS are ignored. +*/ + +#define PR_LD_LAZY 0x1 /* equivalent to RTLD_LAZY on Unix */ +#define PR_LD_NOW 0x2 /* equivalent to RTLD_NOW on Unix */ +#define PR_LD_GLOBAL 0x4 /* equivalent to RTLD_GLOBAL on Unix */ +#define PR_LD_LOCAL 0x8 /* equivalent to RTLD_LOCAL on Unix */ + +/* +** Load the specified library, in the manner specified by 'flags'. +*/ + +NSPR_API(PRLibrary *) +PR_LoadLibraryWithFlags( + PRLibSpec libSpec, /* the shared library */ + PRIntn flags /* flags that affect the loading */ +); + +/* +** Unload a previously loaded library. If the library was a static +** library then the static link table will no longer be referenced. The +** associated PRLibrary object is freed. +** +** PR_FAILURE is returned if the library cannot be unloaded. +** +** This function decrements the reference count of the library. +*/ +NSPR_API(PRStatus) PR_UnloadLibrary(PRLibrary *lib); + +/* +** Given the name of a procedure, return the address of the function that +** implements the procedure, or NULL if no such function can be +** found. This does not find symbols in the main program (the ".exe"); +** use PR_LoadStaticLibrary to register symbols in the main program. +** +** This function does not modify the reference count of the library. +*/ +NSPR_API(void*) PR_FindSymbol(PRLibrary *lib, const char *name); + +/* +** Similar to PR_FindSymbol, except that the return value is a pointer to +** a function, and not a pointer to void. Casting between a data pointer +** and a function pointer is not portable according to the C standard. +** Any function pointer can be cast to any other function pointer. +** +** This function does not modify the reference count of the library. +*/ +typedef void (*PRFuncPtr)(); +NSPR_API(PRFuncPtr) PR_FindFunctionSymbol(PRLibrary *lib, const char *name); + +/* +** Finds a symbol in one of the currently loaded libraries. Given the +** name of a procedure, return the address of the function that +** implements the procedure, and return the library that contains that +** symbol, or NULL if no such function can be found. This does not find +** symbols in the main program (the ".exe"); use PR_AddStaticLibrary to +** register symbols in the main program. +** +** This increments the reference count of the library. +*/ +NSPR_API(void*) PR_FindSymbolAndLibrary(const char *name, + PRLibrary* *lib); + +/* +** Similar to PR_FindSymbolAndLibrary, except that the return value is +** a pointer to a function, and not a pointer to void. Casting between a +** data pointer and a function pointer is not portable according to the C +** standard. Any function pointer can be cast to any other function pointer. +** +** This increments the reference count of the library. +*/ +NSPR_API(PRFuncPtr) PR_FindFunctionSymbolAndLibrary(const char *name, + PRLibrary* *lib); + +/* +** Register a static link table with the runtime under the name +** "name". The symbols present in the static link table will be made +** available to PR_FindSymbol. If "name" is null then the symbols will be +** made available to the library which represents the executable. The +** tables are not copied. +** +** Returns the library object if successful, null otherwise. +** +** This increments the reference count of the library. +*/ +NSPR_API(PRLibrary*) PR_LoadStaticLibrary( + const char *name, const PRStaticLinkTable *table); + +/* +** Return the pathname of the file that the library "name" was loaded +** from. "addr" is the address of a function defined in the library. +** +** The caller is responsible for freeing the result with PR_Free. +*/ +NSPR_API(char *) PR_GetLibraryFilePathname(const char *name, PRFuncPtr addr); + +PR_END_EXTERN_C + +#endif /* prlink_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prlock.h b/Src/nprt_plugin/gecko/1.8/win/include/prlock.h new file mode 100644 index 00000000..0805d95b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prlock.h @@ -0,0 +1,121 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: prlock.h +** Description: API to basic locking functions of NSPR. +** +** +** NSPR provides basic locking mechanisms for thread synchronization. Locks +** are lightweight resource contention controls that prevent multiple threads +** from accessing something (code/data) simultaneously. +**/ + +#ifndef prlock_h___ +#define prlock_h___ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/**********************************************************************/ +/************************* TYPES AND CONSTANTS ************************/ +/**********************************************************************/ + +/* + * PRLock -- + * + * NSPR represents the lock as an opaque entity to the client of the + * API. All routines operate on a pointer to this opaque entity. + */ + +typedef struct PRLock PRLock; + +/**********************************************************************/ +/****************************** FUNCTIONS *****************************/ +/**********************************************************************/ + +/*********************************************************************** +** FUNCTION: PR_NewLock +** DESCRIPTION: +** Returns a pointer to a newly created opaque lock object. +** INPUTS: void +** OUTPUTS: void +** RETURN: PRLock* +** If the lock can not be created because of resource constraints, NULL +** is returned. +** +***********************************************************************/ +NSPR_API(PRLock*) PR_NewLock(void); + +/*********************************************************************** +** FUNCTION: PR_DestroyLock +** DESCRIPTION: +** Destroys a given opaque lock object. +** INPUTS: PRLock *lock +** Lock to be freed. +** OUTPUTS: void +** RETURN: None +***********************************************************************/ +NSPR_API(void) PR_DestroyLock(PRLock *lock); + +/*********************************************************************** +** FUNCTION: PR_Lock +** DESCRIPTION: +** Lock a lock. +** INPUTS: PRLock *lock +** Lock to locked. +** OUTPUTS: void +** RETURN: None +***********************************************************************/ +NSPR_API(void) PR_Lock(PRLock *lock); + +/*********************************************************************** +** FUNCTION: PR_Unlock +** DESCRIPTION: +** Unlock a lock. Unlocking an unlocked lock has undefined results. +** INPUTS: PRLock *lock +** Lock to unlocked. +** OUTPUTS: void +** RETURN: PR_STATUS +** Returns PR_FAILURE if the caller does not own the lock. +***********************************************************************/ +NSPR_API(PRStatus) PR_Unlock(PRLock *lock); + +PR_END_EXTERN_C + +#endif /* prlock_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prlog.h b/Src/nprt_plugin/gecko/1.8/win/include/prlog.h new file mode 100644 index 00000000..6b88a5cb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prlog.h @@ -0,0 +1,256 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prlog_h___ +#define prlog_h___ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* +** prlog.h -- Declare interfaces to NSPR's Logging service +** +** NSPR provides a logging service that is used by NSPR itself and is +** available to client programs. +** +** To use the service from a client program, you should create a +** PRLogModuleInfo structure by calling PR_NewLogModule(). After +** creating the LogModule, you can write to the log using the PR_LOG() +** macro. +** +** Initialization of the log service is handled by NSPR initialization. +** +** At execution time, you must enable the log service. To enable the +** log service, set the environment variable: NSPR_LOG_MODULES +** variable. +** +** NSPR_LOG_MODULES variable has the form: +** +** <moduleName>:<value>[, <moduleName>:<value>]* +** +** Where: +** <moduleName> is the name passed to PR_NewLogModule(). +** <value> is a numeric constant, e.g. 5. This value is the maximum +** value of a log event, enumerated by PRLogModuleLevel, that you want +** written to the log. +** +** For example: to record all events of greater value than or equal to +** PR_LOG_ERROR for a LogModule names "gizmo", say: +** +** set NSPR_LOG_MODULES=gizmo:2 +** +** Note that you must specify the numeric value of PR_LOG_ERROR. +** +** Special LogModule names are provided for controlling NSPR's log +** service at execution time. These controls should be set in the +** NSPR_LOG_MODULES environment variable at execution time to affect +** NSPR's log service for your application. +** +** The special LogModule "all" enables all LogModules. To enable all +** LogModule calls to PR_LOG(), say: +** +** set NSPR_LOG_MODULES=all:5 +** +** The special LogModule name "sync" tells the NSPR log service to do +** unbuffered logging. +** +** The special LogModule name "bufsize:<size>" tells NSPR to set the +** log buffer to <size>. +** +** The environment variable NSPR_LOG_FILE specifies the log file to use +** unless the default of "stderr" is acceptable. For MS Windows +** systems, NSPR_LOG_FILE can be set to a special value: "WinDebug" +** (case sensitive). This value causes PR_LOG() output to be written +** using the Windows API OutputDebugString(). OutputDebugString() +** writes to the debugger window; some people find this helpful. +** +** +** To put log messages in your programs, use the PR_LOG macro: +** +** PR_LOG(<module>, <level>, (<printfString>, <args>*)); +** +** Where <module> is the address of a PRLogModuleInfo structure, and +** <level> is one of the levels defined by the enumeration: +** PRLogModuleLevel. <args> is a printf() style of argument list. That +** is: (fmtstring, ...). +** +** Example: +** +** main() { +** PRIntn one = 1; +** PRLogModuleInfo * myLm = PR_NewLogModule("gizmo"); +** PR_LOG( myLm, PR_LOG_ALWAYS, ("Log this! %d\n", one)); +** return; +** } +** +** Note the use of printf() style arguments as the third agrument(s) to +** PR_LOG(). +** +** After compiling and linking you application, set the environment: +** +** set NSPR_LOG_MODULES=gizmo:5 +** set NSPR_LOG_FILE=logfile.txt +** +** When you execute your application, the string "Log this! 1" will be +** written to the file "logfile.txt". +** +** Note to NSPR engineers: a number of PRLogModuleInfo structures are +** defined and initialized in prinit.c. See this module for ideas on +** what to log where. +** +*/ + +typedef enum PRLogModuleLevel { + PR_LOG_NONE = 0, /* nothing */ + PR_LOG_ALWAYS = 1, /* always printed */ + PR_LOG_ERROR = 2, /* error messages */ + PR_LOG_WARNING = 3, /* warning messages */ + PR_LOG_DEBUG = 4, /* debug messages */ + + PR_LOG_NOTICE = PR_LOG_DEBUG, /* notice messages */ + PR_LOG_WARN = PR_LOG_WARNING, /* warning messages */ + PR_LOG_MIN = PR_LOG_DEBUG, /* minimal debugging messages */ + PR_LOG_MAX = PR_LOG_DEBUG /* maximal debugging messages */ +} PRLogModuleLevel; + +/* +** One of these structures is created for each module that uses logging. +** "name" is the name of the module +** "level" is the debugging level selected for that module +*/ +typedef struct PRLogModuleInfo { + const char *name; + PRLogModuleLevel level; + struct PRLogModuleInfo *next; +} PRLogModuleInfo; + +/* +** Create a new log module. +*/ +NSPR_API(PRLogModuleInfo*) PR_NewLogModule(const char *name); + +/* +** Set the file to use for logging. Returns PR_FALSE if the file cannot +** be created +*/ +NSPR_API(PRBool) PR_SetLogFile(const char *name); + +/* +** Set the size of the logging buffer. If "buffer_size" is zero then the +** logging becomes "synchronous" (or unbuffered). +*/ +NSPR_API(void) PR_SetLogBuffering(PRIntn buffer_size); + +/* +** Print a string to the log. "fmt" is a PR_snprintf format type. All +** messages printed to the log are preceeded by the name of the thread +** and a time stamp. Also, the routine provides a missing newline if one +** is not provided. +*/ +NSPR_API(void) PR_LogPrint(const char *fmt, ...); + +/* +** Flush the log to its file. +*/ +NSPR_API(void) PR_LogFlush(void); + +/* +** Windoze 16 can't support a large static string space for all of the +** various debugging strings so logging is not enabled for it. +*/ +#if (defined(DEBUG) || defined(FORCE_PR_LOG)) && !defined(WIN16) +#define PR_LOGGING 1 + +#define PR_LOG_TEST(_module,_level) \ + ((_module)->level >= (_level)) + +/* +** Log something. +** "module" is the address of a PRLogModuleInfo structure +** "level" is the desired logging level +** "args" is a variable length list of arguments to print, in the following +** format: ("printf style format string", ...) +*/ +#define PR_LOG(_module,_level,_args) \ + PR_BEGIN_MACRO \ + if (PR_LOG_TEST(_module,_level)) { \ + PR_LogPrint _args; \ + } \ + PR_END_MACRO + +#else /* (defined(DEBUG) || defined(FORCE_PR_LOG)) && !defined(WIN16) */ + +#undef PR_LOGGING +#define PR_LOG_TEST(module,level) 0 +#define PR_LOG(module,level,args) + +#endif /* (defined(DEBUG) || defined(FORCE_PR_LOG)) && !defined(WIN16) */ + +#ifndef NO_NSPR_10_SUPPORT + +#ifdef PR_LOGGING +#define PR_LOG_BEGIN PR_LOG +#define PR_LOG_END PR_LOG +#define PR_LOG_DEFINE PR_NewLogModule +#else +#define PR_LOG_BEGIN(module,level,args) +#define PR_LOG_END(module,level,args) +#define PR_LOG_DEFINE(_name) NULL +#endif /* PR_LOGGING */ + +#endif /* NO_NSPR_10_SUPPORT */ + +#if defined(DEBUG) || defined(FORCE_PR_ASSERT) + +NSPR_API(void) PR_Assert(const char *s, const char *file, PRIntn ln); +#define PR_ASSERT(_expr) \ + ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__)) + +#define PR_NOT_REACHED(_reasonStr) \ + PR_Assert(_reasonStr,__FILE__,__LINE__) + +#else + +#define PR_ASSERT(expr) ((void) 0) +#define PR_NOT_REACHED(reasonStr) + +#endif /* defined(DEBUG) || defined(FORCE_PR_ASSERT) */ + +PR_END_EXTERN_C + +#endif /* prlog_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prlong.h b/Src/nprt_plugin/gecko/1.8/win/include/prlong.h new file mode 100644 index 00000000..09b43217 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prlong.h @@ -0,0 +1,445 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: prlong.h +** Description: Portable access to 64 bit numerics +** +** Long-long (64-bit signed integer type) support. Some C compilers +** don't support 64 bit integers yet, so we use these macros to +** support both machines that do and don't. +**/ +#ifndef prlong_h___ +#define prlong_h___ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/*********************************************************************** +** DEFINES: LL_MaxInt +** LL_MinInt +** LL_Zero +** LL_MaxUint +** DESCRIPTION: +** Various interesting constants and static variable +** initializer +***********************************************************************/ +#if defined(HAVE_WATCOM_BUG_2) +PRInt64 __pascal __loadds __export + LL_MaxInt(void); +PRInt64 __pascal __loadds __export + LL_MinInt(void); +PRInt64 __pascal __loadds __export + LL_Zero(void); +PRUint64 __pascal __loadds __export + LL_MaxUint(void); +#else +NSPR_API(PRInt64) LL_MaxInt(void); +NSPR_API(PRInt64) LL_MinInt(void); +NSPR_API(PRInt64) LL_Zero(void); +NSPR_API(PRUint64) LL_MaxUint(void); +#endif + +#if defined(HAVE_LONG_LONG) + +#if PR_BYTES_PER_LONG == 8 +#define LL_MAXINT 9223372036854775807L +#define LL_MININT (-LL_MAXINT - 1L) +#define LL_ZERO 0L +#define LL_MAXUINT 18446744073709551615UL +#define LL_INIT(hi, lo) ((hi ## L << 32) + lo ## L) +#elif (defined(WIN32) || defined(WIN16)) && !defined(__GNUC__) +#define LL_MAXINT 9223372036854775807i64 +#define LL_MININT (-LL_MAXINT - 1i64) +#define LL_ZERO 0i64 +#define LL_MAXUINT 18446744073709551615ui64 +#define LL_INIT(hi, lo) ((hi ## i64 << 32) + lo ## i64) +#else +#define LL_MAXINT 9223372036854775807LL +#define LL_MININT (-LL_MAXINT - 1LL) +#define LL_ZERO 0LL +#define LL_MAXUINT 18446744073709551615ULL +#define LL_INIT(hi, lo) ((hi ## LL << 32) + lo ## LL) +#endif + +/*********************************************************************** +** MACROS: LL_* +** DESCRIPTION: +** The following macros define portable access to the 64 bit +** math facilities. +** +***********************************************************************/ + +/*********************************************************************** +** MACROS: LL_<relational operators> +** +** LL_IS_ZERO Test for zero +** LL_EQ Test for equality +** LL_NE Test for inequality +** LL_GE_ZERO Test for zero or positive +** LL_CMP Compare two values +***********************************************************************/ +#define LL_IS_ZERO(a) ((a) == 0) +#define LL_EQ(a, b) ((a) == (b)) +#define LL_NE(a, b) ((a) != (b)) +#define LL_GE_ZERO(a) ((a) >= 0) +#define LL_CMP(a, op, b) ((PRInt64)(a) op (PRInt64)(b)) +#define LL_UCMP(a, op, b) ((PRUint64)(a) op (PRUint64)(b)) + +/*********************************************************************** +** MACROS: LL_<logical operators> +** +** LL_AND Logical and +** LL_OR Logical or +** LL_XOR Logical exclusion +** LL_OR2 A disgusting deviation +** LL_NOT Negation (one's complement) +***********************************************************************/ +#define LL_AND(r, a, b) ((r) = (a) & (b)) +#define LL_OR(r, a, b) ((r) = (a) | (b)) +#define LL_XOR(r, a, b) ((r) = (a) ^ (b)) +#define LL_OR2(r, a) ((r) = (r) | (a)) +#define LL_NOT(r, a) ((r) = ~(a)) + +/*********************************************************************** +** MACROS: LL_<mathematical operators> +** +** LL_NEG Negation (two's complement) +** LL_ADD Summation (two's complement) +** LL_SUB Difference (two's complement) +***********************************************************************/ +#define LL_NEG(r, a) ((r) = -(a)) +#define LL_ADD(r, a, b) ((r) = (a) + (b)) +#define LL_SUB(r, a, b) ((r) = (a) - (b)) + +/*********************************************************************** +** MACROS: LL_<mathematical operators> +** +** LL_MUL Product (two's complement) +** LL_DIV Quotient (two's complement) +** LL_MOD Modulus (two's complement) +***********************************************************************/ +#define LL_MUL(r, a, b) ((r) = (a) * (b)) +#define LL_DIV(r, a, b) ((r) = (a) / (b)) +#define LL_MOD(r, a, b) ((r) = (a) % (b)) + +/*********************************************************************** +** MACROS: LL_<shifting operators> +** +** LL_SHL Shift left [0..64] bits +** LL_SHR Shift right [0..64] bits with sign extension +** LL_USHR Unsigned shift right [0..64] bits +** LL_ISHL Signed shift left [0..64] bits +***********************************************************************/ +#define LL_SHL(r, a, b) ((r) = (PRInt64)(a) << (b)) +#define LL_SHR(r, a, b) ((r) = (PRInt64)(a) >> (b)) +#define LL_USHR(r, a, b) ((r) = (PRUint64)(a) >> (b)) +#define LL_ISHL(r, a, b) ((r) = (PRInt64)(a) << (b)) + +/*********************************************************************** +** MACROS: LL_<conversion operators> +** +** LL_L2I Convert to signed 32 bit +** LL_L2UI Convert to unsigned 32 bit +** LL_L2F Convert to floating point +** LL_L2D Convert to floating point +** LL_I2L Convert signed to 64 bit +** LL_UI2L Convert unsigned to 64 bit +** LL_F2L Convert float to 64 bit +** LL_D2L Convert float to 64 bit +***********************************************************************/ +#define LL_L2I(i, l) ((i) = (PRInt32)(l)) +#define LL_L2UI(ui, l) ((ui) = (PRUint32)(l)) +#define LL_L2F(f, l) ((f) = (PRFloat64)(l)) +#define LL_L2D(d, l) ((d) = (PRFloat64)(l)) + +#define LL_I2L(l, i) ((l) = (PRInt64)(i)) +#define LL_UI2L(l, ui) ((l) = (PRInt64)(ui)) +#define LL_F2L(l, f) ((l) = (PRInt64)(f)) +#define LL_D2L(l, d) ((l) = (PRInt64)(d)) + +/*********************************************************************** +** MACROS: LL_UDIVMOD +** DESCRIPTION: +** Produce both a quotient and a remainder given an unsigned +** INPUTS: PRUint64 a: The dividend of the operation +** PRUint64 b: The quotient of the operation +** OUTPUTS: PRUint64 *qp: pointer to quotient +** PRUint64 *rp: pointer to remainder +***********************************************************************/ +#define LL_UDIVMOD(qp, rp, a, b) \ + (*(qp) = ((PRUint64)(a) / (b)), \ + *(rp) = ((PRUint64)(a) % (b))) + +#else /* !HAVE_LONG_LONG */ + +#define LL_MAXINT LL_MaxInt() +#define LL_MININT LL_MinInt() +#define LL_ZERO LL_Zero() +#define LL_MAXUINT LL_MaxUint() + +#ifdef IS_LITTLE_ENDIAN +#define LL_INIT(hi, lo) {PR_UINT32(lo), PR_UINT32(hi)} +#else +#define LL_INIT(hi, lo) {PR_UINT32(hi), PR_UINT32(lo)} +#endif + +#define LL_IS_ZERO(a) (((a).hi == 0) && ((a).lo == 0)) +#define LL_EQ(a, b) (((a).hi == (b).hi) && ((a).lo == (b).lo)) +#define LL_NE(a, b) (((a).hi != (b).hi) || ((a).lo != (b).lo)) +#define LL_GE_ZERO(a) (((a).hi >> 31) == 0) + +#define LL_CMP(a, op, b) (((a).hi == (b).hi) ? ((a).lo op (b).lo) : \ + ((PRInt32)(a).hi op (PRInt32)(b).hi)) +#define LL_UCMP(a, op, b) (((a).hi == (b).hi) ? ((a).lo op (b).lo) : \ + ((a).hi op (b).hi)) + +#define LL_AND(r, a, b) ((r).lo = (a).lo & (b).lo, \ + (r).hi = (a).hi & (b).hi) +#define LL_OR(r, a, b) ((r).lo = (a).lo | (b).lo, \ + (r).hi = (a).hi | (b).hi) +#define LL_XOR(r, a, b) ((r).lo = (a).lo ^ (b).lo, \ + (r).hi = (a).hi ^ (b).hi) +#define LL_OR2(r, a) ((r).lo = (r).lo | (a).lo, \ + (r).hi = (r).hi | (a).hi) +#define LL_NOT(r, a) ((r).lo = ~(a).lo, \ + (r).hi = ~(a).hi) + +#define LL_NEG(r, a) ((r).lo = -(PRInt32)(a).lo, \ + (r).hi = -(PRInt32)(a).hi - ((r).lo != 0)) +#define LL_ADD(r, a, b) { \ + PRInt64 _a, _b; \ + _a = a; _b = b; \ + (r).lo = _a.lo + _b.lo; \ + (r).hi = _a.hi + _b.hi + ((r).lo < _b.lo); \ +} + +#define LL_SUB(r, a, b) { \ + PRInt64 _a, _b; \ + _a = a; _b = b; \ + (r).lo = _a.lo - _b.lo; \ + (r).hi = _a.hi - _b.hi - (_a.lo < _b.lo); \ +} + +#define LL_MUL(r, a, b) { \ + PRInt64 _a, _b; \ + _a = a; _b = b; \ + LL_MUL32(r, _a.lo, _b.lo); \ + (r).hi += _a.hi * _b.lo + _a.lo * _b.hi; \ +} + +#define _lo16(a) ((a) & PR_BITMASK(16)) +#define _hi16(a) ((a) >> 16) + +#define LL_MUL32(r, a, b) { \ + PRUint32 _a1, _a0, _b1, _b0, _y0, _y1, _y2, _y3; \ + _a1 = _hi16(a), _a0 = _lo16(a); \ + _b1 = _hi16(b), _b0 = _lo16(b); \ + _y0 = _a0 * _b0; \ + _y1 = _a0 * _b1; \ + _y2 = _a1 * _b0; \ + _y3 = _a1 * _b1; \ + _y1 += _hi16(_y0); /* can't carry */ \ + _y1 += _y2; /* might carry */ \ + if (_y1 < _y2) \ + _y3 += (PRUint32)(PR_BIT(16)); /* propagate */ \ + (r).lo = (_lo16(_y1) << 16) + _lo16(_y0); \ + (r).hi = _y3 + _hi16(_y1); \ +} + +#define LL_UDIVMOD(qp, rp, a, b) ll_udivmod(qp, rp, a, b) + +NSPR_API(void) ll_udivmod(PRUint64 *qp, PRUint64 *rp, PRUint64 a, PRUint64 b); + +#define LL_DIV(r, a, b) { \ + PRInt64 _a, _b; \ + PRUint32 _negative = (PRInt32)(a).hi < 0; \ + if (_negative) { \ + LL_NEG(_a, a); \ + } else { \ + _a = a; \ + } \ + if ((PRInt32)(b).hi < 0) { \ + _negative ^= 1; \ + LL_NEG(_b, b); \ + } else { \ + _b = b; \ + } \ + LL_UDIVMOD(&(r), 0, _a, _b); \ + if (_negative) \ + LL_NEG(r, r); \ +} + +#define LL_MOD(r, a, b) { \ + PRInt64 _a, _b; \ + PRUint32 _negative = (PRInt32)(a).hi < 0; \ + if (_negative) { \ + LL_NEG(_a, a); \ + } else { \ + _a = a; \ + } \ + if ((PRInt32)(b).hi < 0) { \ + LL_NEG(_b, b); \ + } else { \ + _b = b; \ + } \ + LL_UDIVMOD(0, &(r), _a, _b); \ + if (_negative) \ + LL_NEG(r, r); \ +} + +#define LL_SHL(r, a, b) { \ + if (b) { \ + PRInt64 _a; \ + _a = a; \ + if ((b) < 32) { \ + (r).lo = _a.lo << ((b) & 31); \ + (r).hi = (_a.hi << ((b) & 31)) | (_a.lo >> (32 - (b))); \ + } else { \ + (r).lo = 0; \ + (r).hi = _a.lo << ((b) & 31); \ + } \ + } else { \ + (r) = (a); \ + } \ +} + +/* a is an PRInt32, b is PRInt32, r is PRInt64 */ +#define LL_ISHL(r, a, b) { \ + if (b) { \ + PRInt64 _a; \ + _a.lo = (a); \ + _a.hi = 0; \ + if ((b) < 32) { \ + (r).lo = (a) << ((b) & 31); \ + (r).hi = ((a) >> (32 - (b))); \ + } else { \ + (r).lo = 0; \ + (r).hi = (a) << ((b) & 31); \ + } \ + } else { \ + (r).lo = (a); \ + (r).hi = 0; \ + } \ +} + +#define LL_SHR(r, a, b) { \ + if (b) { \ + PRInt64 _a; \ + _a = a; \ + if ((b) < 32) { \ + (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> ((b) & 31)); \ + (r).hi = (PRInt32)_a.hi >> ((b) & 31); \ + } else { \ + (r).lo = (PRInt32)_a.hi >> ((b) & 31); \ + (r).hi = (PRInt32)_a.hi >> 31; \ + } \ + } else { \ + (r) = (a); \ + } \ +} + +#define LL_USHR(r, a, b) { \ + if (b) { \ + PRInt64 _a; \ + _a = a; \ + if ((b) < 32) { \ + (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> ((b) & 31)); \ + (r).hi = _a.hi >> ((b) & 31); \ + } else { \ + (r).lo = _a.hi >> ((b) & 31); \ + (r).hi = 0; \ + } \ + } else { \ + (r) = (a); \ + } \ +} + +#define LL_L2I(i, l) ((i) = (l).lo) +#define LL_L2UI(ui, l) ((ui) = (l).lo) +#define LL_L2F(f, l) { double _d; LL_L2D(_d, l); (f) = (PRFloat64)_d; } + +#define LL_L2D(d, l) { \ + int _negative; \ + PRInt64 _absval; \ + \ + _negative = (l).hi >> 31; \ + if (_negative) { \ + LL_NEG(_absval, l); \ + } else { \ + _absval = l; \ + } \ + (d) = (double)_absval.hi * 4.294967296e9 + _absval.lo; \ + if (_negative) \ + (d) = -(d); \ +} + +#define LL_I2L(l, i) { PRInt32 _i = ((PRInt32)(i)) >> 31; (l).lo = (i); (l).hi = _i; } +#define LL_UI2L(l, ui) ((l).lo = (ui), (l).hi = 0) +#define LL_F2L(l, f) { double _d = (double)f; LL_D2L(l, _d); } + +#define LL_D2L(l, d) { \ + int _negative; \ + double _absval, _d_hi; \ + PRInt64 _lo_d; \ + \ + _negative = ((d) < 0); \ + _absval = _negative ? -(d) : (d); \ + \ + (l).hi = _absval / 4.294967296e9; \ + (l).lo = 0; \ + LL_L2D(_d_hi, l); \ + _absval -= _d_hi; \ + _lo_d.hi = 0; \ + if (_absval < 0) { \ + _lo_d.lo = -_absval; \ + LL_SUB(l, l, _lo_d); \ + } else { \ + _lo_d.lo = _absval; \ + LL_ADD(l, l, _lo_d); \ + } \ + \ + if (_negative) \ + LL_NEG(l, l); \ +} + +#endif /* !HAVE_LONG_LONG */ + +PR_END_EXTERN_C + +#endif /* prlong_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prmem.h b/Src/nprt_plugin/gecko/1.8/win/include/prmem.h new file mode 100644 index 00000000..1cf0949c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prmem.h @@ -0,0 +1,158 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: prmem.h +** Description: API to NSPR memory management functions +** +*/ +#ifndef prmem_h___ +#define prmem_h___ + +#include "prtypes.h" +#include <stdlib.h> + +PR_BEGIN_EXTERN_C + +/* +** Thread safe memory allocation. +** +** NOTE: pr wraps up malloc, free, calloc, realloc so they are already +** thread safe (and are not declared here - look in stdlib.h). +*/ + +/* +** PR_Malloc, PR_Calloc, PR_Realloc, and PR_Free have the same signatures +** as their libc equivalent malloc, calloc, realloc, and free, and have +** the same semantics. (Note that the argument type size_t is replaced +** by PRUint32.) Memory allocated by PR_Malloc, PR_Calloc, or PR_Realloc +** must be freed by PR_Free. +*/ + +NSPR_API(void *) PR_Malloc(PRUint32 size); + +NSPR_API(void *) PR_Calloc(PRUint32 nelem, PRUint32 elsize); + +NSPR_API(void *) PR_Realloc(void *ptr, PRUint32 size); + +NSPR_API(void) PR_Free(void *ptr); + +/* +** The following are some convenience macros defined in terms of +** PR_Malloc, PR_Calloc, PR_Realloc, and PR_Free. +*/ + +/*********************************************************************** +** FUNCTION: PR_MALLOC() +** DESCRIPTION: +** PR_NEW() allocates an untyped item of size _size from the heap. +** INPUTS: _size: size in bytes of item to be allocated +** OUTPUTS: untyped pointer to the node allocated +** RETURN: pointer to node or error returned from malloc(). +***********************************************************************/ +#define PR_MALLOC(_bytes) (PR_Malloc((_bytes))) + +/*********************************************************************** +** FUNCTION: PR_NEW() +** DESCRIPTION: +** PR_NEW() allocates an item of type _struct from the heap. +** INPUTS: _struct: a data type +** OUTPUTS: pointer to _struct +** RETURN: pointer to _struct or error returns from malloc(). +***********************************************************************/ +#define PR_NEW(_struct) ((_struct *) PR_MALLOC(sizeof(_struct))) + +/*********************************************************************** +** FUNCTION: PR_REALLOC() +** DESCRIPTION: +** PR_REALLOC() re-allocates _ptr bytes from the heap as a _size +** untyped item. +** INPUTS: _ptr: pointer to node to reallocate +** _size: size of node to allocate +** OUTPUTS: pointer to node allocated +** RETURN: pointer to node allocated +***********************************************************************/ +#define PR_REALLOC(_ptr, _size) (PR_Realloc((_ptr), (_size))) + +/*********************************************************************** +** FUNCTION: PR_CALLOC() +** DESCRIPTION: +** PR_CALLOC() allocates a _size bytes untyped item from the heap +** and sets the allocated memory to all 0x00. +** INPUTS: _size: size of node to allocate +** OUTPUTS: pointer to node allocated +** RETURN: pointer to node allocated +***********************************************************************/ +#define PR_CALLOC(_size) (PR_Calloc(1, (_size))) + +/*********************************************************************** +** FUNCTION: PR_NEWZAP() +** DESCRIPTION: +** PR_NEWZAP() allocates an item of type _struct from the heap +** and sets the allocated memory to all 0x00. +** INPUTS: _struct: a data type +** OUTPUTS: pointer to _struct +** RETURN: pointer to _struct +***********************************************************************/ +#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct))) + +/*********************************************************************** +** FUNCTION: PR_DELETE() +** DESCRIPTION: +** PR_DELETE() unallocates an object previosly allocated via PR_NEW() +** or PR_NEWZAP() to the heap. +** INPUTS: pointer to previously allocated object +** OUTPUTS: the referenced object is returned to the heap +** RETURN: void +***********************************************************************/ +#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; } + +/*********************************************************************** +** FUNCTION: PR_FREEIF() +** DESCRIPTION: +** PR_FREEIF() conditionally unallocates an object previously allocated +** vial PR_NEW() or PR_NEWZAP(). If the pointer to the object is +** equal to zero (0), the object is not released. +** INPUTS: pointer to previously allocated object +** OUTPUTS: the referenced object is conditionally returned to the heap +** RETURN: void +***********************************************************************/ +#define PR_FREEIF(_ptr) if (_ptr) PR_DELETE(_ptr) + +PR_END_EXTERN_C + +#endif /* prmem_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prmon.h b/Src/nprt_plugin/gecko/1.8/win/include/prmon.h new file mode 100644 index 00000000..d2a1971c --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prmon.h @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prmon_h___ +#define prmon_h___ + +#include "prtypes.h" +#include "prinrval.h" + +PR_BEGIN_EXTERN_C + +typedef struct PRMonitor PRMonitor; + +/* +** Create a new monitor. Monitors are re-entrant locks with a single built-in +** condition variable. +** +** This may fail if memory is tight or if some operating system resource +** is low. +*/ +NSPR_API(PRMonitor*) PR_NewMonitor(void); + +/* +** Destroy a monitor. The caller is responsible for guaranteeing that the +** monitor is no longer in use. There must be no thread waiting on the monitor's +** condition variable and that the lock is not held. +** +*/ +NSPR_API(void) PR_DestroyMonitor(PRMonitor *mon); + +/* +** Enter the lock associated with the monitor. If the calling thread currently +** is in the monitor, the call to enter will silently succeed. In either case, +** it will increment the entry count by one. +*/ +NSPR_API(void) PR_EnterMonitor(PRMonitor *mon); + +/* +** Decrement the entry count associated with the monitor. If the decremented +** entry count is zero, the monitor is exited. Returns PR_FAILURE if the +** calling thread has not entered the monitor. +*/ +NSPR_API(PRStatus) PR_ExitMonitor(PRMonitor *mon); + +/* +** Wait for a notify on the monitor's condition variable. Sleep for "ticks" +** amount of time (if "ticks" is PR_INTERVAL_NO_TIMEOUT then the sleep is +** indefinite). +** +** While the thread is waiting it exits the monitor (as if it called +** PR_ExitMonitor as many times as it had called PR_EnterMonitor). When +** the wait has finished the thread regains control of the monitors lock +** with the same entry count as before the wait began. +** +** The thread waiting on the monitor will be resumed when the monitor is +** notified (assuming the thread is the next in line to receive the +** notify) or when the "ticks" timeout elapses. +** +** Returns PR_FAILURE if the caller has not entered the monitor. +*/ +NSPR_API(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime ticks); + +/* +** Notify a thread waiting on the monitor's condition variable. If a thread +** is waiting on the condition variable (using PR_Wait) then it is awakened +** and attempts to reenter the monitor. +*/ +NSPR_API(PRStatus) PR_Notify(PRMonitor *mon); + +/* +** Notify all of the threads waiting on the monitor's condition variable. +** All of threads waiting on the condition are scheduled to reenter the +** monitor. +*/ +NSPR_API(PRStatus) PR_NotifyAll(PRMonitor *mon); + +PR_END_EXTERN_C + +#endif /* prmon_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prmwait.h b/Src/nprt_plugin/gecko/1.8/win/include/prmwait.h new file mode 100644 index 00000000..e4cabda4 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prmwait.h @@ -0,0 +1,412 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#if defined(_PRMWAIT_H) +#else +#define _PRMWAIT_H + +#include "prio.h" +#include "prtypes.h" +#include "prclist.h" + +PR_BEGIN_EXTERN_C + +/********************************************************************************/ +/********************************************************************************/ +/********************************************************************************/ +/****************************** WARNING ****************************/ +/********************************************************************************/ +/**************************** This is work in progress. *************************/ +/************************** Do not make any assumptions *************************/ +/************************** about the stability of this *************************/ +/************************** API or the underlying imple- ************************/ +/************************** mentation. ************************/ +/********************************************************************************/ +/********************************************************************************/ + +/* +** STRUCTURE: PRWaitGroup +** DESCRIPTION: +** The client may define several wait groups in order to semantically +** tie a collection of file descriptors for a single purpose. This allows +** easier dispatching of threads that returned with active file descriptors +** from the wait function. +*/ +typedef struct PRWaitGroup PRWaitGroup; + +/* +** ENUMERATION: PRMWStatus +** DESCRIPTION: +** This enumeration is used to indicate the completion status of +** a receive wait object. Generally stated, a positive value indicates +** that the operation is not yet complete. A zero value indicates +** success (similar to PR_SUCCESS) and any negative value is an +** indication of failure. The reason for the failure can be retrieved +** by calling PR_GetError(). +** +** PR_MW_PENDING The operation is still pending. None of the other +** fields of the object are currently valid. +** PR_MW_SUCCESS The operation is complete and it was successful. +** PR_MW_FAILURE The operation failed. The reason for the failure +** can be retrieved by calling PR_GetError(). +** PR_MW_TIMEOUT The amount of time allowed for by the object's +** 'timeout' field has expired w/o the operation +** otherwise coming to closure. +** PR_MW_INTERRUPT The operation was cancelled, either by the client +** calling PR_CancelWaitFileDesc() or destroying the +** entire wait group (PR_DestroyWaitGroup()). +*/ +typedef enum PRMWStatus +{ + PR_MW_PENDING = 1, + PR_MW_SUCCESS = 0, + PR_MW_FAILURE = -1, + PR_MW_TIMEOUT = -2, + PR_MW_INTERRUPT = -3 +} PRMWStatus; + +/* +** STRUCTURE: PRMemoryDescriptor +** DESCRIPTION: +** THis is a descriptor for an interval of memory. It contains a +** pointer to the first byte of that memory and the length (in +** bytes) of the interval. +*/ +typedef struct PRMemoryDescriptor +{ + void *start; /* pointer to first byte of memory */ + PRSize length; /* length (in bytes) of memory interval */ +} PRMemoryDescriptor; + +/* +** STRUCTURE: PRMWaitClientData +** DESCRIPTION: +** An opague stucture for which a client MAY give provide a concrete +** definition and associate with a receive descriptor. The NSPR runtime +** does not manage this field. It is completely up to the client. +*/ +typedef struct PRMWaitClientData PRMWaitClientData; + +/* +** STRUCTURE: PRRecvWait +** DESCRIPTION: +** A receive wait object contains the file descriptor that is subject +** to the wait and the amount of time (beginning epoch established +** when the object is presented to the runtime) the the channel should +** block before abandoning the process. +** +** The success of the wait operation will be noted in the object's +** 'outcome' field. The fields are not valid when the NSPR runtime +** is in possession of the object. +** +** The memory descriptor describes an interval of writable memory +** in the caller's address space where data from an initial read +** can be placed. The description may indicate a null interval. +*/ +typedef struct PRRecvWait +{ + PRCList internal; /* internal runtime linkages */ + + PRFileDesc *fd; /* file descriptor associated w/ object */ + PRMWStatus outcome; /* outcome of the current/last operation */ + PRIntervalTime timeout; /* time allowed for entire operation */ + + PRInt32 bytesRecv; /* number of bytes transferred into buffer */ + PRMemoryDescriptor buffer; /* where to store first segment of input data */ + PRMWaitClientData *client; /* pointer to arbitrary client defined data */ +} PRRecvWait; + +/* +** STRUCTURE: PRMWaitEnumerator +** DESCRIPTION: +** An enumeration object is used to store the state of an existing +** enumeration over a wait group. The opaque object must be allocated +** by the client and the reference presented on each call to the +** pseudo-stateless enumerator. The enumeration objects are sharable +** only in serial fashion. +*/ +typedef struct PRMWaitEnumerator PRMWaitEnumerator; + + +/* +** FUNCTION: PR_AddWaitFileDesc +** DESCRIPTION: +** This function will effectively add a file descriptor to the +** list of those waiting for network receive. The new descriptor +** will be semantically tied to the wait group specified. +** +** The ownership for the storage pointed to by 'desc' is temporarily +** passed over the the NSPR runtime. It will be handed back by the +** function PR_WaitRecvReady(). +** +** INPUTS +** group A reference to a PRWaitGroup or NULL. Wait groups are +** created by calling PR_CreateWaitGroup() and are used +** to semantically group various file descriptors by the +** client's application. +** desc A reference to a valid PRRecvWait. The object of the +** reference must be preserved and not be modified +** until its ownership is returned to the client. +** RETURN +** PRStatus An indication of success. If equal to PR_FAILUE details +** of the failure are avaiable via PR_GetError(). +** +** ERRORS +** PR_INVALID_ARGUMENT_ERROR +** Invalid 'group' identifier or duplicate 'desc' object. +** PR_OUT_OF_MEMORY_ERROR +** Insuffient memory for internal data structures. +** PR_INVALID_STATE_ERROR +** The group is being destroyed. +*/ +NSPR_API(PRStatus) PR_AddWaitFileDesc(PRWaitGroup *group, PRRecvWait *desc); + +/* +** FUNCTION: PR_WaitRecvReady +** DESCRIPTION: +** PR_WaitRecvReady will block the calling thread until one of the +** file descriptors that have been added via PR_AddWaitFileDesc is +** available for input I/O. +** INPUT +** group A pointer to a valid PRWaitGroup or NULL (the null +** group. The function will block the caller until a +** channel from the wait group becomes ready for receive +** or there is some sort of error. +** RETURN +** PRReciveWait +** When the caller is resumed it is either returned a +** valid pointer to a previously added receive wait or +** a NULL. If the latter, the function has terminated +** for a reason that can be determined by calling +** PR_GetError(). +** If a valid pointer is returned, the reference is to the +** file descriptor contained in the receive wait object. +** The outcome of the wait operation may still fail, and +** if it has, that fact will be noted in the object's +** outcome field. Details can be retrieved from PR_GetError(). +** +** ERRORS +** PR_INVALID_ARGUMENT_ERROR +** The 'group' is not known by the runtime. +** PR_PENDING_INTERRUPT_ERROR + The thread was interrupted. +** PR_INVALID_STATE_ERROR +** The group is being destroyed. +*/ +NSPR_API(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group); + +/* +** FUNCTION: PR_CancelWaitFileDesc +** DESCRIPTION: +** PR_CancelWaitFileDesc is provided as a means for cancelling operations +** on objects previously submitted by use of PR_AddWaitFileDesc(). If +** the runtime knows of the object, it will be marked as having failed +** because it was interrupted (similar to PR_Interrupt()). The first +** available thread waiting on the group will be made to return the +** PRRecvWait object with the outcome noted. +** +** INPUTS +** group The wait group under which the wait receive object was +** added. +** desc A pointer to the wait receive object that is to be +** cancelled. +** RETURN +** PRStatus If the wait receive object was located and associated +** with the specified wait group, the status returned will +** be PR_SUCCESS. There is still a race condition that would +** permit the offected object to complete normally, but it +** is assured that it will complete in the near future. +** If the receive object or wait group are invalid, the +** function will return with a status of PR_FAILURE. +** +** ERRORS +** PR_INVALID_ARGUMENT_ERROR +** The 'group' argument is not recognized as a valid group. +** PR_COLLECTION_EMPTY_ERROR +** There are no more receive wait objects in the group's +** collection. +** PR_INVALID_STATE_ERROR +** The group is being destroyed. +*/ +NSPR_API(PRStatus) PR_CancelWaitFileDesc(PRWaitGroup *group, PRRecvWait *desc); + +/* +** FUNCTION: PR_CancelWaitGroup +** DESCRIPTION: +** PR_CancelWaitGroup is provided as a means for cancelling operations +** on objects previously submitted by use of PR_AddWaitFileDesc(). Each +** successive call will return a pointer to a PRRecvWait object that +** was previously registered via PR_AddWaitFileDesc(). If no wait +** objects are associated with the wait group, a NULL will be returned. +** This function should be called in a loop until a NULL is returned +** to reclaim all the wait objects prior to calling PR_DestroyWaitGroup(). +** +** INPUTS +** group The wait group under which the wait receive object was +** added. +** RETURN +** PRRecvWait* If the wait group is valid and at least one receive wait +** object is present in the group, that object will be +** marked as PR_MW_INTERRUPT'd and removed from the group's +** queues. Otherwise a NULL will be returned and the reason +** for the NULL may be retrieved by calling PR_GetError(). +** +** ERRORS +** PR_INVALID_ARGUMENT_ERROR +** PR_GROUP_EMPTY_ERROR +*/ +NSPR_API(PRRecvWait*) PR_CancelWaitGroup(PRWaitGroup *group); + +/* +** FUNCTION: PR_CreateWaitGroup +** DESCRIPTION: +** A wait group is an opaque object that a client may create in order +** to semantically group various wait requests. Each wait group is +** unique, including the default wait group (NULL). A wait request +** that was added under a wait group will only be serviced by a caller +** that specified the same wait group. +** +** INPUT +** size The size of the hash table to be used to contain the +** receive wait objects. This is just the initial size. +** It will grow as it needs to, but to avoid that hassle +** one can suggest a suitable size initially. It should +** be ~30% larger than the maximum number of receive wait +** objects expected. +** RETURN +** PRWaitGroup If successful, the function will return a pointer to an +** object that was allocated by and owned by the runtime. +** The reference remains valid until it is explicitly destroyed +** by calling PR_DestroyWaitGroup(). +** +** ERRORS +** PR_OUT_OF_MEMORY_ERROR +*/ +NSPR_API(PRWaitGroup*) PR_CreateWaitGroup(PRInt32 size); + +/* +** FUNCTION: PR_DestroyWaitGroup +** DESCRIPTION: +** Undo the effects of PR_CreateWaitGroup(). Any receive wait operations +** on the group will be treated as if the each had been the target of a +** PR_CancelWaitFileDesc(). +** +** INPUT +** group Reference to a wait group previously allocated using +** PR_CreateWaitGroup(). +** RETURN +** PRStatus Will be PR_SUCCESS if the wait group was valid and there +** are no receive wait objects in that group. Otherwise +** will indicate PR_FAILURE. +** +** ERRORS +** PR_INVALID_ARGUMENT_ERROR +** The 'group' argument does not reference a known object. +** PR_INVALID_STATE_ERROR +** The group still contains receive wait objects. +*/ +NSPR_API(PRStatus) PR_DestroyWaitGroup(PRWaitGroup *group); + +/* +** FUNCTION: PR_CreateMWaitEnumerator +** DESCRIPTION: +** The PR_CreateMWaitEnumerator() function returns a reference to an +** opaque PRMWaitEnumerator object. The enumerator object is required +** as an argument for each successive call in the stateless enumeration +** of the indicated wait group. +** +** group The wait group that the enumeration is intended to +** process. It may be be the default wait group (NULL). +** RETURN +** PRMWaitEnumerator* group +** A reference to an object that will be used to store +** intermediate state of enumerations. +** ERRORS +** Errors are indicated by the function returning a NULL. +** PR_INVALID_ARGUMENT_ERROR +** The 'group' argument does not reference a known object. +** PR_OUT_OF_MEMORY_ERROR +*/ +NSPR_API(PRMWaitEnumerator*) PR_CreateMWaitEnumerator(PRWaitGroup *group); + +/* +** FUNCTION: PR_DestroyMWaitEnumerator +** DESCRIPTION: +** Destroys the object created by PR_CreateMWaitEnumerator(). The reference +** used as an argument becomes invalid. +** +** INPUT +** PRMWaitEnumerator* enumerator +** The PRMWaitEnumerator object to destroy. +** RETURN +** PRStatus +** PR_SUCCESS if successful, PR_FAILURE otherwise. +** ERRORS +** PR_INVALID_ARGUMENT_ERROR +** The enumerator is invalid. +*/ +NSPR_API(PRStatus) PR_DestroyMWaitEnumerator(PRMWaitEnumerator* enumerator); + +/* +** FUNCTION: PR_EnumerateWaitGroup +** DESCRIPTION: +** PR_EnumerateWaitGroup is a thread safe enumerator over a wait group. +** Each call to the enumerator must present a valid PRMWaitEnumerator +** rererence and a pointer to the "previous" element returned from the +** enumeration process or a NULL. +** +** An enumeration is started by passing a NULL as the "previous" value. +** Subsequent calls to the enumerator must pass in the result of the +** previous call. The enumeration end is signaled by the runtime returning +** a NULL as the result. +** +** Modifications to the content of the wait group are allowed during +** an enumeration. The effect is that the enumeration may have to be +** "reset" and that may result in duplicates being returned from the +** enumeration. +** +** An enumeration may be abandoned at any time. The runtime is not +** keeping any state, so there are no issues in that regard. +*/ +NSPR_API(PRRecvWait*) PR_EnumerateWaitGroup( + PRMWaitEnumerator *enumerator, const PRRecvWait *previous); + +PR_END_EXTERN_C + +#endif /* defined(_PRMWAIT_H) */ + +/* prmwait.h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prnetdb.h b/Src/nprt_plugin/gecko/1.8/win/include/prnetdb.h new file mode 100644 index 00000000..685efbbc --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prnetdb.h @@ -0,0 +1,499 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prnetdb_h___ +#define prnetdb_h___ + +#include "prtypes.h" +#include "prio.h" + +PR_BEGIN_EXTERN_C + + +/* + ********************************************************************* + * Translate an Internet address to/from a character string + ********************************************************************* + */ +NSPR_API(PRStatus) PR_StringToNetAddr( + const char *string, PRNetAddr *addr); + +NSPR_API(PRStatus) PR_NetAddrToString( + const PRNetAddr *addr, char *string, PRUint32 size); + +/* +** Structures returned by network data base library. All addresses are +** supplied in host order, and returned in network order (suitable for +** use in system calls). +*/ +/* +** Beware that WINSOCK.H defines h_addrtype and h_length as short. +** Client code does direct struct copies of hostent to PRHostEnt and +** hence the ifdef. +*/ +typedef struct PRHostEnt { + char *h_name; /* official name of host */ + char **h_aliases; /* alias list */ +#if defined(WIN32) || defined(WIN16) + PRInt16 h_addrtype; /* host address type */ + PRInt16 h_length; /* length of address */ +#else + PRInt32 h_addrtype; /* host address type */ + PRInt32 h_length; /* length of address */ +#endif + char **h_addr_list; /* list of addresses from name server */ +} PRHostEnt; + +/* A safe size to use that will mostly work... */ +#if (defined(AIX) && defined(_THREAD_SAFE)) || defined(OSF1) +#define PR_NETDB_BUF_SIZE sizeof(struct protoent_data) +#else +#define PR_NETDB_BUF_SIZE 1024 +#endif + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_GetHostByName() +** Lookup a host by name. +** +** INPUTS: +** char *hostname Character string defining the host name of interest +** char *buf A scratch buffer for the runtime to return result. +** This buffer is allocated by the caller. +** PRIntn bufsize Number of bytes in 'buf'. A recommnded value to +** use is PR_NETDB_BUF_SIZE. +** OUTPUTS: +** PRHostEnt *hostentry +** This structure is filled in by the runtime if +** the function returns PR_SUCCESS. This structure +** is allocated by the caller. +** RETURN: +** PRStatus PR_SUCCESS if the lookup succeeds. If it fails +** the result will be PR_FAILURE and the reason +** for the failure can be retrieved by PR_GetError(). +***********************************************************************/ +NSPR_API(PRStatus) PR_GetHostByName( + const char *hostname, char *buf, PRIntn bufsize, PRHostEnt *hostentry); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_GetIPNodeByName() +** Lookup a host by name. Equivalent to getipnodebyname(AI_DEFAULT) +** of RFC 2553. +** +** INPUTS: +** char *hostname Character string defining the host name of interest +** PRUint16 af Address family (either PR_AF_INET or PR_AF_INET6) +** PRIntn flags Specifies the types of addresses that are searched +** for and the types of addresses that are returned. +** The only supported flag is PR_AI_DEFAULT. +** char *buf A scratch buffer for the runtime to return result. +** This buffer is allocated by the caller. +** PRIntn bufsize Number of bytes in 'buf'. A recommnded value to +** use is PR_NETDB_BUF_SIZE. +** OUTPUTS: +** PRHostEnt *hostentry +** This structure is filled in by the runtime if +** the function returns PR_SUCCESS. This structure +** is allocated by the caller. +** RETURN: +** PRStatus PR_SUCCESS if the lookup succeeds. If it fails +** the result will be PR_FAILURE and the reason +** for the failure can be retrieved by PR_GetError(). +***********************************************************************/ + + +#define PR_AI_ALL 0x08 +#define PR_AI_V4MAPPED 0x10 +#define PR_AI_ADDRCONFIG 0x20 +#define PR_AI_NOCANONNAME 0x8000 +#define PR_AI_DEFAULT (PR_AI_V4MAPPED | PR_AI_ADDRCONFIG) + +NSPR_API(PRStatus) PR_GetIPNodeByName( + const char *hostname, + PRUint16 af, + PRIntn flags, + char *buf, + PRIntn bufsize, + PRHostEnt *hostentry); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_GetHostByAddr() +** Lookup a host entry by its network address. +** +** INPUTS: +** char *hostaddr IP address of host in question +** char *buf A scratch buffer for the runtime to return result. +** This buffer is allocated by the caller. +** PRIntn bufsize Number of bytes in 'buf'. A recommnded value to +** use is PR_NETDB_BUF_SIZE. +** OUTPUTS: +** PRHostEnt *hostentry +** This structure is filled in by the runtime if +** the function returns PR_SUCCESS. This structure +** is allocated by the caller. +** RETURN: +** PRStatus PR_SUCCESS if the lookup succeeds. If it fails +** the result will be PR_FAILURE and the reason +** for the failure can be retrieved by PR_GetError(). +***********************************************************************/ +NSPR_API(PRStatus) PR_GetHostByAddr( + const PRNetAddr *hostaddr, char *buf, PRIntn bufsize, PRHostEnt *hostentry); + +/*********************************************************************** +** FUNCTION: PR_EnumerateHostEnt() +** DESCRIPTION: +** A stateless enumerator over a PRHostEnt structure acquired from +** PR_GetHostByName() PR_GetHostByAddr() to evaluate the possible +** network addresses. +** +** INPUTS: +** PRIntn enumIndex Index of the enumeration. The enumeration starts +** and ends with a value of zero. +** +** PRHostEnt *hostEnt A pointer to a host entry struct that was +** previously returned by PR_GetHostByName() or +** PR_GetHostByAddr(). +** +** PRUint16 port The port number to be assigned as part of the +** PRNetAddr. +** +** OUTPUTS: +** PRNetAddr *address A pointer to an address structure that will be +** filled in by the call to the enumeration if the +** result of the call is greater than zero. +** +** RETURN: +** PRIntn The value that should be used for the next call +** of the enumerator ('enumIndex'). The enumeration +** is ended if this value is returned zero. +** If a value of -1 is returned, the enumeration +** has failed. The reason for the failure can be +** retrieved by calling PR_GetError(). +***********************************************************************/ +NSPR_API(PRIntn) PR_EnumerateHostEnt( + PRIntn enumIndex, const PRHostEnt *hostEnt, PRUint16 port, PRNetAddr *address); + +/*********************************************************************** +** FUNCTION: PR_InitializeNetAddr(), +** DESCRIPTION: +** Initialize the fields of a PRNetAddr, assigning well known values as +** appropriate. +** +** INPUTS +** PRNetAddrValue val The value to be assigned to the IP Address portion +** of the network address. This can only specify the +** special well known values that are equivalent to +** INADDR_ANY and INADDR_LOOPBACK. +** +** PRUint16 port The port number to be assigned in the structure. +** +** OUTPUTS: +** PRNetAddr *addr The address to be manipulated. +** +** RETURN: +** PRStatus To indicate success or failure. If the latter, the +** reason for the failure can be retrieved by calling +** PR_GetError(); +***********************************************************************/ +typedef enum PRNetAddrValue +{ + PR_IpAddrNull, /* do NOT overwrite the IP address */ + PR_IpAddrAny, /* assign logical INADDR_ANY to IP address */ + PR_IpAddrLoopback, /* assign logical INADDR_LOOPBACK */ + PR_IpAddrV4Mapped /* IPv4 mapped address */ +} PRNetAddrValue; + +NSPR_API(PRStatus) PR_InitializeNetAddr( + PRNetAddrValue val, PRUint16 port, PRNetAddr *addr); + +/*********************************************************************** +** FUNCTION: PR_SetNetAddr(), +** DESCRIPTION: +** Set the fields of a PRNetAddr, assigning well known values as +** appropriate. This function is similar to PR_InitializeNetAddr +** but differs in that the address family is specified. +** +** INPUTS +** PRNetAddrValue val The value to be assigned to the IP Address portion +** of the network address. This can only specify the +** special well known values that are equivalent to +** INADDR_ANY and INADDR_LOOPBACK. +** +** PRUint16 af The address family (either PR_AF_INET or PR_AF_INET6) +** +** PRUint16 port The port number to be assigned in the structure. +** +** OUTPUTS: +** PRNetAddr *addr The address to be manipulated. +** +** RETURN: +** PRStatus To indicate success or failure. If the latter, the +** reason for the failure can be retrieved by calling +** PR_GetError(); +***********************************************************************/ +NSPR_API(PRStatus) PR_SetNetAddr( + PRNetAddrValue val, PRUint16 af, PRUint16 port, PRNetAddr *addr); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_IsNetAddrType() +** Determine if the network address is of the specified type. +** +** INPUTS: +** const PRNetAddr *addr A network address. +** PRNetAddrValue The type of network address +** +** RETURN: +** PRBool PR_TRUE if the network address is of the +** specified type, else PR_FALSE. +***********************************************************************/ +NSPR_API(PRBool) PR_IsNetAddrType(const PRNetAddr *addr, PRNetAddrValue val); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_ConvertIPv4AddrToIPv6() +** Convert an IPv4 addr to an (IPv4-mapped) IPv6 addr +** +** INPUTS: +** PRUint32 v4addr IPv4 address +** +** OUTPUTS: +** PRIPv6Addr *v6addr The converted IPv6 address +** +** RETURN: +** void +** +***********************************************************************/ +NSPR_API(void) PR_ConvertIPv4AddrToIPv6(PRUint32 v4addr, PRIPv6Addr *v6addr); + +/*********************************************************************** +** MACRO: +** DESCRIPTION: PR_NetAddrFamily() +** Get the 'family' field of a PRNetAddr union. +** +** INPUTS: +** const PRNetAddr *addr A network address. +** +** RETURN: +** PRUint16 The 'family' field of 'addr'. +***********************************************************************/ +#define PR_NetAddrFamily(addr) ((addr)->raw.family) + +/*********************************************************************** +** MACRO: +** DESCRIPTION: PR_NetAddrInetPort() +** Get the 'port' field of a PRNetAddr union. +** +** INPUTS: +** const PRNetAddr *addr A network address. +** +** RETURN: +** PRUint16 The 'port' field of 'addr'. +***********************************************************************/ +#define PR_NetAddrInetPort(addr) \ + ((addr)->raw.family == PR_AF_INET6 ? (addr)->ipv6.port : (addr)->inet.port) + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_GetProtoByName() +** Lookup a protocol entry based on protocol's name +** +** INPUTS: +** char *protocolname Character string of the protocol's name. +** char *buf A scratch buffer for the runtime to return result. +** This buffer is allocated by the caller. +** PRIntn bufsize Number of bytes in 'buf'. A recommnded value to +** use is PR_NETDB_BUF_SIZE. +** OUTPUTS: +** PRHostEnt *PRProtoEnt +** This structure is filled in by the runtime if +** the function returns PR_SUCCESS. This structure +** is allocated by the caller. +** RETURN: +** PRStatus PR_SUCCESS if the lookup succeeds. If it fails +** the result will be PR_FAILURE and the reason +** for the failure can be retrieved by PR_GetError(). +***********************************************************************/ + +typedef struct PRProtoEnt { + char *p_name; /* official protocol name */ + char **p_aliases; /* alias list */ +#if defined(WIN32) || defined(WIN16) + PRInt16 p_num; /* protocol # */ +#else + PRInt32 p_num; /* protocol # */ +#endif +} PRProtoEnt; + +NSPR_API(PRStatus) PR_GetProtoByName( + const char* protocolname, char* buffer, PRInt32 bufsize, PRProtoEnt* result); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_GetProtoByNumber() +** Lookup a protocol entry based on protocol's number +** +** INPUTS: +** PRInt32 protocolnumber +** Number assigned to the protocol. +** char *buf A scratch buffer for the runtime to return result. +** This buffer is allocated by the caller. +** PRIntn bufsize Number of bytes in 'buf'. A recommnded value to +** use is PR_NETDB_BUF_SIZE. +** OUTPUTS: +** PRHostEnt *PRProtoEnt +** This structure is filled in by the runtime if +** the function returns PR_SUCCESS. This structure +** is allocated by the caller. +** RETURN: +** PRStatus PR_SUCCESS if the lookup succeeds. If it fails +** the result will be PR_FAILURE and the reason +** for the failure can be retrieved by PR_GetError(). +***********************************************************************/ +NSPR_API(PRStatus) PR_GetProtoByNumber( + PRInt32 protocolnumber, char* buffer, PRInt32 bufsize, PRProtoEnt* result); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_GetAddrInfoByName() +** Lookup a host by name. Equivalent to getaddrinfo(host, NULL, ...) of +** RFC 3493. +** +** INPUTS: +** char *hostname Character string defining the host name of interest +** PRUint16 af May be PR_AF_UNSPEC or PR_AF_INET. +** PRIntn flags May be either PR_AI_ADDRCONFIG or +** PR_AI_ADDRCONFIG | PR_AI_NOCANONNAME. Include +** PR_AI_NOCANONNAME to suppress the determination of +** the canonical name corresponding to hostname. +** RETURN: +** PRAddrInfo* Handle to a data structure containing the results +** of the host lookup. Use PR_EnumerateAddrInfo to +** inspect the PRNetAddr values stored in this object. +** When no longer needed, this handle must be destroyed +** with a call to PR_FreeAddrInfo. If a lookup error +** occurs, then NULL will be returned. +***********************************************************************/ +typedef struct PRAddrInfo PRAddrInfo; + +NSPR_API(PRAddrInfo*) PR_GetAddrInfoByName( + const char *hostname, PRUint16 af, PRIntn flags); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_FreeAddrInfo() +** Destroy the PRAddrInfo handle allocated by PR_GetAddrInfoByName(). +** +** INPUTS: +** PRAddrInfo *addrInfo +** The handle resulting from a successful call to +** PR_GetAddrInfoByName(). +** RETURN: +** void +***********************************************************************/ +NSPR_API(void) PR_FreeAddrInfo(PRAddrInfo *addrInfo); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_EnumerateAddrInfo() +** A stateless enumerator over a PRAddrInfo handle acquired from +** PR_GetAddrInfoByName() to inspect the possible network addresses. +** +** INPUTS: +** void *enumPtr Index pointer of the enumeration. The enumeration +** starts and ends with a value of NULL. +** PRAddrInfo *addrInfo +** The PRAddrInfo handle returned by a successful +** call to PR_GetAddrInfoByName(). +** PRUint16 port The port number to be assigned as part of the +** PRNetAddr. +** OUTPUTS: +** PRNetAddr *result A pointer to an address structure that will be +** filled in by the call to the enumeration if the +** result of the call is greater than zero. +** RETURN: +** void* The value that should be used for the next call +** of the enumerator ('enumPtr'). The enumeration +** is ended if this value is returned NULL. +***********************************************************************/ +NSPR_API(void *) PR_EnumerateAddrInfo( + void *enumPtr, const PRAddrInfo *addrInfo, PRUint16 port, PRNetAddr *result); + +/*********************************************************************** +** FUNCTION: +** DESCRIPTION: PR_GetCanonNameFromAddrInfo() +** Extracts the canonical name of the hostname passed to +** PR_GetAddrInfoByName(). +** +** INPUTS: +** PRAddrInfo *addrInfo +** The PRAddrInfo handle returned by a successful +** call to PR_GetAddrInfoByName(). +** RETURN: +** const char * A const pointer to the canonical hostname stored +** in the given PRAddrInfo handle. This pointer is +** invalidated once the PRAddrInfo handle is destroyed +** by a call to PR_FreeAddrInfo(). +***********************************************************************/ +NSPR_API(const char *) PR_GetCanonNameFromAddrInfo( + const PRAddrInfo *addrInfo); + +/*********************************************************************** +** FUNCTIONS: PR_ntohs, PR_ntohl, PR_ntohll, PR_htons, PR_htonl, PR_htonll +** +** DESCRIPTION: API entries for the common byte ordering routines. +** +** PR_ntohs 16 bit conversion from network to host +** PR_ntohl 32 bit conversion from network to host +** PR_ntohll 64 bit conversion from network to host +** PR_htons 16 bit conversion from host to network +** PR_htonl 32 bit conversion from host to network +** PR_ntonll 64 bit conversion from host to network +** +***********************************************************************/ +NSPR_API(PRUint16) PR_ntohs(PRUint16); +NSPR_API(PRUint32) PR_ntohl(PRUint32); +NSPR_API(PRUint64) PR_ntohll(PRUint64); +NSPR_API(PRUint16) PR_htons(PRUint16); +NSPR_API(PRUint32) PR_htonl(PRUint32); +NSPR_API(PRUint64) PR_htonll(PRUint64); + +PR_END_EXTERN_C + +#endif /* prnetdb_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prolock.h b/Src/nprt_plugin/gecko/1.8/win/include/prolock.h new file mode 100644 index 00000000..d8aece98 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prolock.h @@ -0,0 +1,210 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prolock_h___ +#define prolock_h___ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* +** A locking mechanism, built on the existing PRLock definiion, +** is provided that will permit applications to define a Lock +** Hierarchy (or Lock Ordering) schema. An application designed +** using the Ordered Lock functions will terminate with a +** diagnostic message when a lock inversion condition is +** detected. +** +** The lock ordering detection is complile-time enabled only. in +** optimized builds of NSPR, the Ordered Lock functions map +** directly to PRLock functions, providing no lock order +** detection. +** +** The Ordered Lock Facility is compiled in when DEBUG is defined at +** compile time. Ordered Lock can be forced on in optimized builds by +** defining FORCE_NSPR_ORDERED_LOCK at compile time. Both the +** application using Ordered Lock and NSPR must be compiled with the +** facility enabled to achieve the desired results. +** +** Application designers should use the macro interfaces to the Ordered +** Lock facility to ensure that it is compiled out in optimized builds. +** +** Application designers are responsible for defining their own +** lock hierarchy. +** +** Ordered Lock is thread-safe and SMP safe. +** +** See Also: prlock.h +** +** /lth. 10-Jun-1998. +** +*/ + +/* +** Opaque type for ordered lock. +** ... Don't even think of looking in here. +** +*/ + +#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS) +typedef void * PROrderedLock; +#else +/* +** Map PROrderedLock and methods onto PRLock when ordered locking +** is not compiled in. +** +*/ +#include "prlock.h" + +typedef PRLock PROrderedLock; +#endif + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_CreateOrderedLock() -- Create an Ordered Lock +** +** DESCRIPTION: PR_CreateOrderedLock() creates an ordered lock. +** +** INPUTS: +** order: user defined order of this lock. +** name: name of the lock. For debugging purposes. +** +** OUTPUTS: returned +** +** RETURNS: PR_OrderedLock pointer +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS) +#define PR_CREATE_ORDERED_LOCK(order,name)\ + PR_CreateOrderedLock((order),(name)) +#else +#define PR_CREATE_ORDERED_LOCK(order) PR_NewLock() +#endif + +NSPR_API(PROrderedLock *) + PR_CreateOrderedLock( + PRInt32 order, + const char *name +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_DestroyOrderedLock() -- Destroy an Ordered Lock +** +** DESCRIPTION: PR_DestroyOrderedLock() destroys the ordered lock +** referenced by lock. +** +** INPUTS: lock: pointer to a PROrderedLock +** +** OUTPUTS: the lock is destroyed +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS) +#define PR_DESTROY_ORDERED_LOCK(lock) PR_DestroyOrderedLock((lock)) +#else +#define PR_DESTROY_ORDERED_LOCK(lock) PR_DestroyLock((lock)) +#endif + +NSPR_API(void) + PR_DestroyOrderedLock( + PROrderedLock *lock +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_LockOrderedLock() -- Lock an ordered lock +** +** DESCRIPTION: PR_LockOrderedLock() locks the ordered lock +** referenced by lock. If the order of lock is less than or equal +** to the order of the highest lock held by the locking thread, +** the function asserts. +** +** INPUTS: lock: a pointer to a PROrderedLock +** +** OUTPUTS: The lock is held or the function asserts. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS) +#define PR_LOCK_ORDERED_LOCK(lock) PR_LockOrderedLock((lock)) +#else +#define PR_LOCK_ORDERED_LOCK(lock) PR_Lock((lock)) +#endif + +NSPR_API(void) + PR_LockOrderedLock( + PROrderedLock *lock +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_UnlockOrderedLock() -- unlock and Ordered Lock +** +** DESCRIPTION: PR_UnlockOrderedLock() unlocks the lock referenced +** by lock. +** +** INPUTS: lock: a pointer to a PROrderedLock +** +** OUTPUTS: the lock is unlocked +** +** RETURNS: +** PR_SUCCESS +** PR_FAILURE +** +** RESTRICTIONS: +** +*/ +#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS) +#define PR_UNLOCK_ORDERED_LOCK(lock) PR_UnlockOrderedLock((lock)) +#else +#define PR_UNLOCK_ORDERED_LOCK(lock) PR_Unlock((lock)) +#endif + +NSPR_API(PRStatus) + PR_UnlockOrderedLock( + PROrderedLock *lock +); + +PR_END_EXTERN_C + +#endif /* prolock_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prpdce.h b/Src/nprt_plugin/gecko/1.8/win/include/prpdce.h new file mode 100644 index 00000000..ebd595ac --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prpdce.h @@ -0,0 +1,118 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* + * File: prpdce.h + * Description: This file is the API defined to allow for DCE (aka POSIX) + * thread emulation in an NSPR environment. It is not the + * intent that this be a fully supported API. + */ + +#if !defined(PRPDCE_H) +#define PRPDCE_H + +#include "prlock.h" +#include "prcvar.h" +#include "prtypes.h" +#include "prinrval.h" + +PR_BEGIN_EXTERN_C + +#define _PR_NAKED_CV_LOCK (PRLock*)0xdce1dce1 + +/* +** Test and acquire a lock. +** +** If the lock is acquired by the calling thread, the +** return value will be PR_SUCCESS. If the lock is +** already held, by another thread or this thread, the +** result will be PR_FAILURE. +*/ +NSPR_API(PRStatus) PRP_TryLock(PRLock *lock); + +/* +** Create a naked condition variable +** +** A "naked" condition variable is one that is not created bound +** to a lock. The CV created with this function is the only type +** that may be used in the subsequent "naked" condition variable +** operations (see PRP_NakedWait, PRP_NakedNotify, PRP_NakedBroadcast); +*/ +NSPR_API(PRCondVar*) PRP_NewNakedCondVar(void); + +/* +** Destroy a naked condition variable +** +** Destroy the condition variable created by PR_NewNakedCondVar. +*/ +NSPR_API(void) PRP_DestroyNakedCondVar(PRCondVar *cvar); + +/* +** Wait on a condition +** +** Wait on the condition variable 'cvar'. It is asserted that +** the lock protecting the condition 'lock' is held by the +** calling thread. If more time expires than that declared in +** 'timeout' the condition will be notified. Waits can be +** interrupted by another thread. +** +** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar. +*/ +NSPR_API(PRStatus) PRP_NakedWait( + PRCondVar *cvar, PRLock *lock, PRIntervalTime timeout); + +/* +** Notify a thread waiting on a condition +** +** Notify the condition specified 'cvar'. +** +** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar. +*/ +NSPR_API(PRStatus) PRP_NakedNotify(PRCondVar *cvar); + +/* +** Notify all threads waiting on a condition +** +** Notify the condition specified 'cvar'. +** +** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar. +*/ +NSPR_API(PRStatus) PRP_NakedBroadcast(PRCondVar *cvar); + +PR_END_EXTERN_C + +#endif /* PRPDCE_H */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prprf.h b/Src/nprt_plugin/gecko/1.8/win/include/prprf.h new file mode 100644 index 00000000..7336d97f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prprf.h @@ -0,0 +1,154 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prprf_h___ +#define prprf_h___ + +/* +** API for PR printf like routines. Supports the following formats +** %d - decimal +** %u - unsigned decimal +** %x - unsigned hex +** %X - unsigned uppercase hex +** %o - unsigned octal +** %hd, %hu, %hx, %hX, %ho - 16-bit versions of above +** %ld, %lu, %lx, %lX, %lo - 32-bit versions of above +** %lld, %llu, %llx, %llX, %llo - 64 bit versions of above +** %s - string +** %c - character +** %p - pointer (deals with machine dependent pointer size) +** %f - float +** %g - float +*/ +#include "prtypes.h" +#include "prio.h" +#include <stdio.h> +#include <stdarg.h> + +PR_BEGIN_EXTERN_C + +/* +** sprintf into a fixed size buffer. Guarantees that a NUL is at the end +** of the buffer. Returns the length of the written output, NOT including +** the NUL, or (PRUint32)-1 if an error occurs. +*/ +NSPR_API(PRUint32) PR_snprintf(char *out, PRUint32 outlen, const char *fmt, ...); + +/* +** sprintf into a PR_MALLOC'd buffer. Return a pointer to the malloc'd +** buffer on success, NULL on failure. Call "PR_smprintf_free" to release +** the memory returned. +*/ +NSPR_API(char*) PR_smprintf(const char *fmt, ...); + +/* +** Free the memory allocated, for the caller, by PR_smprintf +*/ +NSPR_API(void) PR_smprintf_free(char *mem); + +/* +** "append" sprintf into a PR_MALLOC'd buffer. "last" is the last value of +** the PR_MALLOC'd buffer. sprintf will append data to the end of last, +** growing it as necessary using realloc. If last is NULL, PR_sprintf_append +** will allocate the initial string. The return value is the new value of +** last for subsequent calls, or NULL if there is a malloc failure. +*/ +NSPR_API(char*) PR_sprintf_append(char *last, const char *fmt, ...); + +/* +** sprintf into a function. The function "f" is called with a string to +** place into the output. "arg" is an opaque pointer used by the stuff +** function to hold any state needed to do the storage of the output +** data. The return value is a count of the number of characters fed to +** the stuff function, or (PRUint32)-1 if an error occurs. +*/ +typedef PRIntn (*PRStuffFunc)(void *arg, const char *s, PRUint32 slen); + +NSPR_API(PRUint32) PR_sxprintf(PRStuffFunc f, void *arg, const char *fmt, ...); + +/* +** fprintf to a PRFileDesc +*/ +NSPR_API(PRUint32) PR_fprintf(struct PRFileDesc* fd, const char *fmt, ...); + +/* +** va_list forms of the above. +*/ +NSPR_API(PRUint32) PR_vsnprintf(char *out, PRUint32 outlen, const char *fmt, va_list ap); +NSPR_API(char*) PR_vsmprintf(const char *fmt, va_list ap); +NSPR_API(char*) PR_vsprintf_append(char *last, const char *fmt, va_list ap); +NSPR_API(PRUint32) PR_vsxprintf(PRStuffFunc f, void *arg, const char *fmt, va_list ap); +NSPR_API(PRUint32) PR_vfprintf(struct PRFileDesc* fd, const char *fmt, va_list ap); + +/* +*************************************************************************** +** FUNCTION: PR_sscanf +** DESCRIPTION: +** PR_sscanf() scans the input character string, performs data +** conversions, and stores the converted values in the data objects +** pointed to by its arguments according to the format control +** string. +** +** PR_sscanf() behaves the same way as the sscanf() function in the +** Standard C Library (stdio.h), with the following exceptions: +** - PR_sscanf() handles the NSPR integer and floating point types, +** such as PRInt16, PRInt32, PRInt64, and PRFloat64, whereas +** sscanf() handles the standard C types like short, int, long, +** and double. +** - PR_sscanf() has no multibyte character support, while sscanf() +** does. +** INPUTS: +** const char *buf +** a character string holding the input to scan +** const char *fmt +** the format control string for the conversions +** ... +** variable number of arguments, each of them is a pointer to +** a data object in which the converted value will be stored +** OUTPUTS: none +** RETURNS: PRInt32 +** The number of values converted and stored. +** RESTRICTIONS: +** Multibyte characters in 'buf' or 'fmt' are not allowed. +*************************************************************************** +*/ + +NSPR_API(PRInt32) PR_sscanf(const char *buf, const char *fmt, ...); + +PR_END_EXTERN_C + +#endif /* prprf_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prproces.h b/Src/nprt_plugin/gecko/1.8/win/include/prproces.h new file mode 100644 index 00000000..0c1e8a65 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prproces.h @@ -0,0 +1,118 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prproces_h___ +#define prproces_h___ + +#include "prtypes.h" +#include "prio.h" + +PR_BEGIN_EXTERN_C + +/************************************************************************/ +/*****************************PROCESS OPERATIONS*************************/ +/************************************************************************/ + +typedef struct PRProcess PRProcess; +typedef struct PRProcessAttr PRProcessAttr; + +NSPR_API(PRProcessAttr *) PR_NewProcessAttr(void); + +NSPR_API(void) PR_ResetProcessAttr(PRProcessAttr *attr); + +NSPR_API(void) PR_DestroyProcessAttr(PRProcessAttr *attr); + +NSPR_API(void) PR_ProcessAttrSetStdioRedirect( + PRProcessAttr *attr, + PRSpecialFD stdioFd, + PRFileDesc *redirectFd +); + +/* + * OBSOLETE -- use PR_ProcessAttrSetStdioRedirect instead. + */ +NSPR_API(void) PR_SetStdioRedirect( + PRProcessAttr *attr, + PRSpecialFD stdioFd, + PRFileDesc *redirectFd +); + +NSPR_API(PRStatus) PR_ProcessAttrSetCurrentDirectory( + PRProcessAttr *attr, + const char *dir +); + +NSPR_API(PRStatus) PR_ProcessAttrSetInheritableFD( + PRProcessAttr *attr, + PRFileDesc *fd, + const char *name +); + +/* +** Create a new process +** +** Create a new process executing the file specified as 'path' and with +** the supplied arguments and environment. +** +** This function may fail because of illegal access (permissions), +** invalid arguments or insufficient resources. +** +** A process may be created such that the creator can later synchronize its +** termination using PR_WaitProcess(). +*/ + +NSPR_API(PRProcess*) PR_CreateProcess( + const char *path, + char *const *argv, + char *const *envp, + const PRProcessAttr *attr); + +NSPR_API(PRStatus) PR_CreateProcessDetached( + const char *path, + char *const *argv, + char *const *envp, + const PRProcessAttr *attr); + +NSPR_API(PRStatus) PR_DetachProcess(PRProcess *process); + +NSPR_API(PRStatus) PR_WaitProcess(PRProcess *process, PRInt32 *exitCode); + +NSPR_API(PRStatus) PR_KillProcess(PRProcess *process); + +PR_END_EXTERN_C + +#endif /* prproces_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prrng.h b/Src/nprt_plugin/gecko/1.8/win/include/prrng.h new file mode 100644 index 00000000..e94b806b --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prrng.h @@ -0,0 +1,107 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1999-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + + +/* +** prrng.h -- NSPR Random Number Generator +** +** +** lth. 29-Oct-1999. +*/ + +#ifndef prrng_h___ +#define prrng_h___ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* +** PR_GetRandomNoise() -- Get random noise from the host platform +** +** Description: +** PR_GetRandomNoise() provides, depending on platform, a random value. +** The length of the random value is dependent on platform and the +** platform's ability to provide a random value at that moment. +** +** The intent of PR_GetRandomNoise() is to provide a "seed" value for a +** another random number generator that may be suitable for +** cryptographic operations. This implies that the random value +** provided may not be, by itself, cryptographically secure. The value +** generated by PR_GetRandomNoise() is at best, extremely difficult to +** predict and is as non-deterministic as the underlying platfrom can +** provide. +** +** Inputs: +** buf -- pointer to a caller supplied buffer to contain the +** generated random number. buf must be at least as large as +** is specified in the 'size' argument. +** +** size -- the requested size of the generated random number +** +** Outputs: +** a random number provided in 'buf'. +** +** Returns: +** PRSize value equal to the size of the random number actually +** generated, or zero. The generated size may be less than the size +** requested. A return value of zero means that PR_GetRandomNoise() is +** not implemented on this platform, or there is no available noise +** available to be returned at the time of the call. +** +** Restrictions: +** Calls to PR_GetRandomNoise() may use a lot of CPU on some platforms. +** Some platforms may block for up to a few seconds while they +** accumulate some noise. Busy machines generate lots of noise, but +** care is advised when using PR_GetRandomNoise() frequently in your +** application. +** +** History: +** Parts of the model dependent implementation for PR_GetRandomNoise() +** were taken in whole or part from code previously in Netscape's NSS +** component. +** +*/ +NSPR_API(PRSize) PR_GetRandomNoise( + void *buf, + PRSize size +); + +PR_END_EXTERN_C + +#endif /* prrng_h___ */ +/* end prrng.h */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prrwlock.h b/Src/nprt_plugin/gecko/1.8/win/include/prrwlock.h new file mode 100644 index 00000000..945e5f88 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prrwlock.h @@ -0,0 +1,120 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: prrwlock.h +** Description: API to basic reader-writer lock functions of NSPR. +** +**/ + +#ifndef prrwlock_h___ +#define prrwlock_h___ + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* + * PRRWLock -- + * + * The reader writer lock, PRRWLock, is an opaque object to the clients + * of NSPR. All routines operate on a pointer to this opaque entity. + */ + + +typedef struct PRRWLock PRRWLock; + +#define PR_RWLOCK_RANK_NONE 0 + + +/*********************************************************************** +** FUNCTION: PR_NewRWLock +** DESCRIPTION: +** Returns a pointer to a newly created reader-writer lock object. +** INPUTS: Lock rank +** Lock name +** OUTPUTS: void +** RETURN: PRRWLock* +** If the lock cannot be created because of resource constraints, NULL +** is returned. +** +***********************************************************************/ +NSPR_API(PRRWLock*) PR_NewRWLock(PRUint32 lock_rank, const char *lock_name); + +/*********************************************************************** +** FUNCTION: PR_DestroyRWLock +** DESCRIPTION: +** Destroys a given RW lock object. +** INPUTS: PRRWLock *lock - Lock to be freed. +** OUTPUTS: void +** RETURN: None +***********************************************************************/ +NSPR_API(void) PR_DestroyRWLock(PRRWLock *lock); + +/*********************************************************************** +** FUNCTION: PR_RWLock_Rlock +** DESCRIPTION: +** Apply a read lock (non-exclusive) on a RWLock +** INPUTS: PRRWLock *lock - Lock to be read-locked. +** OUTPUTS: void +** RETURN: None +***********************************************************************/ +NSPR_API(void) PR_RWLock_Rlock(PRRWLock *lock); + +/*********************************************************************** +** FUNCTION: PR_RWLock_Wlock +** DESCRIPTION: +** Apply a write lock (exclusive) on a RWLock +** INPUTS: PRRWLock *lock - Lock to write-locked. +** OUTPUTS: void +** RETURN: None +***********************************************************************/ +NSPR_API(void) PR_RWLock_Wlock(PRRWLock *lock); + +/*********************************************************************** +** FUNCTION: PR_RWLock_Unlock +** DESCRIPTION: +** Release a RW lock. Unlocking an unlocked lock has undefined results. +** INPUTS: PRRWLock *lock - Lock to unlocked. +** OUTPUTS: void +** RETURN: void +***********************************************************************/ +NSPR_API(void) PR_RWLock_Unlock(PRRWLock *lock); + +PR_END_EXTERN_C + +#endif /* prrwlock_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prshm.h b/Src/nprt_plugin/gecko/1.8/win/include/prshm.h new file mode 100644 index 00000000..098566ec --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prshm.h @@ -0,0 +1,289 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1999-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** prshm.h -- NSPR Shared Memory +** +** NSPR Named Shared Memory API provides a cross-platform named +** shared-memory interface. NSPR Named Shared Memory is modeled on +** similar constructs in Unix and Windows operating systems. Shared +** memory allows multiple processes to access one or more common shared +** memory regions, using it as an inter-process communication channel. +** +** Notes on Platform Independence: +** NSPR Named Shared Memory is built on the native services offered +** by most platforms. The NSPR Named Shared Memory API tries to +** provide a least common denominator interface so that it works +** across all supported platforms. To ensure that it works everywhere, +** some platform considerations must be accomodated and the protocol +** for using NSPR Shared Memory API must be observed. +** +** Protocol: +** Multiple shared memories can be created using NSPR's Shared Memory +** feature. For each named shared memory, as defined by the name +** given in the PR_OpenSharedMemory() call, a protocol for using the +** shared memory API is required to ensure desired behavior. Failing +** to follow the protocol may yield unpredictable results. +** +** PR_OpenSharedMemory() will create the shared memory segment, if it +** does not already exist, or open a connection that the existing +** shared memory segment if it already exists. +** +** PR_AttachSharedMemory() should be called following +** PR_OpenSharedMemory() to map the memory segment to an address in +** the application's address space. +** +** PR_AttachSharedMemory() may be called to re-map a shared memory +** segment after detaching the same PRSharedMemory object. Be +** sure to detach it when done. +** +** PR_DetachSharedMemory() should be called to un-map the shared +** memory segment from the application's address space. +** +** PR_CloseSharedMemory() should be called when no further use of the +** PRSharedMemory object is required within a process. Following a +** call to PR_CloseSharedMemory() the PRSharedMemory object is +** invalid and cannot be reused. +** +** PR_DeleteSharedMemory() should be called before process +** termination. After calling PR_DeleteSharedMemory() any further use +** of the shared memory associated with the name may cause +** unpredictable results. +** +** Files: +** The name passed to PR_OpenSharedMemory() should be a valid filename +** for a unix platform. PR_OpenSharedMemory() creates file using the +** name passed in. Some platforms may mangle the name before creating +** the file and the shared memory. +** +** The unix implementation may use SysV IPC shared memory, Posix +** shared memory, or memory mapped files; the filename may used to +** define the namespace. On Windows, the name is significant, but +** there is no file associated with name. +** +** No assumptions about the persistence of data in the named file +** should be made. Depending on platform, the shared memory may be +** mapped onto system paging space and be discarded at process +** termination. +** +** All names provided to PR_OpenSharedMemory() should be valid +** filename syntax or name syntax for shared memory for the target +** platform. Referenced directories should have permissions +** appropriate for writing. +** +** Limits: +** Different platforms have limits on both the number and size of +** shared memory resources. The default system limits on some +** platforms may be smaller than your requirements. These limits may +** be adjusted on some platforms either via boot-time options or by +** setting the size of the system paging space to accomodate more +** and/or larger shared memory segment(s). +** +** Security: +** On unix platforms, depending on implementation, contents of the +** backing store for the shared memory can be exposed via the file +** system. Set permissions and or access controls at create and attach +** time to ensure you get the desired security. +** +** On windows platforms, no special security measures are provided. +** +** Example: +** The test case pr/tests/nameshm1.c provides an example of use as +** well as testing the operation of NSPR's Named Shared Memory. +** +** lth. 18-Aug-1999. +*/ + +#ifndef prshm_h___ +#define prshm_h___ + +#include "prtypes.h" +#include "prio.h" + +PR_BEGIN_EXTERN_C + +/* +** Declare opaque type PRSharedMemory. +*/ +typedef struct PRSharedMemory PRSharedMemory; + +/* +** FUNCTION: PR_OpenSharedMemory() +** +** DESCRIPTION: +** PR_OpenSharedMemory() creates a new shared-memory segment or +** associates a previously created memory segment with name. +** +** When parameter create is (PR_SHM_EXCL | PR_SHM_CREATE) and the +** shared memory already exists, the function returns NULL with the +** error set to PR_FILE_EXISTS_ERROR. +** +** When parameter create is PR_SHM_CREATE and the shared memory +** already exists, a handle to that memory segment is returned. If +** the segment does not exist, it is created and a pointer to the +** related PRSharedMemory structure is returned. +** +** When parameter create is 0, and the shared memory exists, a +** pointer to a PRSharedMemory is returned. If the shared memory does +** not exist, NULL is returned with the error set to +** PR_FILE_NOT_FOUND_ERROR. +** +** INPUTS: +** name -- the name the shared-memory segment is known as. +** size -- the size of the shared memory segment. +** flags -- Options for creating the shared memory +** mode -- Same as is passed to PR_Open() +** +** OUTPUTS: +** The shared memory is allocated. +** +** RETURNS: Pointer to opaque structure PRSharedMemory or NULL. +** NULL is returned on error. The reason for the error can be +** retrieved via PR_GetError() and PR_GetOSError(); +** +*/ +NSPR_API( PRSharedMemory * ) + PR_OpenSharedMemory( + const char *name, + PRSize size, + PRIntn flags, + PRIntn mode +); +/* Define values for PR_OpenShareMemory(...,create) */ +#define PR_SHM_CREATE 0x1 /* create if not exist */ +#define PR_SHM_EXCL 0x2 /* fail if already exists */ + +/* +** FUNCTION: PR_AttachSharedMemory() +** +** DESCRIPTION: +** PR_AttachSharedMemory() maps the shared-memory described by +** shm to the current process. +** +** INPUTS: +** shm -- The handle returned from PR_OpenSharedMemory(). +** flags -- options for mapping the shared memory. +** PR_SHM_READONLY causes the memory to be attached +** read-only. +** +** OUTPUTS: +** On success, the shared memory segment represented by shm is mapped +** into the process' address space. +** +** RETURNS: Address where shared memory is mapped, or NULL. +** NULL is returned on error. The reason for the error can be +** retrieved via PR_GetError() and PR_GetOSError(); +** +** +*/ +NSPR_API( void * ) + PR_AttachSharedMemory( + PRSharedMemory *shm, + PRIntn flags +); +/* Define values for PR_AttachSharedMemory(...,flags) */ +#define PR_SHM_READONLY 0x01 + +/* +** FUNCTION: PR_DetachSharedMemory() +** +** DESCRIPTION: +** PR_DetachSharedMemory() detaches the shared-memory described +** by shm. +** +** INPUTS: +** shm -- The handle returned from PR_OpenSharedMemory(). +** addr -- The address at which the memory was attached. +** +** OUTPUTS: +** The shared memory mapped to an address via a previous call to +** PR_AttachSharedMemory() is unmapped. +** +** RETURNS: PRStatus +** +*/ +NSPR_API( PRStatus ) + PR_DetachSharedMemory( + PRSharedMemory *shm, + void *addr +); + +/* +** FUNCTION: PR_CloseSharedMemory() +** +** DESCRIPTION: +** PR_CloseSharedMemory() closes the shared-memory described by +** shm. +** +** INPUTS: +** shm -- The handle returned from PR_OpenSharedMemory(). +** +** OUTPUTS: +** the shared memory represented by shm is closed +** +** RETURNS: PRStatus +** +*/ +NSPR_API( PRStatus ) + PR_CloseSharedMemory( + PRSharedMemory *shm +); + +/* +** FUNCTION: PR_DeleteSharedMemory() +** +** DESCRIPTION: +** The shared memory resource represented by name is released. +** +** INPUTS: +** name -- the name the shared-memory segment +** +** OUTPUTS: +** depending on platform, resources may be returned to the underlying +** operating system. +** +** RETURNS: PRStatus +** +*/ +NSPR_API( PRStatus ) + PR_DeleteSharedMemory( + const char *name +); + +PR_END_EXTERN_C + +#endif /* prshm_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prshma.h b/Src/nprt_plugin/gecko/1.8/win/include/prshma.h new file mode 100644 index 00000000..e72ee85f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prshma.h @@ -0,0 +1,271 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1999-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** prshma.h -- NSPR Anonymous Shared Memory +** +** NSPR provides an anonymous shared memory based on NSPR's PRFileMap +** type. The anonymous file-mapped shared memory provides an inheritable +** shared memory, as in: the child process inherits the shared memory. +** Compare the file-mapped anonymous shared memory to to a named shared +** memory described in prshm.h. The intent is to provide a shared +** memory that is accessable only by parent and child processes. ... +** It's a security thing. +** +** Depending on the underlying platform, the file-mapped shared memory +** may be backed by a file. ... surprise! ... On some platforms, no +** real file backs the shared memory. On platforms where the shared +** memory is backed by a file, the file's name in the filesystem is +** visible to other processes for only the duration of the creation of +** the file, hopefully a very short time. This restricts processess +** that do not inherit the shared memory from opening the file and +** reading or writing its contents. Further, when all processes +** using an anonymous shared memory terminate, the backing file is +** deleted. ... If you are not paranoid, you're not paying attention. +** +** The file-mapped shared memory requires a protocol for the parent +** process and child process to share the memory. NSPR provides two +** protocols. Use one or the other; don't mix and match. +** +** In the first protocol, the job of passing the inheritable shared +** memory is done via helper-functions with PR_CreateProcess(). In the +** second protocol, the parent process is responsible for creating the +** child process; the parent and child are mutually responsible for +** passing a FileMap string. NSPR provides helper functions for +** extracting data from the PRFileMap object. ... See the examples +** below. +** +** Both sides should adhere strictly to the protocol for proper +** operation. The pseudo-code below shows the use of a file-mapped +** shared memory by a parent and child processes. In the examples, the +** server creates the file-mapped shared memory, the client attaches to +** it. +** +** First protocol. +** Server: +** +** fm = PR_OpenAnonFileMap(dirName, size, FilemapProt); +** addr = PR_MemMap(fm); +** attr = PR_NewProcessAttr(); +** PR_ProcessAttrSetInheritableFileMap( attr, fm, shmname ); +** PR_CreateProcess(Client); +** PR_DestroyProcessAttr(attr); +** ... yadda ... +** PR_MemUnmap( addr ); +** PR_CloseFileMap(fm); +** +** +** Client: +** ... started by server via PR_CreateProcess() +** fm = PR_GetInheritedFileMap( shmname ); +** addr = PR_MemMap(fm); +** ... yadda ... +** PR_MemUnmap(addr); +** PR_CloseFileMap(fm); +** +** +** Second Protocol: +** Server: +** +** fm = PR_OpenAnonFileMap(dirName, size, FilemapProt); +** fmstring = PR_ExportFileMapAsString( fm ); +** addr = PR_MemMap(fm); +** ... application specific technique to pass fmstring to child +** ... yadda ... Server uses his own magic to create child +** PR_MemUnmap( addr ); +** PR_CloseFileMap(fm); +** +** +** Client: +** ... started by server via his own magic +** ... application specific technique to find fmstring from parent +** fm = PR_ImportFileMapFromString( fmstring ) +** addr = PR_MemMap(fm); +** ... yadda ... +** PR_MemUnmap(addr); +** PR_CloseFileMap(fm); +** +** +** lth. 2-Jul-1999. +** +** Note: The second protocol was requested by NelsonB (7/1999); this is +** to accomodate servers which already create their own child processes +** using platform native methods. +** +*/ + +#ifndef prshma_h___ +#define prshma_h___ + +#include "prtypes.h" +#include "prio.h" +#include "prproces.h" + +PR_BEGIN_EXTERN_C + +/* +** PR_OpenAnonFileMap() -- Creates an anonymous file-mapped shared memory +** +** Description: +** PR_OpenAnonFileMap() creates an anonymous shared memory. If the +** shared memory already exists, a handle is returned to that shared +** memory object. +** +** On Unix platforms, PR_OpenAnonFileMap() uses 'dirName' as a +** directory name, without the trailing '/', to contain the anonymous +** file. A filename is generated for the name. +** +** On Windows platforms, dirName is ignored. +** +** Inputs: +** dirName -- A directory name to contain the anonymous file. +** size -- The size of the shared memory +** prot -- How the shared memory is mapped. See prio.h +** +** Outputs: +** PRFileMap * +** +** Returns: +** Pointer to PRFileMap or NULL on error. +** +*/ +NSPR_API( PRFileMap *) +PR_OpenAnonFileMap( + const char *dirName, + PRSize size, + PRFileMapProtect prot +); + +/* +** PR_ProcessAttrSetInheritableFileMap() -- Prepare FileMap for export +** to my children processes via PR_CreateProcess() +** +** Description: +** PR_ProcessAttrSetInheritableFileMap() connects the PRFileMap to +** PRProcessAttr with shmname. A subsequent call to PR_CreateProcess() +** makes the PRFileMap importable by the child process. +** +** Inputs: +** attr -- PRProcessAttr, used to pass data to PR_CreateProcess() +** fm -- PRFileMap structure to be passed to the child process +** shmname -- The name for the PRFileMap; used by child. +** +** Outputs: +** PRFileMap * +** +** Returns: +** PRStatus +** +*/ +NSPR_API(PRStatus) +PR_ProcessAttrSetInheritableFileMap( + PRProcessAttr *attr, + PRFileMap *fm, + const char *shmname +); + +/* +** PR_GetInheritedFileMap() -- Import a PRFileMap previously exported +** by my parent process via PR_CreateProcess() +** +** Description: +** PR_GetInheritedFileMap() retrieves a PRFileMap object exported from +** its parent process via PR_CreateProcess(). +** +** Inputs: +** shmname -- The name provided to PR_ProcessAttrSetInheritableFileMap() +** +** Outputs: +** PRFileMap * +** +** Returns: +** PRFileMap pointer or NULL. +** +*/ +NSPR_API( PRFileMap *) +PR_GetInheritedFileMap( + const char *shmname +); + +/* +** PR_ExportFileMapAsString() -- Creates a string identifying a PRFileMap +** +** Description: +** Creates an identifier, as a string, from a PRFileMap object +** previously created with PR_OpenAnonFileMap(). +** +** Inputs: +** fm -- PRFileMap pointer to be represented as a string. +** bufsize -- sizeof(buf) +** buf -- a buffer of length PR_FILEMAP_STRING_BUFSIZE +** +** Outputs: +** buf contains the stringized PRFileMap identifier +** +** Returns: +** PRStatus +** +*/ +NSPR_API( PRStatus ) +PR_ExportFileMapAsString( + PRFileMap *fm, + PRSize bufsize, + char *buf +); +#define PR_FILEMAP_STRING_BUFSIZE 128 + +/* +** PR_ImportFileMapFromString() -- Creates a PRFileMap from the identifying string +** +** Description: +** PR_ImportFileMapFromString() creates a PRFileMap object from a +** string previously created by PR_ExportFileMapAsString(). +** +** Inputs: +** fmstring -- string created by PR_ExportFileMapAsString() +** +** Returns: +** PRFileMap pointer or NULL. +** +*/ +NSPR_API( PRFileMap * ) +PR_ImportFileMapFromString( + const char *fmstring +); + +PR_END_EXTERN_C +#endif /* prshma_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prsystem.h b/Src/nprt_plugin/gecko/1.8/win/include/prsystem.h new file mode 100644 index 00000000..b0dfcf9e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prsystem.h @@ -0,0 +1,137 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prsystem_h___ +#define prsystem_h___ + +/* +** API to NSPR functions returning system info. +*/ +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* +** Get the host' directory separator. +** Pathnames are then assumed to be of the form: +** [<sep><root_component><sep>]*(<component><sep>)<leaf_name> +*/ + +NSPR_API(char) PR_GetDirectorySeparator(void); + +/* +** OBSOLETE -- the function name is misspelled. +** Use PR_GetDirectorySeparator instead. +*/ + +NSPR_API(char) PR_GetDirectorySepartor(void); + +/* +** Get the host' path separator. +** Paths are assumed to be of the form: +** <directory>[<sep><directory>]* +*/ + +NSPR_API(char) PR_GetPathSeparator(void); + +/* Types of information available via PR_GetSystemInfo(...) */ +typedef enum { + PR_SI_HOSTNAME, + PR_SI_SYSNAME, + PR_SI_RELEASE, + PR_SI_ARCHITECTURE +} PRSysInfo; + + +/* +** If successful returns a null termintated string in 'buf' for +** the information indicated in 'cmd'. If unseccussful the reason for +** the failure can be retrieved from PR_GetError(). +** +** The buffer is allocated by the caller and should be at least +** SYS_INFO_BUFFER_LENGTH bytes in length. +*/ + +#define SYS_INFO_BUFFER_LENGTH 256 + +NSPR_API(PRStatus) PR_GetSystemInfo(PRSysInfo cmd, char *buf, PRUint32 buflen); + +/* +** Return the number of bytes in a page +*/ +NSPR_API(PRInt32) PR_GetPageSize(void); + +/* +** Return log2 of the size of a page +*/ +NSPR_API(PRInt32) PR_GetPageShift(void); + +/* +** PR_GetNumberOfProcessors() -- returns the number of CPUs +** +** Description: +** PR_GetNumberOfProcessors() extracts the number of processors +** (CPUs available in an SMP system) and returns the number. +** +** Parameters: +** none +** +** Returns: +** The number of available processors or -1 on error +** +*/ +NSPR_API(PRInt32) PR_GetNumberOfProcessors( void ); + +/* +** PR_GetPhysicalMemorySize() -- returns the amount of system RAM +** +** Description: +** PR_GetPhysicalMemorySize() determines the amount of physical RAM +** in the system and returns the size in bytes. +** +** Parameters: +** none +** +** Returns: +** The amount of system RAM, or 0 on failure. +** +*/ +NSPR_API(PRUint64) PR_GetPhysicalMemorySize(void); + +PR_END_EXTERN_C + +#endif /* prsystem_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prthread.h b/Src/nprt_plugin/gecko/1.8/win/include/prthread.h new file mode 100644 index 00000000..dba1c9b8 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prthread.h @@ -0,0 +1,286 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prthread_h___ +#define prthread_h___ + +/* +** API for NSPR threads. On some architectures (MAC and WIN16 +** notably) pre-emptibility is not guaranteed. Hard priority scheduling +** is not guaranteed, so programming using priority based synchronization +** is a no-no. +** +** NSPR threads are scheduled based loosely on their client set priority. +** In general, a thread of a higher priority has a statistically better +** chance of running relative to threads of lower priority. However, +** NSPR uses multiple strategies to provide execution vehicles for thread +** abstraction of various host platforms. As it turns out, there is little +** NSPR can do to affect the scheduling attributes of "GLOBAL" threads. +** However, a semblance of GLOBAL threads is used to implement "LOCAL" +** threads. An arbitrary number of such LOCAL threads can be assigned to +** a single GLOBAL thread. +** +** For scheduling, NSPR will attempt to run the highest priority LOCAL +** thread associated with a given GLOBAL thread. It is further assumed +** that the host OS will apply some form of "fair" scheduling on the +** GLOBAL threads. +** +** Threads have a "system flag" which when set indicates the thread +** doesn't count for determining when the process should exit (the +** process exits when the last user thread exits). +** +** Threads also have a "scope flag" which controls whether the threads +** are scheduled in the local scope or scheduled by the OS globally. This +** indicates whether a thread is permanently bound to a native OS thread. +** An unbound thread competes for scheduling resources in the same process. +** +** Another flag is "state flag" which control whether the thread is joinable. +** It allows other threads to wait for the created thread to reach completion. +** +** Threads can have "per-thread-data" attached to them. Each thread has a +** per-thread error number and error string which are updated when NSPR +** operations fail. +*/ +#include "prtypes.h" +#include "prinrval.h" + +PR_BEGIN_EXTERN_C + +typedef struct PRThread PRThread; +typedef struct PRThreadStack PRThreadStack; + +typedef enum PRThreadType { + PR_USER_THREAD, + PR_SYSTEM_THREAD +} PRThreadType; + +typedef enum PRThreadScope { + PR_LOCAL_THREAD, + PR_GLOBAL_THREAD, + PR_GLOBAL_BOUND_THREAD +} PRThreadScope; + +typedef enum PRThreadState { + PR_JOINABLE_THREAD, + PR_UNJOINABLE_THREAD +} PRThreadState; + +typedef enum PRThreadPriority +{ + PR_PRIORITY_FIRST = 0, /* just a placeholder */ + PR_PRIORITY_LOW = 0, /* the lowest possible priority */ + PR_PRIORITY_NORMAL = 1, /* most common expected priority */ + PR_PRIORITY_HIGH = 2, /* slightly more aggressive scheduling */ + PR_PRIORITY_URGENT = 3, /* it does little good to have more than one */ + PR_PRIORITY_LAST = 3 /* this is just a placeholder */ +} PRThreadPriority; + +/* +** Create a new thread: +** "type" is the type of thread to create +** "start(arg)" will be invoked as the threads "main" +** "priority" will be created thread's priority +** "scope" will specify whether the thread is local or global +** "state" will specify whether the thread is joinable or not +** "stackSize" the size of the stack, in bytes. The value can be zero +** and then a machine specific stack size will be chosen. +** +** This can return NULL if some kind of error occurs, such as if memory is +** tight. +** +** If you want the thread to start up waiting for the creator to do +** something, enter a lock before creating the thread and then have the +** threads start routine enter and exit the same lock. When you are ready +** for the thread to run, exit the lock. +** +** If you want to detect the completion of the created thread, the thread +** should be created joinable. Then, use PR_JoinThread to synchrnoize the +** termination of another thread. +** +** When the start function returns the thread exits. If it is the last +** PR_USER_THREAD to exit then the process exits. +*/ +NSPR_API(PRThread*) PR_CreateThread(PRThreadType type, + void (PR_CALLBACK *start)(void *arg), + void *arg, + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); + +/* +** Wait for thread termination: +** "thread" is the target thread +** +** This can return PR_FAILURE if no joinable thread could be found +** corresponding to the specified target thread. +** +** The calling thread is blocked until the target thread completes. +** Several threads cannot wait for the same thread to complete; one thread +** will operate successfully and others will terminate with an error PR_FAILURE. +** The calling thread will not be blocked if the target thread has already +** terminated. +*/ +NSPR_API(PRStatus) PR_JoinThread(PRThread *thread); + +/* +** Return the current thread object for the currently running code. +** Never returns NULL. +*/ +NSPR_API(PRThread*) PR_GetCurrentThread(void); +#ifndef NO_NSPR_10_SUPPORT +#define PR_CurrentThread() PR_GetCurrentThread() /* for nspr1.0 compat. */ +#endif /* NO_NSPR_10_SUPPORT */ + +/* +** Get the priority of "thread". +*/ +NSPR_API(PRThreadPriority) PR_GetThreadPriority(const PRThread *thread); + +/* +** Change the priority of the "thread" to "priority". +*/ +NSPR_API(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority); + +/* +** This routine returns a new index for per-thread-private data table. +** The index is visible to all threads within a process. This index can +** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines +** to save and retrieve data associated with the index for a thread. +** +** Each index is associationed with a destructor function ('dtor'). The function +** may be specified as NULL when the index is created. If it is not NULL, the +** function will be called when: +** - the thread exits and the private data for the associated index +** is not NULL, +** - new thread private data is set and the current private data is +** not NULL. +** +** The index independently maintains specific values for each binding thread. +** A thread can only get access to its own thread-specific-data. +** +** Upon a new index return the value associated with the index for all threads +** is NULL, and upon thread creation the value associated with all indices for +** that thread is NULL. +** +** Returns PR_FAILURE if the total number of indices will exceed the maximun +** allowed. +*/ +typedef void (PR_CALLBACK *PRThreadPrivateDTOR)(void *priv); + +NSPR_API(PRStatus) PR_NewThreadPrivateIndex( + PRUintn *newIndex, PRThreadPrivateDTOR destructor); + +/* +** Define some per-thread-private data. +** "tpdIndex" is an index into the per-thread private data table +** "priv" is the per-thread-private data +** +** If the per-thread private data table has a previously registered +** destructor function and a non-NULL per-thread-private data value, +** the destructor function is invoked. +** +** This can return PR_FAILURE if the index is invalid. +*/ +NSPR_API(PRStatus) PR_SetThreadPrivate(PRUintn tpdIndex, void *priv); + +/* +** Recover the per-thread-private data for the current thread. "tpdIndex" is +** the index into the per-thread private data table. +** +** The returned value may be NULL which is indistinguishable from an error +** condition. +** +** A thread can only get access to its own thread-specific-data. +*/ +NSPR_API(void*) PR_GetThreadPrivate(PRUintn tpdIndex); + +/* +** This routine sets the interrupt request for a target thread. The interrupt +** request remains in the thread's state until it is delivered exactly once +** or explicitly canceled. +** +** A thread that has been interrupted will fail all NSPR blocking operations +** that return a PRStatus (I/O, waiting on a condition, etc). +** +** PR_Interrupt may itself fail if the target thread is invalid. +*/ +NSPR_API(PRStatus) PR_Interrupt(PRThread *thread); + +/* +** Clear the interrupt request for the calling thread. If no such request +** is pending, this operation is a noop. +*/ +NSPR_API(void) PR_ClearInterrupt(void); + +/* +** Block the interrupt for the calling thread. +*/ +NSPR_API(void) PR_BlockInterrupt(void); + +/* +** Unblock the interrupt for the calling thread. +*/ +NSPR_API(void) PR_UnblockInterrupt(void); + +/* +** Make the current thread sleep until "ticks" time amount of time +** has expired. If "ticks" is PR_INTERVAL_NO_WAIT then the call is +** equivalent to calling PR_Yield. Calling PR_Sleep with an argument +** equivalent to PR_INTERVAL_NO_TIMEOUT is an error and will result +** in a PR_FAILURE error return. +*/ +NSPR_API(PRStatus) PR_Sleep(PRIntervalTime ticks); + +/* +** Get the scoping of this thread. +*/ +NSPR_API(PRThreadScope) PR_GetThreadScope(const PRThread *thread); + +/* +** Get the type of this thread. +*/ +NSPR_API(PRThreadType) PR_GetThreadType(const PRThread *thread); + +/* +** Get the join state of this thread. +*/ +NSPR_API(PRThreadState) PR_GetThreadState(const PRThread *thread); + +PR_END_EXTERN_C + +#endif /* prthread_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prtime.h b/Src/nprt_plugin/gecko/1.8/win/include/prtime.h new file mode 100644 index 00000000..35ff507e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prtime.h @@ -0,0 +1,298 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* + *---------------------------------------------------------------------- + * + * prtime.h -- + * + * NSPR date and time functions + * + *----------------------------------------------------------------------- + */ + +#ifndef prtime_h___ +#define prtime_h___ + +#include "prlong.h" + +PR_BEGIN_EXTERN_C + +/**********************************************************************/ +/************************* TYPES AND CONSTANTS ************************/ +/**********************************************************************/ + +#define PR_MSEC_PER_SEC 1000UL +#define PR_USEC_PER_SEC 1000000UL +#define PR_NSEC_PER_SEC 1000000000UL +#define PR_USEC_PER_MSEC 1000UL +#define PR_NSEC_PER_MSEC 1000000UL + +/* + * PRTime -- + * + * NSPR represents basic time as 64-bit signed integers relative + * to midnight (00:00:00), January 1, 1970 Greenwich Mean Time (GMT). + * (GMT is also known as Coordinated Universal Time, UTC.) + * The units of time are in microseconds. Negative times are allowed + * to represent times prior to the January 1970 epoch. Such values are + * intended to be exported to other systems or converted to human + * readable form. + * + * Notes on porting: PRTime corresponds to time_t in ANSI C. NSPR 1.0 + * simply uses PRInt64. + */ + +typedef PRInt64 PRTime; + +/* + * Time zone and daylight saving time corrections applied to GMT to + * obtain the local time of some geographic location + */ + +typedef struct PRTimeParameters { + PRInt32 tp_gmt_offset; /* the offset from GMT in seconds */ + PRInt32 tp_dst_offset; /* contribution of DST in seconds */ +} PRTimeParameters; + +/* + * PRExplodedTime -- + * + * Time broken down into human-readable components such as year, month, + * day, hour, minute, second, and microsecond. Time zone and daylight + * saving time corrections may be applied. If they are applied, the + * offsets from the GMT must be saved in the 'tm_params' field so that + * all the information is available to reconstruct GMT. + * + * Notes on porting: PRExplodedTime corrresponds to struct tm in + * ANSI C, with the following differences: + * - an additional field tm_usec; + * - replacing tm_isdst by tm_params; + * - the month field is spelled tm_month, not tm_mon; + * - we use absolute year, AD, not the year since 1900. + * The corresponding type in NSPR 1.0 is called PRTime. Below is + * a table of date/time type correspondence in the three APIs: + * API time since epoch time in components + * ANSI C time_t struct tm + * NSPR 1.0 PRInt64 PRTime + * NSPR 2.0 PRTime PRExplodedTime + */ + +typedef struct PRExplodedTime { + PRInt32 tm_usec; /* microseconds past tm_sec (0-99999) */ + PRInt32 tm_sec; /* seconds past tm_min (0-61, accomodating + up to two leap seconds) */ + PRInt32 tm_min; /* minutes past tm_hour (0-59) */ + PRInt32 tm_hour; /* hours past tm_day (0-23) */ + PRInt32 tm_mday; /* days past tm_mon (1-31, note that it + starts from 1) */ + PRInt32 tm_month; /* months past tm_year (0-11, Jan = 0) */ + PRInt16 tm_year; /* absolute year, AD (note that we do not + count from 1900) */ + + PRInt8 tm_wday; /* calculated day of the week + (0-6, Sun = 0) */ + PRInt16 tm_yday; /* calculated day of the year + (0-365, Jan 1 = 0) */ + + PRTimeParameters tm_params; /* time parameters used by conversion */ +} PRExplodedTime; + +/* + * PRTimeParamFn -- + * + * A function of PRTimeParamFn type returns the time zone and + * daylight saving time corrections for some geographic location, + * given the current time in GMT. The input argument gmt should + * point to a PRExplodedTime that is in GMT, i.e., whose + * tm_params contains all 0's. + * + * For any time zone other than GMT, the computation is intended to + * consist of two steps: + * - Figure out the time zone correction, tp_gmt_offset. This number + * usually depends on the geographic location only. But it may + * also depend on the current time. For example, all of China + * is one time zone right now. But this situation may change + * in the future. + * - Figure out the daylight saving time correction, tp_dst_offset. + * This number depends on both the geographic location and the + * current time. Most of the DST rules are expressed in local + * current time. If so, one should apply the time zone correction + * to GMT before applying the DST rules. + */ + +typedef PRTimeParameters (PR_CALLBACK *PRTimeParamFn)(const PRExplodedTime *gmt); + +/**********************************************************************/ +/****************************** FUNCTIONS *****************************/ +/**********************************************************************/ + +/* + * The PR_Now routine returns the current time relative to the + * epoch, midnight, January 1, 1970 UTC. The units of the returned + * value are microseconds since the epoch. + * + * The values returned are not guaranteed to advance in a linear fashion + * due to the application of time correction protocols which synchronize + * computer clocks to some external time source. Consequently it should + * not be depended on for interval timing. + * + * The implementation is machine dependent. + * Cf. time_t time(time_t *tp) in ANSI C. + */ +#if defined(HAVE_WATCOM_BUG_2) +PRTime __pascal __export __loadds +#else +NSPR_API(PRTime) +#endif +PR_Now(void); + +/* + * Expand time binding it to time parameters provided by PRTimeParamFn. + * The calculation is envisoned to proceed in the following steps: + * - From given PRTime, calculate PRExplodedTime in GMT + * - Apply the given PRTimeParamFn to the GMT that we just calculated + * to obtain PRTimeParameters. + * - Add the PRTimeParameters offsets to GMT to get the local time + * as PRExplodedTime. + */ + +NSPR_API(void) PR_ExplodeTime( + PRTime usecs, PRTimeParamFn params, PRExplodedTime *exploded); + +/* Reverse operation of PR_ExplodeTime */ +#if defined(HAVE_WATCOM_BUG_2) +PRTime __pascal __export __loadds +#else +NSPR_API(PRTime) +#endif +PR_ImplodeTime(const PRExplodedTime *exploded); + +/* + * Adjust exploded time to normalize field overflows after manipulation. + * Note that the following fields of PRExplodedTime should not be + * manipulated: + * - tm_month and tm_year: because the number of days in a month and + * number of days in a year are not constant, it is ambiguous to + * manipulate the month and year fields, although one may be tempted + * to. For example, what does "a month from January 31st" mean? + * - tm_wday and tm_yday: these fields are calculated by NSPR. Users + * should treat them as "read-only". + */ + +NSPR_API(void) PR_NormalizeTime( + PRExplodedTime *exploded, PRTimeParamFn params); + +/**********************************************************************/ +/*********************** TIME PARAMETER FUNCTIONS *********************/ +/**********************************************************************/ + +/* Time parameters that suit current host machine */ +NSPR_API(PRTimeParameters) PR_LocalTimeParameters(const PRExplodedTime *gmt); + +/* Time parameters that represent Greenwich Mean Time */ +NSPR_API(PRTimeParameters) PR_GMTParameters(const PRExplodedTime *gmt); + +/* + * Time parameters that represent the US Pacific Time Zone, with the + * current daylight saving time rules (for testing only) + */ +NSPR_API(PRTimeParameters) PR_USPacificTimeParameters(const PRExplodedTime *gmt); + +/* + * This parses a time/date string into a PRTime + * (microseconds after "1-Jan-1970 00:00:00 GMT"). + * It returns PR_SUCCESS on success, and PR_FAILURE + * if the time/date string can't be parsed. + * + * Many formats are handled, including: + * + * 14 Apr 89 03:20:12 + * 14 Apr 89 03:20 GMT + * Fri, 17 Mar 89 4:01:33 + * Fri, 17 Mar 89 4:01 GMT + * Mon Jan 16 16:12 PDT 1989 + * Mon Jan 16 16:12 +0130 1989 + * 6 May 1992 16:41-JST (Wednesday) + * 22-AUG-1993 10:59:12.82 + * 22-AUG-1993 10:59pm + * 22-AUG-1993 12:59am + * 22-AUG-1993 12:59 PM + * Friday, August 04, 1995 3:54 PM + * 06/21/95 04:24:34 PM + * 20/06/95 21:07 + * 95-06-08 19:32:48 EDT + * + * If the input string doesn't contain a description of the timezone, + * we consult the `default_to_gmt' to decide whether the string should + * be interpreted relative to the local time zone (PR_FALSE) or GMT (PR_TRUE). + * The correct value for this argument depends on what standard specified + * the time string which you are parsing. + */ + +NSPR_API(PRStatus) PR_ParseTimeString ( + const char *string, + PRBool default_to_gmt, + PRTime *result); + +/* + * FIXME: should we also have a formatting function, such as asctime, ctime, + * and strftime in standard C library? But this would involve + * internationalization issues. Might want to provide a US English version. + */ + +/**********************************************************************/ +/*********************** OLD COMPATIBILITYFUNCTIONS *******************/ +/**********************************************************************/ +#ifndef NO_NSPR_10_SUPPORT + +/* Format a time value into a buffer. Same semantics as strftime() */ +NSPR_API(PRUint32) PR_FormatTime(char *buf, int buflen, const char *fmt, + const PRExplodedTime *tm); + +/* Format a time value into a buffer. Time is always in US English format, regardless + * of locale setting. + */ +NSPR_API(PRUint32) +PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize, + const char* format, const PRExplodedTime* tm ); + +#endif /* NO_NSPR_10_SUPPORT */ + +PR_END_EXTERN_C + +#endif /* prtime_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prtpool.h b/Src/nprt_plugin/gecko/1.8/win/include/prtpool.h new file mode 100644 index 00000000..2e1f6ddb --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prtpool.h @@ -0,0 +1,115 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1999-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prtpool_h___ +#define prtpool_h___ + +#include "prtypes.h" +#include "prthread.h" +#include "prio.h" +#include "prerror.h" + +/* + * NOTE: + * THIS API IS A PRELIMINARY VERSION IN NSPR 4.0 AND IS SUBJECT TO + * CHANGE + */ + +PR_BEGIN_EXTERN_C + +typedef struct PRJobIoDesc { + PRFileDesc *socket; + PRErrorCode error; + PRIntervalTime timeout; +} PRJobIoDesc; + +typedef struct PRThreadPool PRThreadPool; +typedef struct PRJob PRJob; +typedef void (PR_CALLBACK *PRJobFn) (void *arg); + +/* Create thread pool */ +NSPR_API(PRThreadPool *) +PR_CreateThreadPool(PRInt32 initial_threads, PRInt32 max_threads, + PRUint32 stacksize); + +/* queue a job */ +NSPR_API(PRJob *) +PR_QueueJob(PRThreadPool *tpool, PRJobFn fn, void *arg, PRBool joinable); + +/* queue a job, when a socket is readable */ +NSPR_API(PRJob *) +PR_QueueJob_Read(PRThreadPool *tpool, PRJobIoDesc *iod, + PRJobFn fn, void * arg, PRBool joinable); + +/* queue a job, when a socket is writeable */ +NSPR_API(PRJob *) +PR_QueueJob_Write(PRThreadPool *tpool, PRJobIoDesc *iod, + PRJobFn fn, void * arg, PRBool joinable); + +/* queue a job, when a socket has a pending connection */ +NSPR_API(PRJob *) +PR_QueueJob_Accept(PRThreadPool *tpool, PRJobIoDesc *iod, + PRJobFn fn, void * arg, PRBool joinable); + +/* queue a job, when the socket connection to addr succeeds or fails */ +NSPR_API(PRJob *) +PR_QueueJob_Connect(PRThreadPool *tpool, PRJobIoDesc *iod, + const PRNetAddr *addr, PRJobFn fn, void * arg, PRBool joinable); + +/* queue a job, when a timer exipres */ +NSPR_API(PRJob *) +PR_QueueJob_Timer(PRThreadPool *tpool, PRIntervalTime timeout, + PRJobFn fn, void * arg, PRBool joinable); +/* cancel a job */ +NSPR_API(PRStatus) +PR_CancelJob(PRJob *job); + +/* join a job */ +NSPR_API(PRStatus) +PR_JoinJob(PRJob *job); + +/* shutdown pool */ +NSPR_API(PRStatus) +PR_ShutdownThreadPool(PRThreadPool *tpool); + +/* join pool, wait for exit of all threads */ +NSPR_API(PRStatus) +PR_JoinThreadPool(PRThreadPool *tpool); + +PR_END_EXTERN_C + +#endif /* prtpool_h___ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prtrace.h b/Src/nprt_plugin/gecko/1.8/win/include/prtrace.h new file mode 100644 index 00000000..42f88e93 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prtrace.h @@ -0,0 +1,678 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prtrace_h___ +#define prtrace_h___ +/* +** prtrace.h -- NSPR's Trace Facility. +** +** The Trace Facility provides a means to trace application +** program events within a process. When implementing an +** application program an engineer may insert a "Trace" function +** call, passing arguments to be traced. The "Trace" function +** combines the user trace data with identifying data and +** writes this data in time ordered sequence into a circular +** in-memory buffer; when the buffer fills, it wraps. +** +** Functions are provided to set and/or re-configure the size of +** the trace buffer, control what events are recorded in the +** buffer, enable and disable tracing based on specific user +** supplied data and other control functions. Methods are provided +** to record the trace entries in the in-memory trace buffer to +** a file. +** +** Tracing may cause a performance degredation to the application +** depending on the number and placement of calls to the tracing +** facility. When tracing is compiled in and all tracing is +** disabled via the runtime controls, the overhead should be +** minimal. ... Famous last words, eh? +** +** When DEBUG is defined at compile time, the Trace Facility is +** compiled as part of NSPR and any application using NSPR's +** header files will have tracing compiled in. When DEBUG is not +** defined, the Trace Facility is not compiled into NSPR nor +** exported in its header files. If the Trace Facility is +** desired in a non-debug build, then FORCE_NSPR_TRACE may be +** defined at compile time for both the optimized build of NSPR +** and the application. NSPR and any application using NSPR's +** Trace Facility must be compiled with the same level of trace +** conditioning or unresolved references may be realized at link +** time. +** +** For any of the Trace Facility methods that requires a trace +** handle as an input argument, the caller must ensure that the +** trace handle argument is valid. An invalid trace handle +** argument may cause unpredictable results. +** +** Trace Facility methods are thread-safe and SMP safe. +** +** Users of the Trace Facility should use the defined macros to +** invoke trace methods, not the function calls directly. e.g. +** PR_TRACE( h1,0,1,2, ...); not PR_Trace(h1,0,1,2, ...); +** +** Application designers should be aware of the effects of +** debug and optimized build differences when using result of the +** Trace Facility macros in expressions. +** +** See Also: prcountr.h +** +** /lth. 08-Jun-1998. +*/ + +#include "prtypes.h" +#include "prthread.h" +#include "prtime.h" + +PR_BEGIN_EXTERN_C + +/* +** Opaque type for the trace handle +** ... Don't even think about looking in here. +** +*/ +typedef void * PRTraceHandle; + +/* +** PRTraceEntry -- A trace entry in the in-memory trace buffer +** looks like this. +** +*/ +typedef struct PRTraceEntry +{ + PRThread *thread; /* The thread creating the trace entry */ + PRTraceHandle handle; /* PRTraceHandle creating the trace entry */ + PRTime time; /* Value of PR_Now() at time of trace entry */ + PRUint32 userData[8]; /* user supplied trace data */ +} PRTraceEntry; + +/* +** PRTraceOption -- command operands to +** PR_[Set|Get]TraceOption(). See descriptive meanings there. +** +*/ +typedef enum PRTraceOption +{ + PRTraceBufSize, + PRTraceEnable, + PRTraceDisable, + PRTraceSuspend, + PRTraceResume, + PRTraceSuspendRecording, + PRTraceResumeRecording, + PRTraceLockHandles, + PRTraceUnLockHandles, + PRTraceStopRecording +} PRTraceOption; + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_DEFINE_TRACE() -- Define a PRTraceHandle +** +** DESCRIPTION: PR_DEFINE_TRACE() is used to define a trace +** handle. +** +*/ +#define PR_DEFINE_TRACE(name) PRTraceHandle name + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_INIT_TRACE_HANDLE() -- Set the value of a PRTraceHandle +** +** DESCRIPTION: +** PR_INIT_TRACE_HANDLE() sets the value of a PRTraceHandle +** to value. e.g. PR_INIT_TRACE_HANDLE( myHandle, NULL ); +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_INIT_TRACE_HANDLE(handle,value)\ + (handle) = (PRCounterHandle)(value) +#else +#define PR_INIT_TRACE_HANDLE(handle,value) +#endif + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_CreateTrace() -- Create a trace handle +** +** DESCRIPTION: +** PR_CreateTrace() creates a new trace handle. Tracing is +** enabled for this handle when it is created. The trace handle +** is intended for use in other Trace Facility calls. +** +** PR_CreateTrace() registers the QName, RName and description +** data so that this data can be retrieved later. +** +** INPUTS: +** qName: pointer to string. QName for this trace handle. +** +** rName: pointer to string. RName for this trace handle. +** +** description: pointer to string. Descriptive data about this +** trace handle. +** +** OUTPUTS: +** Creates the trace handle. +** Registers the QName and RName with the trace facility. +** +** RETURNS: +** PRTraceHandle +** +** RESTRICTIONS: +** qName is limited to 31 characters. +** rName is limited to 31 characters. +** description is limited to 255 characters. +** +*/ +#define PRTRACE_NAME_MAX 31 +#define PRTRACE_DESC_MAX 255 + +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_CREATE_TRACE(handle,qName,rName,description)\ + (handle) = PR_CreateTrace((qName),(rName),(description)) +#else +#define PR_CREATE_TRACE(handle,qName,rName,description) +#endif + +NSPR_API(PRTraceHandle) + PR_CreateTrace( + const char *qName, /* QName for this trace handle */ + const char *rName, /* RName for this trace handle */ + const char *description /* description for this trace handle */ +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_DestroyTrace() -- Destroy a trace handle +** +** DESCRIPTION: +** PR_DestroyTrace() removes the referenced trace handle and +** associated QName, RName and description data from the Trace +** Facility. +** +** INPUTS: handle. A PRTraceHandle +** +** OUTPUTS: +** The trace handle is unregistered. +** The QName, RName and description are removed. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_DESTROY_TRACE(handle)\ + PR_DestroyTrace((handle)) +#else +#define PR_DESTROY_TRACE(handle) +#endif + +NSPR_API(void) + PR_DestroyTrace( + PRTraceHandle handle /* Handle to be destroyed */ +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_Trace() -- Make a trace entry in the in-memory trace +** +** DESCRIPTION: +** PR_Trace() makes an entry in the in-memory trace buffer for +** the referenced trace handle. The next logically available +** PRTraceEntry is used; when the next trace entry would overflow +** the trace table, the table wraps. +** +** PR_Trace() for a specific trace handle may be disabled by +** calling PR_SetTraceOption() specifying PRTraceDisable for the +** trace handle to be disabled. +** +** INPUTS: +** handle: PRTraceHandle. The trace handle for this trace. +** +** userData[0..7]: unsigned 32bit integers. user supplied data +** that is copied into the PRTraceEntry +** +** OUTPUTS: +** A PRTraceEntry is (conditionally) formatted in the in-memory +** trace buffer. +** +** RETURNS: void. +** +** RESTRICTIONS: +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_TRACE(handle,ud0,ud1,ud2,ud3,ud4,ud5,ud6,ud7)\ + PR_Trace((handle),(ud0),(ud1),(ud2),(ud3),(ud4),(ud5),(ud6),(ud7)) +#else +#define PR_TRACE(handle,ud0,ud1,ud2,ud3,ud4,ud5,ud6,ud7) +#endif + +NSPR_API(void) + PR_Trace( + PRTraceHandle handle, /* use this trace handle */ + PRUint32 userData0, /* User supplied data word 0 */ + PRUint32 userData1, /* User supplied data word 1 */ + PRUint32 userData2, /* User supplied data word 2 */ + PRUint32 userData3, /* User supplied data word 3 */ + PRUint32 userData4, /* User supplied data word 4 */ + PRUint32 userData5, /* User supplied data word 5 */ + PRUint32 userData6, /* User supplied data word 6 */ + PRUint32 userData7 /* User supplied data word 7 */ +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_SetTraceOption() -- Control the Trace Facility +** +** DESCRIPTION: +** PR_SetTraceOption() controls the Trace Facility. Depending on +** command and value, attributes of the Trace Facility may be +** changed. +** +** INPUTS: +** command: An enumerated value in the set of PRTraceOption. +** value: pointer to the data to be set. Type of the data is +** dependent on command; for each value of command, the type +** and meaning of dereferenced value is shown. +** +** PRTraceBufSize: unsigned long: the size of the trace buffer, +** in bytes. +** +** PRTraceEnable: PRTraceHandle. The trace handle to be +** enabled. +** +** PRTraceDisable: PRTraceHandle. The trace handle to be +** disabled. +** +** PRTraceSuspend: void. value must be NULL. All tracing is +** suspended. +** +** PRTraceResume: void. value must be NULL. Tracing for all +** previously enabled, prior to a PRTraceSuspend, is resumed. +** +** PRTraceStopRecording: void. value must be NULL. If recording +** (see: ** PR_RecordTraceEntries()) is being done, +** PRTraceStopRecording causes PR_RecordTraceEntries() to return +** to its caller. If recording is not being done, this function +** has no effect. +** +** PRTraceSuspendRecording: void. Must be NULL. If recording is +** being done, PRTraceSuspendRecording causes further writes to +** the trace file to be suspended. Data in the in-memory +** trace buffer that would ordinarily be written to the +** trace file will not be written. Trace entries will continue +** to be entered in the in-memory buffer. If the Trace Facility +** recording is already in a suspended state, the call has no +** effect. +** +** PRTraceResumeRecording: void. value must be NULL. If +** recording for the Trace Facility has been previously been +** suspended, this causes recording to resume. Recording resumes +** with the next in-memory buffer segment that would be written +** if trace recording had not been suspended. If recording is +** not currently suspended, the call has no effect. +** +** PRTraceLockHandles: void. value must be NULL. Locks the +** trace handle lock. While the trace handle lock is held, +** calls to PR_CreateTrace() will block until the lock is +** released. +** +** PRTraceUnlockHandles: void. value must be NULL. Unlocks the +** trace handle lock. +** +** OUTPUTS: +** The operation of the Trace Facility may be changed. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_SET_TRACE_OPTION(command,value)\ + PR_SetTraceOption((command),(value)) +#else +#define PR_SET_TRACE_OPTION(command,value) +#endif + +NSPR_API(void) + PR_SetTraceOption( + PRTraceOption command, /* One of the enumerated values */ + void *value /* command value or NULL */ +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_GetTraceOption() -- Retrieve settings from the Trace Facility +** +** DESCRIPTION: +** PR_GetTraceOption() retrieves the current setting of the +** Trace Facility control depending on command. +** +** +** PRTraceBufSize: unsigned long: the size of the trace buffer, +** in bytes. +** +** +** INPUTS: +** command: one of the enumerated values in PRTraceOptions +** valid for PR_GetTraceOption(). +** +** OUTPUTS: +** dependent on command. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_GET_TRACE_OPTION(command,value)\ + PR_GetTraceOption((command),(value)) +#else +#define PR_GET_TRACE_OPTION(command,value) +#endif + +NSPR_API(void) + PR_GetTraceOption( + PRTraceOption command, /* One of the enumerated values */ + void *value /* command value or NULL */ +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_GetTraceHandleFromName() -- Retrieve an existing +** handle by name. +** +** DESCRIPTION: +** PR_GetTraceHandleFromName() retreives an existing tracehandle +** using the name specified by qName and rName. +** +** INPUTS: +** qName: pointer to string. QName for this trace handle. +** +** rName: pointer to string. RName for this trace handle. +** +** +** OUTPUTS: returned. +** +** RETURNS: +** PRTraceHandle associated with qName and rName or NULL when +** there is no match. +** +** RESTRICTIONS: +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_GET_TRACE_HANDLE_FROM_NAME(handle,qName,rName)\ + (handle) = PR_GetTraceHandleFromName((qName),(rName)) +#else +#define PR_GET_TRACE_HANDLE_FROM_NAME(handle,qName,rName) +#endif + +NSPR_API(PRTraceHandle) + PR_GetTraceHandleFromName( + const char *qName, /* QName search argument */ + const char *rName /* RName search argument */ +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_GetTraceNameFromHandle() -- Retreive trace name +** by bandle. +** +** DESCRIPTION: +** PR_GetTraceNameFromHandle() retreives the existing qName, +** rName, and description for the referenced trace handle. +** +** INPUTS: handle: PRTraceHandle. +** +** OUTPUTS: pointers to the Trace Facility's copy of qName, +** rName and description. ... Don't mess with these values. +** They're mine. +** +** RETURNS: void +** +** RESTRICTIONS: +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_GET_TRACE_NAME_FROM_HANDLE(handle,qName,rName,description)\ + PR_GetTraceNameFromHandle((handle),(qName),(rName),(description)) +#else +#define PR_GET_TRACE_NAME_FROM_HANDLE(handle,qName,rName,description) +#endif + +NSPR_API(void) + PR_GetTraceNameFromHandle( + PRTraceHandle handle, /* handle as search argument */ + const char **qName, /* pointer to associated QName */ + const char **rName, /* pointer to associated RName */ + const char **description /* pointer to associated description */ +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_FindNextTraceQname() -- Retrieive a QName handle +** iterator. +** +** DESCRIPTION: +** PR_FindNextTraceQname() retreives the first or next trace +** QName handle, depending on the value of handle, from the trace +** database. The PRTraceHandle returned can be used as an +** iterator to traverse the QName handles in the Trace database. +** +** INPUTS: +** handle: When NULL, PR_FindNextQname() returns the first QName +** handle. When a handle is a valid PRTraceHandle previously +** retreived using PR_FindNextQname() the next QName handle is +** retreived. +** +** OUTPUTS: returned. +** +** RETURNS: +** PRTraceHandle or NULL when there are no trace handles. +** +** RESTRICTIONS: +** Iterating thru the trace handles via FindFirst/FindNext +** should be done under protection of the trace handle lock. +** See: PR_SetTraceOption( PRLockTraceHandles ). +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_FIND_NEXT_TRACE_QNAME(next,handle)\ + (next) = PR_FindNextTraceQname((handle)) +#else +#define PR_FIND_NEXT_TRACE_QNAME(next,handle) +#endif + +NSPR_API(PRTraceHandle) + PR_FindNextTraceQname( + PRTraceHandle handle +); + + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_FindNextTraceRname() -- Retrieive an RName handle +** iterator. +** +** DESCRIPTION: +** PR_FindNextTraceRname() retreives the first or next trace +** RName handle, depending on the value of handle, from the trace +** database. The PRTraceHandle returned can be used as an +** iterator to traverse the RName handles in the Trace database. +** +** INPUTS: +** rhandle: When NULL, PR_FindNextRname() returns the first +** RName handle. When a handle is a valid PRTraceHandle +** previously retreived using PR_FindNextRname() the next RName +** handle is retreived. +** qhandle: A valid PRTraceHandle retruned from a previous call +** to PR_FIND_NEXT_TRACE_QNAME(). +** +** OUTPUTS: returned. +** +** RETURNS: +** PRTraceHandle or NULL when there are no trace handles. +** +** RESTRICTIONS: +** Iterating thru the trace handles via FindNext should be done +** under protection of the trace handle lock. See: ( +** PR_SetTraceOption( PRLockTraceHandles ). +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_FIND_NEXT_TRACE_RNAME(next,rhandle,qhandle)\ + (next) = PR_FindNextTraceRname((rhandle),(qhandle)) +#else +#define PR_FIND_NEXT_TRACE_RNAME(next,rhandle,qhandle) +#endif + +NSPR_API(PRTraceHandle) + PR_FindNextTraceRname( + PRTraceHandle rhandle, + PRTraceHandle qhandle +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_RecordTraceEntries() -- Write trace entries to external media +** +** DESCRIPTION: +** PR_RecordTraceEntries() causes entries in the in-memory trace +** buffer to be written to external media. +** +** When PR_RecordTraceEntries() is called from an application +** thread, the function appears to block until another thread +** calls PR_SetTraceOption() with the PRTraceStopRecording +** option. This suggests that PR_RecordTraceEntries() should be +** called from a user supplied thread whose only job is to +** record trace entries. +** +** The environment variable NSPR_TRACE_LOG controls the operation +** of this function. When NSPR_TRACE_LOG is not defined in the +** environment, no recording of trace entries occurs. When +** NSPR_TRACE_LOG is defined, the value of its definition must be +** the filename of the file to receive the trace entry buffer. +** +** PR_RecordTraceEntries() attempts to record the in-memory +** buffer to a file, subject to the setting of the environment +** variable NSPR_TRACE_LOG. It is possible because of system +** load, the thread priority of the recording thread, number of +** active trace records being written over time, and other +** variables that some trace records can be lost. ... In other +** words: don't bet the farm on getting everything. +** +** INPUTS: none +** +** OUTPUTS: none +** +** RETURNS: PR_STATUS +** PR_SUCCESS no errors were found. +** PR_FAILURE errors were found. +** +** RESTRICTIONS: +** Only one thread can call PR_RecordTraceEntries() within a +** process. +** +** On error, PR_RecordTraceEntries() may return prematurely. +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_RECORD_TRACE_ENTRIES()\ + PR_RecordTraceEntries() +#else +#define PR_RECORD_TRACE_ENTRIES() +#endif + +NSPR_API(void) + PR_RecordTraceEntries( + void +); + +/* ----------------------------------------------------------------------- +** FUNCTION: PR_GetTraceEntries() -- Retreive trace entries from +** the Trace Facility +** +** DESCRIPTION: +** PR_GetTraceEntries() retreives trace entries from the Trace +** Facility. Up to count trace entries are copied from the Trace +** Facility into buffer. Only those trace entries that have not +** been copied via a previous call to PR_GetTraceEntries() are +** copied. The actual number copied is placed in the PRInt32 +** variable pointed to by found. +** +** If more than count trace entries have entered the Trace +** Facility since the last call to PR_GetTraceEntries() +** a lost data condition is returned. In this case, the most +** recent count trace entries are copied into buffer and found is +** set to count. +** +** INPUTS: +** count. The number of trace entries to be copied into buffer. +** +** +** OUTPUTS: +** buffer. An array of PRTraceEntries. The buffer is supplied +** by the caller. +** +** found: 32bit signed integer. The number of PRTraceEntries +** actually copied. found is always less than or equal to count. +** +** RETURNS: +** zero when there is no lost data. +** non-zero when some PRTraceEntries have been lost. +** +** RESTRICTIONS: +** This is a real performance pig. The copy out operation is bad +** enough, but depending on then frequency of calls to the +** function, serious performance impact to the operating +** application may be realized. ... YMMV. +** +*/ +#if defined (DEBUG) || defined (FORCE_NSPR_TRACE) +#define PR_GET_TRACE_ENTRIES(buffer,count,found)\ + PR_GetTraceEntries((buffer),(count),(found)) +#else +#define PR_GET_TRACE_ENTRIES(buffer,count,found) +#endif + +NSPR_API(PRIntn) + PR_GetTraceEntries( + PRTraceEntry *buffer, /* where to write output */ + PRInt32 count, /* number to get */ + PRInt32 *found /* number you got */ +); + +PR_END_EXTERN_C + +#endif /* prtrace_h___ */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prtypes.h b/Src/nprt_plugin/gecko/1.8/win/include/prtypes.h new file mode 100644 index 00000000..3eb15548 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prtypes.h @@ -0,0 +1,547 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +/* +** File: prtypes.h +** Description: Definitions of NSPR's basic types +** +** Prototypes and macros used to make up for deficiencies that we have found +** in ANSI environments. +** +** Since we do not wrap <stdlib.h> and all the other standard headers, authors +** of portable code will not know in general that they need these definitions. +** Instead of requiring these authors to find the dependent uses in their code +** and take the following steps only in those C files, we take steps once here +** for all C files. +**/ + +#ifndef prtypes_h___ +#define prtypes_h___ + +#ifdef MDCPUCFG +#include MDCPUCFG +#else +#include "prcpucfg.h" +#endif + +#include <stddef.h> + +/*********************************************************************** +** MACROS: PR_EXTERN +** PR_IMPLEMENT +** DESCRIPTION: +** These are only for externally visible routines and globals. For +** internal routines, just use "extern" for type checking and that +** will not export internal cross-file or forward-declared symbols. +** Define a macro for declaring procedures return types. We use this to +** deal with windoze specific type hackery for DLL definitions. Use +** PR_EXTERN when the prototype for the method is declared. Use +** PR_IMPLEMENT for the implementation of the method. +** +** Example: +** in dowhim.h +** PR_EXTERN( void ) DoWhatIMean( void ); +** in dowhim.c +** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; } +** +** +***********************************************************************/ +#if defined(WIN32) + +#define PR_EXPORT(__type) extern __declspec(dllexport) __type +#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type +#define PR_IMPORT(__type) __declspec(dllimport) __type +#define PR_IMPORT_DATA(__type) __declspec(dllimport) __type + +#define PR_EXTERN(__type) extern __declspec(dllexport) __type +#define PR_IMPLEMENT(__type) __declspec(dllexport) __type +#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type +#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type + +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + +#elif defined(XP_BEOS) + +#define PR_EXPORT(__type) extern __declspec(dllexport) __type +#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type +#define PR_IMPORT(__type) extern __declspec(dllexport) __type +#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type + +#define PR_EXTERN(__type) extern __declspec(dllexport) __type +#define PR_IMPLEMENT(__type) __declspec(dllexport) __type +#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type +#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type + +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + +#elif defined(WIN16) + +#define PR_CALLBACK_DECL __cdecl + +#if defined(_WINDLL) +#define PR_EXPORT(__type) extern __type _cdecl _export _loadds +#define PR_IMPORT(__type) extern __type _cdecl _export _loadds +#define PR_EXPORT_DATA(__type) extern __type _export +#define PR_IMPORT_DATA(__type) extern __type _export + +#define PR_EXTERN(__type) extern __type _cdecl _export _loadds +#define PR_IMPLEMENT(__type) __type _cdecl _export _loadds +#define PR_EXTERN_DATA(__type) extern __type _export +#define PR_IMPLEMENT_DATA(__type) __type _export + +#define PR_CALLBACK __cdecl __loadds +#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK + +#else /* this must be .EXE */ +#define PR_EXPORT(__type) extern __type _cdecl _export +#define PR_IMPORT(__type) extern __type _cdecl _export +#define PR_EXPORT_DATA(__type) extern __type _export +#define PR_IMPORT_DATA(__type) extern __type _export + +#define PR_EXTERN(__type) extern __type _cdecl _export +#define PR_IMPLEMENT(__type) __type _cdecl _export +#define PR_EXTERN_DATA(__type) extern __type _export +#define PR_IMPLEMENT_DATA(__type) __type _export + +#define PR_CALLBACK __cdecl __loadds +#define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK +#endif /* _WINDLL */ + +#elif defined(XP_MAC) + +#define PR_EXPORT(__type) extern __declspec(export) __type +#define PR_EXPORT_DATA(__type) extern __declspec(export) __type +#define PR_IMPORT(__type) extern __declspec(export) __type +#define PR_IMPORT_DATA(__type) extern __declspec(export) __type + +#define PR_EXTERN(__type) extern __declspec(export) __type +#define PR_IMPLEMENT(__type) __declspec(export) __type +#define PR_EXTERN_DATA(__type) extern __declspec(export) __type +#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type + +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + +#elif defined(XP_OS2_VACPP) + +#define PR_EXPORT(__type) extern __type +#define PR_EXPORT_DATA(__type) extern __type +#define PR_IMPORT(__type) extern __type +#define PR_IMPORT_DATA(__type) extern __type + +#define PR_EXTERN(__type) extern __type +#define PR_IMPLEMENT(__type) __type +#define PR_EXTERN_DATA(__type) extern __type +#define PR_IMPLEMENT_DATA(__type) __type +#define PR_CALLBACK _Optlink +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK + +#else /* Unix */ + +#ifdef HAVE_VISIBILITY_PRAGMA +#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) +#else +#define PR_VISIBILITY_DEFAULT +#endif + +#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type + +#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type +#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + +#endif + +#if defined(_NSPR_BUILD_) +#define NSPR_API(__type) PR_EXPORT(__type) +#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type) +#else +#define NSPR_API(__type) PR_IMPORT(__type) +#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) +#endif + +/*********************************************************************** +** MACROS: PR_BEGIN_MACRO +** PR_END_MACRO +** DESCRIPTION: +** Macro body brackets so that macros with compound statement definitions +** behave syntactically more like functions when called. +***********************************************************************/ +#define PR_BEGIN_MACRO do { +#define PR_END_MACRO } while (0) + +/*********************************************************************** +** MACROS: PR_BEGIN_EXTERN_C +** PR_END_EXTERN_C +** DESCRIPTION: +** Macro shorthands for conditional C++ extern block delimiters. +***********************************************************************/ +#ifdef __cplusplus +#define PR_BEGIN_EXTERN_C extern "C" { +#define PR_END_EXTERN_C } +#else +#define PR_BEGIN_EXTERN_C +#define PR_END_EXTERN_C +#endif + +/*********************************************************************** +** MACROS: PR_BIT +** PR_BITMASK +** DESCRIPTION: +** Bit masking macros. XXX n must be <= 31 to be portable +***********************************************************************/ +#define PR_BIT(n) ((PRUint32)1 << (n)) +#define PR_BITMASK(n) (PR_BIT(n) - 1) + +/*********************************************************************** +** MACROS: PR_ROUNDUP +** PR_MIN +** PR_MAX +** PR_ABS +** DESCRIPTION: +** Commonly used macros for operations on compatible types. +***********************************************************************/ +#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) +#define PR_MIN(x,y) ((x)<(y)?(x):(y)) +#define PR_MAX(x,y) ((x)>(y)?(x):(y)) +#define PR_ABS(x) ((x)<0?-(x):(x)) + +PR_BEGIN_EXTERN_C + +/************************************************************************ +** TYPES: PRUint8 +** PRInt8 +** DESCRIPTION: +** The int8 types are known to be 8 bits each. There is no type that +** is equivalent to a plain "char". +************************************************************************/ +#if PR_BYTES_PER_BYTE == 1 +typedef unsigned char PRUint8; +/* +** Some cfront-based C++ compilers do not like 'signed char' and +** issue the warning message: +** warning: "signed" not implemented (ignored) +** For these compilers, we have to define PRInt8 as plain 'char'. +** Make sure that plain 'char' is indeed signed under these compilers. +*/ +#if (defined(HPUX) && defined(__cplusplus) \ + && !defined(__GNUC__) && __cplusplus < 199707L) \ + || (defined(SCO) && defined(__cplusplus) \ + && !defined(__GNUC__) && __cplusplus == 1L) +typedef char PRInt8; +#else +typedef signed char PRInt8; +#endif +#else +#error No suitable type for PRInt8/PRUint8 +#endif + +/************************************************************************ + * MACROS: PR_INT8_MAX + * PR_INT8_MIN + * PR_UINT8_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt8 or PRUint8. +************************************************************************/ + +#define PR_INT8_MAX 127 +#define PR_INT8_MIN (-128) +#define PR_UINT8_MAX 255U + +/************************************************************************ +** TYPES: PRUint16 +** PRInt16 +** DESCRIPTION: +** The int16 types are known to be 16 bits each. +************************************************************************/ +#if PR_BYTES_PER_SHORT == 2 +typedef unsigned short PRUint16; +typedef short PRInt16; +#else +#error No suitable type for PRInt16/PRUint16 +#endif + +/************************************************************************ + * MACROS: PR_INT16_MAX + * PR_INT16_MIN + * PR_UINT16_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt16 or PRUint16. +************************************************************************/ + +#define PR_INT16_MAX 32767 +#define PR_INT16_MIN (-32768) +#define PR_UINT16_MAX 65535U + +/************************************************************************ +** TYPES: PRUint32 +** PRInt32 +** DESCRIPTION: +** The int32 types are known to be 32 bits each. +************************************************************************/ +#if PR_BYTES_PER_INT == 4 +typedef unsigned int PRUint32; +typedef int PRInt32; +#define PR_INT32(x) x +#define PR_UINT32(x) x ## U +#elif PR_BYTES_PER_LONG == 4 +typedef unsigned long PRUint32; +typedef long PRInt32; +#define PR_INT32(x) x ## L +#define PR_UINT32(x) x ## UL +#else +#error No suitable type for PRInt32/PRUint32 +#endif + +/************************************************************************ + * MACROS: PR_INT32_MAX + * PR_INT32_MIN + * PR_UINT32_MAX + * DESCRIPTION: + * The maximum and minimum values of a PRInt32 or PRUint32. +************************************************************************/ + +#define PR_INT32_MAX PR_INT32(2147483647) +#define PR_INT32_MIN (-PR_INT32_MAX - 1) +#define PR_UINT32_MAX PR_UINT32(4294967295) + +/************************************************************************ +** TYPES: PRUint64 +** PRInt64 +** DESCRIPTION: +** The int64 types are known to be 64 bits each. Care must be used when +** declaring variables of type PRUint64 or PRInt64. Different hardware +** architectures and even different compilers have varying support for +** 64 bit values. The only guaranteed portability requires the use of +** the LL_ macros (see prlong.h). +************************************************************************/ +#ifdef HAVE_LONG_LONG +#if PR_BYTES_PER_LONG == 8 +typedef long PRInt64; +typedef unsigned long PRUint64; +#elif defined(WIN16) +typedef __int64 PRInt64; +typedef unsigned __int64 PRUint64; +#elif defined(WIN32) && !defined(__GNUC__) +typedef __int64 PRInt64; +typedef unsigned __int64 PRUint64; +#else +typedef long long PRInt64; +typedef unsigned long long PRUint64; +#endif /* PR_BYTES_PER_LONG == 8 */ +#else /* !HAVE_LONG_LONG */ +typedef struct { +#ifdef IS_LITTLE_ENDIAN + PRUint32 lo, hi; +#else + PRUint32 hi, lo; +#endif +} PRInt64; +typedef PRInt64 PRUint64; +#endif /* !HAVE_LONG_LONG */ + +/************************************************************************ +** TYPES: PRUintn +** PRIntn +** DESCRIPTION: +** The PRIntn types are most appropriate for automatic variables. They are +** guaranteed to be at least 16 bits, though various architectures may +** define them to be wider (e.g., 32 or even 64 bits). These types are +** never valid for fields of a structure. +************************************************************************/ +#if PR_BYTES_PER_INT >= 2 +typedef int PRIntn; +typedef unsigned int PRUintn; +#else +#error 'sizeof(int)' not sufficient for platform use +#endif + +/************************************************************************ +** TYPES: PRFloat64 +** DESCRIPTION: +** NSPR's floating point type is always 64 bits. +************************************************************************/ +typedef double PRFloat64; + +/************************************************************************ +** TYPES: PRSize +** DESCRIPTION: +** A type for representing the size of objects. +************************************************************************/ +typedef size_t PRSize; + + +/************************************************************************ +** TYPES: PROffset32, PROffset64 +** DESCRIPTION: +** A type for representing byte offsets from some location. +************************************************************************/ +typedef PRInt32 PROffset32; +typedef PRInt64 PROffset64; + +/************************************************************************ +** TYPES: PRPtrDiff +** DESCRIPTION: +** A type for pointer difference. Variables of this type are suitable +** for storing a pointer or pointer subtraction. +************************************************************************/ +typedef ptrdiff_t PRPtrdiff; + +/************************************************************************ +** TYPES: PRUptrdiff +** DESCRIPTION: +** A type for pointer difference. Variables of this type are suitable +** for storing a pointer or pointer sutraction. +************************************************************************/ +typedef unsigned long PRUptrdiff; + +/************************************************************************ +** TYPES: PRBool +** DESCRIPTION: +** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE +** for clarity of target type in assignments and actual arguments. Use +** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans +** just as you would C int-valued conditions. +************************************************************************/ +typedef PRIntn PRBool; +#define PR_TRUE 1 +#define PR_FALSE 0 + +/************************************************************************ +** TYPES: PRPackedBool +** DESCRIPTION: +** Use PRPackedBool within structs where bitfields are not desirable +** but minimum and consistant overhead matters. +************************************************************************/ +typedef PRUint8 PRPackedBool; + +/* +** Status code used by some routines that have a single point of failure or +** special status return. +*/ +typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; + +#ifdef MOZ_UNICODE +/* + * EXPERIMENTAL: This type may be removed in a future release. + */ +#ifndef __PRUNICHAR__ +#define __PRUNICHAR__ +#if defined(WIN32) || defined(XP_MAC) +typedef wchar_t PRUnichar; +#else +typedef PRUint16 PRUnichar; +#endif +#endif +#endif /* MOZ_UNICODE */ + +/* +** WARNING: The undocumented data types PRWord and PRUword are +** only used in the garbage collection and arena code. Do not +** use PRWord and PRUword in new code. +** +** A PRWord is an integer that is the same size as a void*. +** It implements the notion of a "word" in the Java Virtual +** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine +** Specification, Addison-Wesley, September 1996. +** http://java.sun.com/docs/books/vmspec/index.html.) +*/ +typedef long PRWord; +typedef unsigned long PRUword; + +#if defined(NO_NSPR_10_SUPPORT) +#else +/********* ???????????????? FIX ME ??????????????????????????? *****/ +/********************** Some old definitions until pr=>ds transition is done ***/ +/********************** Also, we are still using NSPR 1.0. GC ******************/ +/* +** Fundamental NSPR macros, used nearly everywhere. +*/ + +#define PR_PUBLIC_API PR_IMPLEMENT + +/* +** Macro body brackets so that macros with compound statement definitions +** behave syntactically more like functions when called. +*/ +#define NSPR_BEGIN_MACRO do { +#define NSPR_END_MACRO } while (0) + +/* +** Macro shorthands for conditional C++ extern block delimiters. +*/ +#ifdef NSPR_BEGIN_EXTERN_C +#undef NSPR_BEGIN_EXTERN_C +#endif +#ifdef NSPR_END_EXTERN_C +#undef NSPR_END_EXTERN_C +#endif + +#ifdef __cplusplus +#define NSPR_BEGIN_EXTERN_C extern "C" { +#define NSPR_END_EXTERN_C } +#else +#define NSPR_BEGIN_EXTERN_C +#define NSPR_END_EXTERN_C +#endif + +#ifdef XP_MAC +#include "protypes.h" +#else +#include "obsolete/protypes.h" +#endif + +/********* ????????????? End Fix me ?????????????????????????????? *****/ +#endif /* NO_NSPR_10_SUPPORT */ + +PR_END_EXTERN_C + +#endif /* prtypes_h___ */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prvrsion.h b/Src/nprt_plugin/gecko/1.8/win/include/prvrsion.h new file mode 100644 index 00000000..eb8e1e61 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prvrsion.h @@ -0,0 +1,137 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + + +/* author: jstewart */ + +#if defined(_PRVERSION_H) +#else +#define _PRVERSION_H + +#include "prtypes.h" + +PR_BEGIN_EXTERN_C + +/* All components participating in the PR version protocol must expose + * a structure and a function. The structure is defined below and named + * according to the naming conventions outlined further below. The function + * is called libVersionPoint and returns a pointer to this structure. + */ + +/* on NT, always pack the structure the same. */ +#ifdef _WIN32 +#pragma pack(push, 8) +#endif + +typedef struct { + /* + * The first field defines which version of this structure is in use. + * At this time, only version 2 is specified. If this value is not + * 2, you must read no further into the structure. + */ + PRInt32 version; + + /* for Version 2, this is the body format. */ + PRInt64 buildTime; /* 64 bits - usecs since midnight, 1/1/1970 */ + char * buildTimeString;/* a human readable version of the time */ + + PRUint8 vMajor; /* Major version of this component */ + PRUint8 vMinor; /* Minor version of this component */ + PRUint8 vPatch; /* Patch level of this component */ + + PRBool beta; /* true if this is a beta component */ + PRBool debug; /* true if this is a debug component */ + PRBool special; /* true if this component is a special build */ + + char * filename; /* The original filename */ + char * description; /* description of this component */ + char * security; /* level of security in this component */ + char * copyright; /* The copyright for this file */ + char * comment; /* free form field for misc usage */ + char * specialString; /* the special variant for this build */ +} PRVersionDescription; + +/* on NT, restore the previous packing */ +#ifdef _WIN32 +#pragma pack(pop) +#endif + +/* + * All components must define an entrypoint named libVersionPoint which + * is of type versionEntryPointType. + * + * For example, for a library named libfoo, we would have: + * + * PRVersionDescription prVersionDescription_libfoo = + * { + * ... + * }; + * + * PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint(void) + * { + * return &prVersionDescription_libfoo; + * } + */ +typedef const PRVersionDescription *(*versionEntryPointType)(void); + +/* + * Where you declare your libVersionPoint, do it like this: + * PR_IMPLEMENT(const PRVersionDescription *) libVersionPoint(void) { + * fill it in... + * } + */ + +/* + * NAMING CONVENTION FOR struct + * + * all components should also expose a static PRVersionDescription + * The name of the struct should be calculated as follows: + * Take the value of filename. (If filename is not specified, calculate + * a short, unique string.) Convert all non-alphanumeric characters + * to '_'. To this, prepend "PRVersionDescription_". Thus for libfoo.so, + * the symbol name is "PRVersionDescription_libfoo_so". + * so the file should have + * PRVersionDescription PRVersionDescription_libfoo_so { fill it in }; + * on NT, this file should be declspec export. + */ + +PR_END_EXTERN_C + +#endif /* defined(_PRVERSION_H) */ + +/* prvrsion.h */ + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/prwin16.h b/Src/nprt_plugin/gecko/1.8/win/include/prwin16.h new file mode 100644 index 00000000..215b0514 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/prwin16.h @@ -0,0 +1,196 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** 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 Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 ***** */ + +#ifndef prwin16_h___ +#define prwin16_h___ + +/* +** Condition use of this header on platform. +*/ +#if (defined(XP_PC) && !defined(_WIN32) && !defined(XP_OS2) && defined(MOZILLA_CLIENT)) || defined(WIN16) +#include <stdio.h> + +PR_BEGIN_EXTERN_C +/* +** Win16 stdio special case. +** To get stdio to work for Win16, all calls to printf() and related +** things must be called from the environment of the .EXE; calls to +** printf() from the .DLL send output to the bit-bucket. +** +** To make sure that PR_fprintf(), and related functions, work correctly, +** the actual stream I/O to stdout, stderr, stdin must be done in the +** .EXE. To do this, a hack is placed in _MD_Write() such that the +** fd for stdio handles results in a call to the .EXE. +** +** file w16stdio.c contains the functions that get called from NSPR +** to do the actual I/O. w16stdio.o must be statically linked with +** any application needing stdio for Win16. +** +** The address of these functions must be made available to the .DLL +** so he can call back to the .EXE. To do this, function +** PR_MD_RegisterW16StdioCallbacks() is called from the .EXE. +** The arguments are the functions defined in w16stdio.c +** At runtime, MD_Write() calls the registered functions, if any +** were registered. +** +** prinit.h contains a macro PR_STDIO_INIT() that calls the registration +** function for Win16; For other platforms, the macro is a No-Op. +** +** Note that stdio is not operational at all on Win16 GUI applications. +** This special case exists to provide stdio capability from the NSPR +** .DLL for command line applications only. NSPR's test cases are +** almost exclusively command line applications. +** +** See also: w16io.c, w16stdio.c +*/ +typedef PRInt32 (PR_CALLBACK *PRStdinRead)( void *buf, PRInt32 amount); +typedef PRInt32 (PR_CALLBACK *PRStdoutWrite)( void *buf, PRInt32 amount); +typedef PRInt32 (PR_CALLBACK *PRStderrWrite)( void *buf, PRInt32 amount); + +NSPR_API(PRStatus) +PR_MD_RegisterW16StdioCallbacks( + PRStdinRead inReadf, /* i: function pointer for stdin read */ + PRStdoutWrite outWritef, /* i: function pointer for stdout write */ + PRStderrWrite errWritef /* i: function pointer for stderr write */ + ); + +NSPR_API(PRInt32) +_PL_W16StdioWrite( void *buf, PRInt32 amount ); + +NSPR_API(PRInt32) +_PL_W16StdioRead( void *buf, PRInt32 amount ); + +#define PR_STDIO_INIT() PR_MD_RegisterW16StdioCallbacks( \ + _PL_W16StdioRead, _PL_W16StdioWrite, _PL_W16StdioWrite ); \ + PR_INIT_CALLBACKS(); + +/* +** Win16 hackery. +** +*/ +struct PRMethodCallbackStr { + int (PR_CALLBACK *auxOutput)(const char *outputString); + size_t (PR_CALLBACK *strftime)(char *s, size_t len, const char *fmt, const struct tm *p); + void * (PR_CALLBACK *malloc)( size_t size ); + void * (PR_CALLBACK *calloc)(size_t n, size_t size ); + void * (PR_CALLBACK *realloc)( void* old_blk, size_t size ); + void (PR_CALLBACK *free)( void *ptr ); + void * (PR_CALLBACK *getenv)( const char *name); + int (PR_CALLBACK *putenv)( const char *assoc); +/* void * (PR_CALLBACK *perror)( const char *prefix ); */ +}; + +NSPR_API(void) PR_MDRegisterCallbacks(struct PRMethodCallbackStr *); + +int PR_CALLBACK _PL_W16CallBackPuts( const char *outputString ); +size_t PR_CALLBACK _PL_W16CallBackStrftime( + char *s, + size_t len, + const char *fmt, + const struct tm *p ); +void * PR_CALLBACK _PL_W16CallBackMalloc( size_t size ); +void * PR_CALLBACK _PL_W16CallBackCalloc( size_t n, size_t size ); +void * PR_CALLBACK _PL_W16CallBackRealloc( + void *old_blk, + size_t size ); +void PR_CALLBACK _PL_W16CallBackFree( void *ptr ); +void * PR_CALLBACK _PL_W16CallBackGetenv( const char *name ); +int PR_CALLBACK _PL_W16CallBackPutenv( const char *assoc ); + +/* +** Hackery! +** +** These functions are provided as static link points. +** This is to satisfy the quick port of Gromit to NSPR 2.0 +** ... Don't do this! ... alas, It may never go away. +** +*/ +NSPR_API(int) PR_MD_printf(const char *, ...); +NSPR_API(void) PR_MD_exit(int); +NSPR_API(size_t) PR_MD_strftime(char *, size_t, const char *, const struct tm *); +NSPR_API(int) PR_MD_sscanf(const char *, const char *, ...); +NSPR_API(void*) PR_MD_malloc( size_t size ); +NSPR_API(void*) PR_MD_calloc( size_t n, size_t size ); +NSPR_API(void*) PR_MD_realloc( void* old_blk, size_t size ); +NSPR_API(void) PR_MD_free( void *ptr ); +NSPR_API(char*) PR_MD_getenv( const char *name ); +NSPR_API(int) PR_MD_putenv( const char *assoc ); +NSPR_API(int) PR_MD_fprintf(FILE *fPtr, const char *fmt, ...); + +#define PR_INIT_CALLBACKS() \ + { \ + static struct PRMethodCallbackStr cbf = { \ + _PL_W16CallBackPuts, \ + _PL_W16CallBackStrftime, \ + _PL_W16CallBackMalloc, \ + _PL_W16CallBackCalloc, \ + _PL_W16CallBackRealloc, \ + _PL_W16CallBackFree, \ + _PL_W16CallBackGetenv, \ + _PL_W16CallBackPutenv, \ + }; \ + PR_MDRegisterCallbacks( &cbf ); \ + } + + +/* +** Get the exception context for Win16 MFC applications threads +*/ +NSPR_API(void *) PR_W16GetExceptionContext(void); +/* +** Set the exception context for Win16 MFC applications threads +*/ +NSPR_API(void) PR_W16SetExceptionContext(void *context); + +PR_END_EXTERN_C +#else +/* +** For platforms other than Win16, define +** PR_STDIO_INIT() as a No-Op. +*/ +#define PR_STDIO_INIT() +#endif /* WIN16 || MOZILLA_CLIENT */ + +#endif /* prwin16_h___ */ + + + + + + + + diff --git a/Src/nprt_plugin/gecko/1.8/win/include/xpcom-config.h b/Src/nprt_plugin/gecko/1.8/win/include/xpcom-config.h new file mode 100644 index 00000000..ba3991d7 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/include/xpcom-config.h @@ -0,0 +1,69 @@ +/* xpcom/xpcom-config.h. Generated automatically by configure. */ +/* Global defines needed by xpcom clients */ + +#ifndef _XPCOM_CONFIG_H_ +#define _XPCOM_CONFIG_H_ + +/* Define this to throw() if the compiler complains about + * constructors returning NULL + */ +#define CPP_THROW_NEW throw() + +/* Define if the c++ compiler supports a 2-byte wchar_t */ +/* #undef HAVE_CPP_2BYTE_WCHAR_T */ + +/* Define if the c++ compiler supports changing access with |using| */ +/* #undef HAVE_CPP_ACCESS_CHANGING_USING */ + +/* Define if the c++ compiler can resolve ambiguity with |using| */ +/* #undef HAVE_CPP_AMBIGUITY_RESOLVING_USING */ + +/* Define if the c++ compiler has builtin Bool type */ +/* #undef HAVE_CPP_BOOL */ + +/* Define if a dyanmic_cast to void* gives the most derived object */ +/* #undef HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR */ + +/* Define if the c++ compiler supports the |explicit| keyword */ +/* #undef HAVE_CPP_EXPLICIT */ + +/* Define if the c++ compiler supports the modern template + * specialization syntax + */ +/* #undef HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX */ + +/* Define if the c++ compiler supports the |std| namespace */ +/* #undef HAVE_CPP_NAMESPACE_STD */ + +/* Define if the c++ compiler supports reinterpret_cast */ +/* #undef HAVE_CPP_NEW_CASTS */ + +/* Define if the c++ compiler supports partial template specialization */ +/* #undef HAVE_CPP_PARTIAL_SPECIALIZATION */ + +/* Define if the c++ compiler has trouble comparing a constant + * reference to a templatized class to zero + */ +/* #undef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO */ + +/* Define if the c++ compiler supports the |typename| keyword */ +/* #undef HAVE_CPP_TYPENAME */ + +/* Define if the stanard template operator!=() is ambiguous */ +/* #undef HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL */ + +/* Define if statvfs() is available */ +/* #undef HAVE_STATVFS */ + +/* Define if the c++ compiler requires implementations of + * unused virtual methods + */ +/* #undef NEED_CPP_UNUSED_IMPLEMENTATIONS */ + +/* Define to either <new> or <new.h> */ +#define NEW_H <new> + +/* Define if binary compatibility with Mozilla 1.x string code is desired */ +#define MOZ_V1_STRING_ABI 1 + +#endif /* _XPCOM_CONFIG_H_ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/includeMoz/ReadMe.txt b/Src/nprt_plugin/gecko/1.8/win/includeMoz/ReadMe.txt new file mode 100644 index 00000000..55812be3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/includeMoz/ReadMe.txt @@ -0,0 +1 @@ +Files in includeMoz are copied from the Mozilla Source
\ No newline at end of file diff --git a/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsIProtocolProxyService.h b/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsIProtocolProxyService.h new file mode 100644 index 00000000..ff6d948e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsIProtocolProxyService.h @@ -0,0 +1,317 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIProtocolProxyService.idl + */ + +#ifndef __gen_nsIProtocolProxyService_h__ +#define __gen_nsIProtocolProxyService_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsICancelable; /* forward declaration */ + +class nsIProtocolProxyCallback; /* forward declaration */ + +class nsIProtocolProxyFilter; /* forward declaration */ + +class nsIProxyInfo; /* forward declaration */ + +class nsIChannel; /* forward declaration */ + +class nsIURI; /* forward declaration */ + + +/* starting interface: nsIProtocolProxyService */ +#define NS_IPROTOCOLPROXYSERVICE_IID_STR "e38ab577-786e-4a7f-936b-7ae4c7d877b2" + +#define NS_IPROTOCOLPROXYSERVICE_IID \ + {0xe38ab577, 0x786e, 0x4a7f, \ + { 0x93, 0x6b, 0x7a, 0xe4, 0xc7, 0xd8, 0x77, 0xb2 }} + +/** + * nsIProtocolProxyService provides methods to access information about + * various network proxies. + * + * @status UNDER_REVIEW + */ +class NS_NO_VTABLE nsIProtocolProxyService : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROTOCOLPROXYSERVICE_IID) + + /** + * This flag may be passed to the resolve method to request that it fail + * instead of block the calling thread. Proxy Auto Config (PAC) may + * perform a synchronous DNS query, which may not return immediately. So, + * calling resolve without this flag may result in locking up the calling + * thread for a lengthy period of time. + * + * By passing this flag to resolve, one can failover to asyncResolve to + * avoid locking up the calling thread if a PAC query is required. + * + * When this flag is passed to resolve, resolve may throw the exception + * NS_BASE_STREAM_WOULD_BLOCK to indicate that it failed due to this flag + * being present. + */ + enum { RESOLVE_NON_BLOCKING = 1U }; + + /** + * This method returns a nsIProxyInfo instance that identifies a proxy to + * be used for loading the given URI. Otherwise, this method returns null + * indicating that a direct connection should be used. + * + * @param aURI + * The URI to test. + * @param aFlags + * A bit-wise OR of the RESOLVE_ flags defined above. Pass 0 to + * specify the default behavior. + * + * NOTE: If this proxy is unavailable, getFailoverForProxy may be called + * to determine the correct secondary proxy to be used. + * + * NOTE: If the protocol handler for the given URI supports + * nsIProxiedProtocolHandler, then the nsIProxyInfo instance returned from + * resolve may be passed to the newProxiedChannel method to create a + * nsIChannel to the given URI that uses the specified proxy. + * + * NOTE: However, if the nsIProxyInfo type is "http", then it means that + * the given URI should be loaded using the HTTP protocol handler, which + * also supports nsIProxiedProtocolHandler. + * + * NOTE: If PAC is configured, and the PAC file has not yet been loaded, + * then this method will return a nsIProxyInfo instance with a type of + * "unknown" to indicate to the consumer that asyncResolve should be used + * to wait for the PAC file to finish loading. Otherwise, the consumer + * may choose to treat the result as type "direct" if desired. + * + * @see nsIProxiedProtocolHandler::newProxiedChannel + */ + /* nsIProxyInfo resolve (in nsIURI aURI, in unsigned long aFlags); */ + NS_IMETHOD Resolve(nsIURI *aURI, PRUint32 aFlags, nsIProxyInfo **_retval) = 0; + + /** + * This method is an asychronous version of the resolve method. Unlike + * resolve, this method is guaranteed not to block the calling thread + * waiting for DNS queries to complete. This method is intended as a + * substitute for resolve when the result is not needed immediately. + * + * @param aURI + * The URI to test. + * @param aFlags + * A bit-wise OR of the RESOLVE_ flags defined above. Pass 0 to + * specify the default behavior. + * @param aCallback + * The object to be notified when the result is available. + * + * @return An object that can be used to cancel the asychronous operation. + */ + /* nsICancelable asyncResolve (in nsIURI aURI, in unsigned long aFlags, in nsIProtocolProxyCallback aCallback); */ + NS_IMETHOD AsyncResolve(nsIURI *aURI, PRUint32 aFlags, nsIProtocolProxyCallback *aCallback, nsICancelable **_retval) = 0; + + /** + * This method may be called to construct a nsIProxyInfo instance from + * the given parameters. This method may be useful in conjunction with + * nsISocketTransportService::createTransport for creating, for example, + * a SOCKS connection. + * + * @param aType + * The proxy type. This is a string value that identifies the proxy + * type. Standard values include: + * "http" - specifies a HTTP proxy + * "socks" - specifies a SOCKS version 5 proxy + * "socks4" - specifies a SOCKS version 4 proxy + * "direct" - specifies a direct connection (useful for failover) + * The type name is case-insensitive. Other string values may be + * possible. + * @param aHost + * The proxy hostname or IP address. + * @param aPort + * The proxy port. + * @param aFlags + * Flags associated with this connection. See nsIProxyInfo.idl + * for currently defined flags. + * @param aFailoverTimeout + * Specifies the length of time (in seconds) to ignore this proxy if + * this proxy fails. Pass PR_UINT32_MAX to specify the default + * timeout value, causing nsIProxyInfo::failoverTimeout to be + * assigned the default value. + * @param aFailoverProxy + * Specifies the next proxy to try if this proxy fails. This + * parameter may be null. + */ + /* nsIProxyInfo newProxyInfo (in ACString aType, in AUTF8String aHost, in long aPort, in unsigned long aFlags, in unsigned long aFailoverTimeout, in nsIProxyInfo aFailoverProxy); */ + NS_IMETHOD NewProxyInfo(const nsACString & aType, const nsACString & aHost, PRInt32 aPort, PRUint32 aFlags, PRUint32 aFailoverTimeout, nsIProxyInfo *aFailoverProxy, nsIProxyInfo **_retval) = 0; + + /** + * If the proxy identified by aProxyInfo is unavailable for some reason, + * this method may be called to access an alternate proxy that may be used + * instead. As a side-effect, this method may affect future result values + * from resolve/asyncResolve as well as from getFailoverForProxy. + * + * @param aProxyInfo + * The proxy that was unavailable. + * @param aURI + * The URI that was originally passed to resolve/asyncResolve. + * @param aReason + * The error code corresponding to the proxy failure. This value + * may be used to tune the delay before this proxy is used again. + * + * @throw NS_ERROR_NOT_AVAILABLE if there is no alternate proxy available. + */ + /* nsIProxyInfo getFailoverForProxy (in nsIProxyInfo aProxyInfo, in nsIURI aURI, in nsresult aReason); */ + NS_IMETHOD GetFailoverForProxy(nsIProxyInfo *aProxyInfo, nsIURI *aURI, nsresult aReason, nsIProxyInfo **_retval) = 0; + + /** + * This method may be used to register a proxy filter instance. Each proxy + * filter is registered with an associated position that determines the + * order in which the filters are applied (starting from position 0). When + * resolve/asyncResolve is called, it generates a list of proxies for the + * given URI, and then it applies the proxy filters. The filters have the + * opportunity to modify the list of proxies. + * + * If two filters register for the same position, then the filters will be + * visited in the order in which they were registered. + * + * If the filter is already registered, then its position will be updated. + * + * After filters have been run, any disabled or disallowed proxies will be + * removed from the list. A proxy is disabled if it had previously failed- + * over to another proxy (see getFailoverForProxy). A proxy is disallowed, + * for example, if it is a HTTP proxy and the nsIProtocolHandler for the + * queried URI does not permit proxying via HTTP. + * + * If a nsIProtocolHandler disallows all proxying, then filters will never + * have a chance to intercept proxy requests for such URLs. + * + * @param aFilter + * The nsIProtocolProxyFilter instance to be registered. + * @param aPosition + * The position of the filter. + * + * NOTE: It is possible to construct filters that compete with one another + * in undesirable ways. This API does not attempt to protect against such + * problems. It is recommended that any extensions that choose to call + * this method make their position value configurable at runtime (perhaps + * via the preferences service). + */ + /* void registerFilter (in nsIProtocolProxyFilter aFilter, in unsigned long aPosition); */ + NS_IMETHOD RegisterFilter(nsIProtocolProxyFilter *aFilter, PRUint32 aPosition) = 0; + + /** + * This method may be used to unregister a proxy filter instance. All + * filters will be automatically unregistered at XPCOM shutdown. + * + * @param aFilter + * The nsIProtocolProxyFilter instance to be unregistered. + */ + /* void unregisterFilter (in nsIProtocolProxyFilter aFilter); */ + NS_IMETHOD UnregisterFilter(nsIProtocolProxyFilter *aFilter) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROTOCOLPROXYSERVICE \ + NS_IMETHOD Resolve(nsIURI *aURI, PRUint32 aFlags, nsIProxyInfo **_retval); \ + NS_IMETHOD AsyncResolve(nsIURI *aURI, PRUint32 aFlags, nsIProtocolProxyCallback *aCallback, nsICancelable **_retval); \ + NS_IMETHOD NewProxyInfo(const nsACString & aType, const nsACString & aHost, PRInt32 aPort, PRUint32 aFlags, PRUint32 aFailoverTimeout, nsIProxyInfo *aFailoverProxy, nsIProxyInfo **_retval); \ + NS_IMETHOD GetFailoverForProxy(nsIProxyInfo *aProxyInfo, nsIURI *aURI, nsresult aReason, nsIProxyInfo **_retval); \ + NS_IMETHOD RegisterFilter(nsIProtocolProxyFilter *aFilter, PRUint32 aPosition); \ + NS_IMETHOD UnregisterFilter(nsIProtocolProxyFilter *aFilter); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROTOCOLPROXYSERVICE(_to) \ + NS_IMETHOD Resolve(nsIURI *aURI, PRUint32 aFlags, nsIProxyInfo **_retval) { return _to Resolve(aURI, aFlags, _retval); } \ + NS_IMETHOD AsyncResolve(nsIURI *aURI, PRUint32 aFlags, nsIProtocolProxyCallback *aCallback, nsICancelable **_retval) { return _to AsyncResolve(aURI, aFlags, aCallback, _retval); } \ + NS_IMETHOD NewProxyInfo(const nsACString & aType, const nsACString & aHost, PRInt32 aPort, PRUint32 aFlags, PRUint32 aFailoverTimeout, nsIProxyInfo *aFailoverProxy, nsIProxyInfo **_retval) { return _to NewProxyInfo(aType, aHost, aPort, aFlags, aFailoverTimeout, aFailoverProxy, _retval); } \ + NS_IMETHOD GetFailoverForProxy(nsIProxyInfo *aProxyInfo, nsIURI *aURI, nsresult aReason, nsIProxyInfo **_retval) { return _to GetFailoverForProxy(aProxyInfo, aURI, aReason, _retval); } \ + NS_IMETHOD RegisterFilter(nsIProtocolProxyFilter *aFilter, PRUint32 aPosition) { return _to RegisterFilter(aFilter, aPosition); } \ + NS_IMETHOD UnregisterFilter(nsIProtocolProxyFilter *aFilter) { return _to UnregisterFilter(aFilter); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROTOCOLPROXYSERVICE(_to) \ + NS_IMETHOD Resolve(nsIURI *aURI, PRUint32 aFlags, nsIProxyInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(aURI, aFlags, _retval); } \ + NS_IMETHOD AsyncResolve(nsIURI *aURI, PRUint32 aFlags, nsIProtocolProxyCallback *aCallback, nsICancelable **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncResolve(aURI, aFlags, aCallback, _retval); } \ + NS_IMETHOD NewProxyInfo(const nsACString & aType, const nsACString & aHost, PRInt32 aPort, PRUint32 aFlags, PRUint32 aFailoverTimeout, nsIProxyInfo *aFailoverProxy, nsIProxyInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewProxyInfo(aType, aHost, aPort, aFlags, aFailoverTimeout, aFailoverProxy, _retval); } \ + NS_IMETHOD GetFailoverForProxy(nsIProxyInfo *aProxyInfo, nsIURI *aURI, nsresult aReason, nsIProxyInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFailoverForProxy(aProxyInfo, aURI, aReason, _retval); } \ + NS_IMETHOD RegisterFilter(nsIProtocolProxyFilter *aFilter, PRUint32 aPosition) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterFilter(aFilter, aPosition); } \ + NS_IMETHOD UnregisterFilter(nsIProtocolProxyFilter *aFilter) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterFilter(aFilter); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsProtocolProxyService : public nsIProtocolProxyService +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROTOCOLPROXYSERVICE + + nsProtocolProxyService(); + +private: + ~nsProtocolProxyService(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsProtocolProxyService, nsIProtocolProxyService) + +nsProtocolProxyService::nsProtocolProxyService() +{ + /* member initializers and constructor code */ +} + +nsProtocolProxyService::~nsProtocolProxyService() +{ + /* destructor code */ +} + +/* nsIProxyInfo resolve (in nsIURI aURI, in unsigned long aFlags); */ +NS_IMETHODIMP nsProtocolProxyService::Resolve(nsIURI *aURI, PRUint32 aFlags, nsIProxyInfo **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsICancelable asyncResolve (in nsIURI aURI, in unsigned long aFlags, in nsIProtocolProxyCallback aCallback); */ +NS_IMETHODIMP nsProtocolProxyService::AsyncResolve(nsIURI *aURI, PRUint32 aFlags, nsIProtocolProxyCallback *aCallback, nsICancelable **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIProxyInfo newProxyInfo (in ACString aType, in AUTF8String aHost, in long aPort, in unsigned long aFlags, in unsigned long aFailoverTimeout, in nsIProxyInfo aFailoverProxy); */ +NS_IMETHODIMP nsProtocolProxyService::NewProxyInfo(const nsACString & aType, const nsACString & aHost, PRInt32 aPort, PRUint32 aFlags, PRUint32 aFailoverTimeout, nsIProxyInfo *aFailoverProxy, nsIProxyInfo **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIProxyInfo getFailoverForProxy (in nsIProxyInfo aProxyInfo, in nsIURI aURI, in nsresult aReason); */ +NS_IMETHODIMP nsProtocolProxyService::GetFailoverForProxy(nsIProxyInfo *aProxyInfo, nsIURI *aURI, nsresult aReason, nsIProxyInfo **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerFilter (in nsIProtocolProxyFilter aFilter, in unsigned long aPosition); */ +NS_IMETHODIMP nsProtocolProxyService::RegisterFilter(nsIProtocolProxyFilter *aFilter, PRUint32 aPosition) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterFilter (in nsIProtocolProxyFilter aFilter); */ +NS_IMETHODIMP nsProtocolProxyService::UnregisterFilter(nsIProtocolProxyFilter *aFilter) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIProtocolProxyService_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsIProxyInfo.h b/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsIProxyInfo.h new file mode 100644 index 00000000..3d30e57e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsIProxyInfo.h @@ -0,0 +1,204 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIProxyInfo.idl + */ + +#ifndef __gen_nsIProxyInfo_h__ +#define __gen_nsIProxyInfo_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIProxyInfo */ +#define NS_IPROXYINFO_IID_STR "3fe9308b-1608-4fa0-933c-c5ec2c6175fd" + +#define NS_IPROXYINFO_IID \ + {0x3fe9308b, 0x1608, 0x4fa0, \ + { 0x93, 0x3c, 0xc5, 0xec, 0x2c, 0x61, 0x75, 0xfd }} + +/** + * This interface identifies a proxy server. + * + * @status UNDER_REVIEW + */ +class NS_NO_VTABLE nsIProxyInfo : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROXYINFO_IID) + + /** + * This attribute specifies the hostname of the proxy server. + */ + /* readonly attribute AUTF8String host; */ + NS_IMETHOD GetHost(nsACString & aHost) = 0; + + /** + * This attribute specifies the port number of the proxy server. + */ + /* readonly attribute long port; */ + NS_IMETHOD GetPort(PRInt32 *aPort) = 0; + + /** + * This attribute specifies the type of the proxy server as an ASCII string. + * + * Some special values for this attribute include (but are not limited to) + * the following: + * "http" HTTP proxy (or SSL CONNECT for HTTPS) + * "socks" SOCKS v5 proxy + * "socks4" SOCKS v4 proxy + * "direct" no proxy + * "unknown" unknown proxy (see nsIProtocolProxyService::resolve) + */ + /* readonly attribute ACString type; */ + NS_IMETHOD GetType(nsACString & aType) = 0; + + /** + * This attribute specifies flags that modify the proxy type. The value of + * this attribute is the bit-wise combination of the Proxy Flags defined + * below. Any undefined bits are reserved for future use. + */ + /* readonly attribute unsigned long flags; */ + NS_IMETHOD GetFlags(PRUint32 *aFlags) = 0; + + /** + * This attribute specifies the failover timeout in seconds for this proxy. + * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService:: + * getFailoverForProxy, then the failed proxy will not be used again for this + * many seconds. + */ + /* readonly attribute unsigned long failoverTimeout; */ + NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) = 0; + + /** + * This attribute specifies the proxy to failover to when this proxy fails. + */ + /* attribute nsIProxyInfo failoverProxy; */ + NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) = 0; + NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) = 0; + + /**************************************************************************** + * The following "Proxy Flags" may be bit-wise combined to construct the flags + * attribute defined on this interface. + */ +/** + * This flag is set if the proxy is to perform name resolution itself. If + * this is the case, the hostname is used in some fashion, and we shouldn't + * do any form of DNS lookup ourselves. + */ + enum { TRANSPARENT_PROXY_RESOLVES_HOST = 1U }; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROXYINFO \ + NS_IMETHOD GetHost(nsACString & aHost); \ + NS_IMETHOD GetPort(PRInt32 *aPort); \ + NS_IMETHOD GetType(nsACString & aType); \ + NS_IMETHOD GetFlags(PRUint32 *aFlags); \ + NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout); \ + NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy); \ + NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy); \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROXYINFO(_to) \ + NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \ + NS_IMETHOD GetPort(PRInt32 *aPort) { return _to GetPort(aPort); } \ + NS_IMETHOD GetType(nsACString & aType) { return _to GetType(aType); } \ + NS_IMETHOD GetFlags(PRUint32 *aFlags) { return _to GetFlags(aFlags); } \ + NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) { return _to GetFailoverTimeout(aFailoverTimeout); } \ + NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) { return _to GetFailoverProxy(aFailoverProxy); } \ + NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) { return _to SetFailoverProxy(aFailoverProxy); } \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROXYINFO(_to) \ + NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \ + NS_IMETHOD GetPort(PRInt32 *aPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \ + NS_IMETHOD GetType(nsACString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ + NS_IMETHOD GetFlags(PRUint32 *aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \ + NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFailoverTimeout(aFailoverTimeout); } \ + NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFailoverProxy(aFailoverProxy); } \ + NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFailoverProxy(aFailoverProxy); } \ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsProxyInfo : public nsIProxyInfo +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROXYINFO + + nsProxyInfo(); + +private: + ~nsProxyInfo(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsProxyInfo, nsIProxyInfo) + +nsProxyInfo::nsProxyInfo() +{ + /* member initializers and constructor code */ +} + +nsProxyInfo::~nsProxyInfo() +{ + /* destructor code */ +} + +/* readonly attribute AUTF8String host; */ +NS_IMETHODIMP nsProxyInfo::GetHost(nsACString & aHost) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute long port; */ +NS_IMETHODIMP nsProxyInfo::GetPort(PRInt32 *aPort) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute ACString type; */ +NS_IMETHODIMP nsProxyInfo::GetType(nsACString & aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long flags; */ +NS_IMETHODIMP nsProxyInfo::GetFlags(PRUint32 *aFlags) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long failoverTimeout; */ +NS_IMETHODIMP nsProxyInfo::GetFailoverTimeout(PRUint32 *aFailoverTimeout) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIProxyInfo failoverProxy; */ +NS_IMETHODIMP nsProxyInfo::GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsProxyInfo::SetFailoverProxy(nsIProxyInfo * aFailoverProxy) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIProxyInfo_h__ */ diff --git a/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsNetCID.h b/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsNetCID.h new file mode 100644 index 00000000..9cabc1ce --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/includeMoz/nsNetCID.h @@ -0,0 +1,749 @@ +/* -*- 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Darin Fisher <darin@netscape.com> (original author) + * + * 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 ***** */ + +#ifndef nsNetCID_h__ +#define nsNetCID_h__ + + +/****************************************************************************** + * netwerk/base/ classes + */ + +// service implementing nsIIOService. +#define NS_IOSERVICE_CLASSNAME \ + "nsIOService" +#define NS_IOSERVICE_CONTRACTID \ + "@mozilla.org/network/io-service;1" +#define NS_IOSERVICE_CID \ +{ /* 9ac9e770-18bc-11d3-9337-00104ba0fd40 */ \ + 0x9ac9e770, \ + 0x18bc, \ + 0x11d3, \ + {0x93, 0x37, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} + +// service implementing nsINetUtil +#define NS_NETUTIL_CONTRACTID \ + "@mozilla.org/network/util;1" + +// service implementing nsIEventTarget. events dispatched to this event +// target will be executed on one of necko's background i/o threads. +#define NS_IOTHREADPOOL_CLASSNAME \ + "nsIOThreadPool" +#define NS_IOTHREADPOOL_CONTRACTID \ + "@mozilla.org/network/io-thread-pool;1" +#define NS_IOTHREADPOOL_CID \ +{ /* f1d62b49-5051-48e2-9155-c3509428461e */ \ + 0xf1d62b49, \ + 0x5051, \ + 0x48e2, \ + {0x91, 0x55, 0xc3, 0x50, 0x94, 0x28, 0x46, 0x1e} \ +} + +// service implementing nsIProtocolProxyService and nsPIProtocolProxyService. +#define NS_PROTOCOLPROXYSERVICE_CLASSNAME \ + "nsProtocolProxyService" +#define NS_PROTOCOLPROXYSERVICE_CONTRACTID \ + "@mozilla.org/network/protocol-proxy-service;1" +#define NS_PROTOCOLPROXYSERVICE_CID \ +{ /* E9B301C0-E0E4-11d3-A1A8-0050041CAF44 */ \ + 0xe9b301c0, \ + 0xe0e4, \ + 0x11d3, \ + {0xa1, 0xa8, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44} \ +} + +// service implementing nsIProxyAutoConfig. +#define NS_PROXYAUTOCONFIG_CLASSNAME \ + "nsProxyAutoConfig" +#define NS_PROXYAUTOCONFIG_CONTRACTID \ + "@mozilla.org/network/proxy-auto-config;1" +#define NS_PROXYAUTOCONFIG_CID \ +{ /* 63ac8c66-1dd2-11b2-b070-84d00d3eaece */ \ + 0x63ac8c66, \ + 0x1dd2, \ + 0x11b2, \ + {0xb0, 0x70, 0x84, 0xd0, 0x0d, 0x3e, 0xae, 0xce} \ +} + +// component implementing nsILoadGroup. +#define NS_LOADGROUP_CLASSNAME \ + "nsLoadGroup" +#define NS_LOADGROUP_CONTRACTID \ + "@mozilla.org/network/load-group;1" +#define NS_LOADGROUP_CID \ +{ /* e1c61582-2a84-11d3-8cce-0060b0fc14a3 */ \ + 0xe1c61582, \ + 0x2a84, \ + 0x11d3, \ + {0x8c, 0xce, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + +// component implementing nsIURI, nsISerializable, and nsIClassInfo. +#define NS_SIMPLEURI_CLASSNAME \ + "nsSimpleURI" +#define NS_SIMPLEURI_CONTRACTID \ + "@mozilla.org/network/simple-uri;1" +#define NS_SIMPLEURI_CID \ +{ /* e0da1d70-2f7b-11d3-8cd0-0060b0fc14a3 */ \ + 0xe0da1d70, \ + 0x2f7b, \ + 0x11d3, \ + {0x8c, 0xd0, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + +// component implementing nsIStandardURL, nsIURI, nsIURL, nsISerializable, +// and nsIClassInfo. +#define NS_STANDARDURL_CLASSNAME \ + "nsStandardURL" +#define NS_STANDARDURL_CONTRACTID \ + "@mozilla.org/network/standard-url;1" +#define NS_STANDARDURL_CID \ +{ /* de9472d0-8034-11d3-9399-00104ba0fd40 */ \ + 0xde9472d0, \ + 0x8034, \ + 0x11d3, \ + {0x93, 0x99, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} + +// service implementing nsIURLParser that assumes the URL will NOT contain an +// authority section. +#define NS_NOAUTHURLPARSER_CLASSNAME \ + "nsNoAuthURLParser" +#define NS_NOAUTHURLPARSER_CONTRACTID \ + "@mozilla.org/network/url-parser;1?auth=no" +#define NS_NOAUTHURLPARSER_CID \ +{ /* 78804a84-8173-42b6-bb94-789f0816a810 */ \ + 0x78804a84, \ + 0x8173, \ + 0x42b6, \ + {0xbb, 0x94, 0x78, 0x9f, 0x08, 0x16, 0xa8, 0x10} \ +} + +// service implementing nsIURLParser that assumes the URL will contain an +// authority section. +#define NS_AUTHURLPARSER_CLASSNAME \ + "nsAuthURLParser" +#define NS_AUTHURLPARSER_CONTRACTID \ + "@mozilla.org/network/url-parser;1?auth=yes" +#define NS_AUTHURLPARSER_CID \ +{ /* 275d800e-3f60-4896-adb7-d7f390ce0e42 */ \ + 0x275d800e, \ + 0x3f60, \ + 0x4896, \ + {0xad, 0xb7, 0xd7, 0xf3, 0x90, 0xce, 0x0e, 0x42} \ +} + +// service implementing nsIURLParser that does not make any assumptions about +// whether or not the URL contains an authority section. +#define NS_STDURLPARSER_CLASSNAME \ + "nsStdURLParser" +#define NS_STDURLPARSER_CONTRACTID \ + "@mozilla.org/network/url-parser;1?auth=maybe" +#define NS_STDURLPARSER_CID \ +{ /* ff41913b-546a-4bff-9201-dc9b2c032eba */ \ + 0xff41913b, \ + 0x546a, \ + 0x4bff, \ + {0x92, 0x01, 0xdc, 0x9b, 0x2c, 0x03, 0x2e, 0xba} \ +} + +// component implementing nsIRequestObserverProxy. +#define NS_REQUESTOBSERVERPROXY_CLASSNAME \ + "nsRequestObserverProxy" +#define NS_REQUESTOBSERVERPROXY_CONTRACTID \ + "@mozilla.org/network/request-observer-proxy;1" +#define NS_REQUESTOBSERVERPROXY_CID \ +{ /* 51fa28c7-74c0-4b85-9c46-d03faa7b696b */ \ + 0x51fa28c7, \ + 0x74c0, \ + 0x4b85, \ + {0x9c, 0x46, 0xd0, 0x3f, 0xaa, 0x7b, 0x69, 0x6b} \ +} + +// component implementing nsISimpleStreamListener. +#define NS_SIMPLESTREAMLISTENER_CLASSNAME \ + "nsSimpleStreamListener" +#define NS_SIMPLESTREAMLISTENER_CONTRACTID \ + "@mozilla.org/network/simple-stream-listener;1" +#define NS_SIMPLESTREAMLISTENER_CID \ +{ /* fb8cbf4e-4701-4ba1-b1d6-5388e041fb67 */ \ + 0xfb8cbf4e, \ + 0x4701, \ + 0x4ba1, \ + {0xb1, 0xd6, 0x53, 0x88, 0xe0, 0x41, 0xfb, 0x67} \ +} + +// DEPRECATED component implementing nsIAsyncStreamListener. +#define NS_ASYNCSTREAMLISTENER_CLASSNAME \ + "nsAsyncStreamListener" +#define NS_ASYNCSTREAMLISTENER_CONTRACTID \ + "@mozilla.org/network/async-stream-listener;1" +#define NS_ASYNCSTREAMLISTENER_CID \ +{ /* 60047bb2-91c0-11d3-8cd9-0060b0fc14a3 */ \ + 0x60047bb2, \ + 0x91c0, \ + 0x11d3, \ + {0x8c, 0xd9, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + +// component implementing nsIStreamListenerTee. +#define NS_STREAMLISTENERTEE_CLASSNAME \ + "nsStreamListenerTee" +#define NS_STREAMLISTENERTEE_CONTRACTID \ + "@mozilla.org/network/stream-listener-tee;1" +#define NS_STREAMLISTENERTEE_CID \ +{ /* 831f8f13-7aa8-485f-b02e-77c881cc5773 */ \ + 0x831f8f13, \ + 0x7aa8, \ + 0x485f, \ + {0xb0, 0x2e, 0x77, 0xc8, 0x81, 0xcc, 0x57, 0x73} \ +} + +// component implementing nsIAsyncStreamCopier. +#define NS_ASYNCSTREAMCOPIER_CLASSNAME \ + "nsAsyncStreamCopier" +#define NS_ASYNCSTREAMCOPIER_CONTRACTID \ + "@mozilla.org/network/async-stream-copier;1" +#define NS_ASYNCSTREAMCOPIER_CID \ +{ /* e746a8b1-c97a-4fc5-baa4-66607521bd08 */ \ + 0xe746a8b1, \ + 0xc97a, \ + 0x4fc5, \ + {0xba, 0xa4, 0x66, 0x60, 0x75, 0x21, 0xbd, 0x08} \ +} + +// component implementing nsIInputStreamPump. +#define NS_INPUTSTREAMPUMP_CLASSNAME \ + "nsInputStreamPump" +#define NS_INPUTSTREAMPUMP_CONTRACTID \ + "@mozilla.org/network/input-stream-pump;1" +#define NS_INPUTSTREAMPUMP_CID \ +{ /* ccd0e960-7947-4635-b70e-4c661b63d675 */ \ + 0xccd0e960, \ + 0x7947, \ + 0x4635, \ + {0xb7, 0x0e, 0x4c, 0x66, 0x1b, 0x63, 0xd6, 0x75} \ +} + +// component implementing nsIInputStreamChannel. +#define NS_INPUTSTREAMCHANNEL_CLASSNAME \ + "nsInputStreamChannel" +#define NS_INPUTSTREAMCHANNEL_CONTRACTID \ + "@mozilla.org/network/input-stream-channel;1" +#define NS_INPUTSTREAMCHANNEL_CID \ +{ /* 6ddb050c-0d04-11d4-986e-00c04fa0cf4a */ \ + 0x6ddb050c, \ + 0x0d04, \ + 0x11d4, \ + {0x98, 0x6e, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a} \ +} + +// component implementing nsIStreamLoader. +#define NS_STREAMLOADER_CLASSNAME \ + "nsStreamLoader" +#define NS_STREAMLOADER_CONTRACTID \ + "@mozilla.org/network/stream-loader;1" +#define NS_STREAMLOADER_CID \ +{ /* 5BA6D920-D4E9-11d3-A1A5-0050041CAF44 */ \ + 0x5ba6d920, \ + 0xd4e9, \ + 0x11d3, \ + { 0xa1, 0xa5, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } \ +} + +// component implementing nsIUnicharStreamLoader. +#define NS_UNICHARSTREAMLOADER_CLASSNAME \ + "nsUnicharStreamLoader" +#define NS_UNICHARSTREAMLOADER_CONTRACTID \ + "@mozilla.org/network/unichar-stream-loader;1" +#define NS_UNICHARSTREAMLOADER_CID \ +{ /* 9445791f-fa4c-4669-b174-df5032bb67b3 */ \ + 0x9445791f, \ + 0xfa4c, \ + 0x4669, \ + { 0xb1, 0x74, 0xdf, 0x50, 0x32, 0xbb, 0x67, 0xb3 } \ +} + +// component implementing nsIDownloader. +#define NS_DOWNLOADER_CLASSNAME \ + "nsDownloader" +#define NS_DOWNLOADER_CONTRACTID \ + "@mozilla.org/network/downloader;1" +#define NS_DOWNLOADER_CID \ +{ /* 510a86bb-6019-4ed1-bb4f-965cffd23ece */ \ + 0x510a86bb, \ + 0x6019, \ + 0x4ed1, \ + {0xbb, 0x4f, 0x96, 0x5c, 0xff, 0xd2, 0x3e, 0xce} \ +} + +// component implementing nsISyncStreamListener. +#define NS_SYNCSTREAMLISTENER_CLASSNAME \ + "nsSyncStreamListener" +#define NS_SYNCSTREAMLISTENER_CONTRACTID \ + "@mozilla.org/network/sync-stream-listener;1" +#define NS_SYNCSTREAMLISTENER_CID \ +{ /* 439400d3-6f23-43db-8b06-8aafe1869bd8 */ \ + 0x439400d3, \ + 0x6f23, \ + 0x43db, \ + {0x8b, 0x06, 0x8a, 0xaf, 0xe1, 0x86, 0x9b, 0xd8} \ +} + +// component implementing nsIURIChecker. +#define NS_URICHECKER_CLASSNAME \ + "nsURIChecker" +#define NS_URICHECKER_CONTRACT_ID \ + "@mozilla.org/network/urichecker;1" +#define NS_URICHECKER_CID \ +{ /* cf3a0e06-1dd1-11b2-a904-ac1d6da77a02 */ \ + 0xcf3a0e06, \ + 0x1dd1, \ + 0x11b2, \ + {0xa9, 0x04, 0xac, 0x1d, 0x6d, 0xa7, 0x7a, 0x02} \ +} + +// component implementing nsIIncrementalDownload. +#define NS_INCREMENTALDOWNLOAD_CONTRACTID \ + "@mozilla.org/network/incremental-download;1" + +// service implementing nsIStreamTransportService +#define NS_STREAMTRANSPORTSERVICE_CLASSNAME \ + "nsStreamTransportService" +#define NS_STREAMTRANSPORTSERVICE_CONTRACTID \ + "@mozilla.org/network/stream-transport-service;1" +#define NS_STREAMTRANSPORTSERVICE_CID \ +{ /* 0885d4f8-f7b8-4cda-902e-94ba38bc256e */ \ + 0x0885d4f8, \ + 0xf7b8, \ + 0x4cda, \ + {0x90, 0x2e, 0x94, 0xba, 0x38, 0xbc, 0x25, 0x6e} \ +} + +// service implementing nsISocketTransportService +#define NS_SOCKETTRANSPORTSERVICE_CLASSNAME \ + "nsSocketTransportService" +#define NS_SOCKETTRANSPORTSERVICE_CONTRACTID \ + "@mozilla.org/network/socket-transport-service;1" +#define NS_SOCKETTRANSPORTSERVICE_CID \ +{ /* c07e81e0-ef12-11d2-92b6-00105a1b0d64 */ \ + 0xc07e81e0, \ + 0xef12, \ + 0x11d2, \ + {0x92, 0xb6, 0x00, 0x10, 0x5a, 0x1b, 0x0d, 0x64} \ +} + +// component implementing nsIServerSocket +#define NS_SERVERSOCKET_CLASSNAME \ + "nsServerSocket" +#define NS_SERVERSOCKET_CONTRACTID \ + "@mozilla.org/network/server-socket;1" +#define NS_SERVERSOCKET_CID \ +{ /* 2ec62893-3b35-48fa-ab1d-5e68a9f45f08 */ \ + 0x2ec62893, \ + 0x3b35, \ + 0x48fa, \ + {0xab, 0x1d, 0x5e, 0x68, 0xa9, 0xf4, 0x5f, 0x08} \ +} + +#define NS_LOCALFILEINPUTSTREAM_CLASSNAME \ + "nsFileInputStream" +#define NS_LOCALFILEINPUTSTREAM_CONTRACTID \ + "@mozilla.org/network/file-input-stream;1" +#define NS_LOCALFILEINPUTSTREAM_CID \ +{ /* be9a53ae-c7e9-11d3-8cda-0060b0fc14a3 */ \ + 0xbe9a53ae, \ + 0xc7e9, \ + 0x11d3, \ + {0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + +#define NS_LOCALFILEOUTPUTSTREAM_CLASSNAME \ + "nsFileOutputStream" +#define NS_LOCALFILEOUTPUTSTREAM_CONTRACTID \ + "@mozilla.org/network/file-output-stream;1" +#define NS_LOCALFILEOUTPUTSTREAM_CID \ +{ /* c272fee0-c7e9-11d3-8cda-0060b0fc14a3 */ \ + 0xc272fee0, \ + 0xc7e9, \ + 0x11d3, \ + {0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + +#define NS_BUFFEREDINPUTSTREAM_CLASSNAME \ + "nsBufferedInputStream" +#define NS_BUFFEREDINPUTSTREAM_CONTRACTID \ + "@mozilla.org/network/buffered-input-stream;1" +#define NS_BUFFEREDINPUTSTREAM_CID \ +{ /* 9226888e-da08-11d3-8cda-0060b0fc14a3 */ \ + 0x9226888e, \ + 0xda08, \ + 0x11d3, \ + {0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + +#define NS_BUFFEREDOUTPUTSTREAM_CLASSNAME \ + "nsBufferedOutputStream" +#define NS_BUFFEREDOUTPUTSTREAM_CONTRACTID \ + "@mozilla.org/network/buffered-output-stream;1" +#define NS_BUFFEREDOUTPUTSTREAM_CID \ +{ /* 9868b4ce-da08-11d3-8cda-0060b0fc14a3 */ \ + 0x9868b4ce, \ + 0xda08, \ + 0x11d3, \ + {0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + +// component implementing nsISafeOutputStream +#define NS_SAFELOCALFILEOUTPUTSTREAM_CLASSNAME \ + "nsSafeFileOutputStream" +#define NS_SAFELOCALFILEOUTPUTSTREAM_CONTRACTID \ + "@mozilla.org/network/safe-file-output-stream;1" +#define NS_SAFELOCALFILEOUTPUTSTREAM_CID \ +{ /* a181af0d-68b8-4308-94db-d4f859058215 */ \ + 0xa181af0d, \ + 0x68b8, \ + 0x4308, \ + {0x94, 0xdb, 0xd4, 0xf8, 0x59, 0x05, 0x82, 0x15} \ +} + +// component implementing nsIPrompt +// +// NOTE: this implementation does not have any way to correctly parent itself, +// it is almost always wrong to get a prompt via this interface. +// use nsIWindowWatcher instead whenever possible. +// +#define NS_DEFAULTPROMPT_CONTRACTID \ + "@mozilla.org/network/default-prompt;1" + +// component implementing nsIAuthPrompt +// +// NOTE: this implementation does not have any way to correctly parent itself, +// it is almost always wrong to get an auth prompt via this interface. +// use nsIWindowWatcher instead whenever possible. +// +#define NS_DEFAULTAUTHPROMPT_CONTRACTID \ + "@mozilla.org/network/default-auth-prompt;1" + +/****************************************************************************** + * netwerk/cache/ classes + */ + +// service implementing nsICacheService. +#define NS_CACHESERVICE_CLASSNAME \ + "nsCacheService" +#define NS_CACHESERVICE_CONTRACTID \ + "@mozilla.org/network/cache-service;1" +#define NS_CACHESERVICE_CID \ +{ /* 6c84aec9-29a5-4264-8fbc-bee8f922ea67 */ \ + 0x6c84aec9, \ + 0x29a5, \ + 0x4264, \ + {0x8f, 0xbc, 0xbe, 0xe8, 0xf9, 0x22, 0xea, 0x67} \ +} + + +/****************************************************************************** + * netwerk/protocol/http/ classes + */ + +#define NS_HTTPPROTOCOLHANDLER_CID \ +{ /* 4f47e42e-4d23-4dd3-bfda-eb29255e9ea3 */ \ + 0x4f47e42e, \ + 0x4d23, \ + 0x4dd3, \ + {0xbf, 0xda, 0xeb, 0x29, 0x25, 0x5e, 0x9e, 0xa3} \ +} + +#define NS_HTTPSPROTOCOLHANDLER_CID \ +{ /* dccbe7e4-7750-466b-a557-5ea36c8ff24e */ \ + 0xdccbe7e4, \ + 0x7750, \ + 0x466b, \ + {0xa5, 0x57, 0x5e, 0xa3, 0x6c, 0x8f, 0xf2, 0x4e} \ +} + +#define NS_HTTPBASICAUTH_CID \ +{ /* fca3766a-434a-4ae7-83cf-0909e18a093a */ \ + 0xfca3766a, \ + 0x434a, \ + 0x4ae7, \ + {0x83, 0xcf, 0x09, 0x09, 0xe1, 0x8a, 0x09, 0x3a} \ +} + +#define NS_HTTPDIGESTAUTH_CID \ +{ /* 17491ba4-1dd2-11b2-aae3-de6b92dab620 */ \ + 0x17491ba4, \ + 0x1dd2, \ + 0x11b2, \ + {0xaa, 0xe3, 0xde, 0x6b, 0x92, 0xda, 0xb6, 0x20} \ +} + +#define NS_HTTPNTLMAUTH_CID \ +{ /* bbef8185-c628-4cc1-b53e-e61e74c2451a */ \ + 0xbbef8185, \ + 0xc628, \ + 0x4cc1, \ + {0xb5, 0x3e, 0xe6, 0x1e, 0x74, 0xc2, 0x45, 0x1a} \ +} + +#define NS_HTTPAUTHMANAGER_CLASSNAME \ + "nsHttpAuthManager" +#define NS_HTTPAUTHMANAGER_CONTRACTID \ + "@mozilla.org/network/http-auth-manager;1" +#define NS_HTTPAUTHMANAGER_CID \ +{ /* 36b63ef3-e0fa-4c49-9fd4-e065e85568f4 */ \ + 0x36b63ef3, \ + 0xe0fa, \ + 0x4c49, \ + {0x9f, 0xd4, 0xe0, 0x65, 0xe8, 0x55, 0x68, 0xf4} \ +} + +/****************************************************************************** + * netwerk/protocol/ftp/ classes + */ + +#define NS_FTPPROTOCOLHANDLER_CLASSNAME \ + "nsFtpProtocolHandler" +#define NS_FTPPROTOCOLHANDLER_CID \ +{ /* 25029490-F132-11d2-9588-00805F369F95 */ \ + 0x25029490, \ + 0xf132, \ + 0x11d2, \ + {0x95, 0x88, 0x0, 0x80, 0x5f, 0x36, 0x9f, 0x95} \ +} + +/****************************************************************************** + * netwerk/protocol/res/ classes + */ + +#define NS_RESPROTOCOLHANDLER_CLASSNAME \ + "nsResProtocolHandler" +#define NS_RESPROTOCOLHANDLER_CID \ +{ /* e64f152a-9f07-11d3-8cda-0060b0fc14a3 */ \ + 0xe64f152a, \ + 0x9f07, \ + 0x11d3, \ + {0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} + +#define NS_RESURL_CLASSNAME \ + "nsResURL" +#define NS_RESURL_CID \ +{ /* ff8fe7ec-2f74-4408-b742-6b7a546029a8 */ \ + 0xff8fe7ec, \ + 0x2f74, \ + 0x4408, \ + {0xb7, 0x42, 0x6b, 0x7a, 0x54, 0x60, 0x29, 0xa8} \ +} + + +/****************************************************************************** + * netwerk/protocol/file/ classes + */ + +#define NS_FILEPROTOCOLHANDLER_CLASSNAME \ + "nsFileProtocolHandler" +#define NS_FILEPROTOCOLHANDLER_CID \ +{ /* fbc81170-1f69-11d3-9344-00104ba0fd40 */ \ + 0xfbc81170, \ + 0x1f69, \ + 0x11d3, \ + {0x93, 0x44, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} + +/****************************************************************************** + * netwerk/protocol/data/ classes + */ + +#define NS_DATAPROTOCOLHANDLER_CLASSNAME \ + "nsDataProtocolHandler" +#define NS_DATAPROTOCOLHANDLER_CID \ +{ /* {B6ED3030-6183-11d3-A178-0050041CAF44} */ \ + 0xb6ed3030, \ + 0x6183, \ + 0x11d3, \ + {0xa1, 0x78, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44} \ +} + +/****************************************************************************** + * netwerk/protocol/viewsource/ classes + */ + +// service implementing nsIProtocolHandler +#define NS_VIEWSOURCEHANDLER_CID \ +{ /* {0x9c7ec5d1-23f9-11d5-aea8-8fcc0793e97f} */ \ + 0x9c7ec5d1, \ + 0x23f9, \ + 0x11d5, \ + {0xae, 0xa8, 0x8f, 0xcc, 0x07, 0x93, 0xe9, 0x7f} \ +} + +/****************************************************************************** + * netwerk/dns/ classes + */ + +#define NS_DNSSERVICE_CLASSNAME \ + "nsDNSService" +#define NS_DNSSERVICE_CONTRACTID \ + "@mozilla.org/network/dns-service;1" +#define NS_DNSSERVICE_CID \ +{ /* b0ff4572-dae4-4bef-a092-83c1b88f6be9 */ \ + 0xb0ff4572, \ + 0xdae4, \ + 0x4bef, \ + {0xa0, 0x92, 0x83, 0xc1, 0xb8, 0x8f, 0x6b, 0xe9} \ +} + +#define NS_IDNSERVICE_CLASSNAME \ + "nsIDNService" +/* ContractID of the XPCOM package that implements nsIIDNService */ +#define NS_IDNSERVICE_CONTRACTID \ + "@mozilla.org/network/idn-service;1" +#define NS_IDNSERVICE_CID \ +{ /* 62b778a6-bce3-456b-8c31-2865fbb68c91 */ \ + 0x62b778a6, \ + 0xbce3, \ + 0x456b, \ + {0x8c, 0x31, 0x28, 0x65, 0xfb, 0xb6, 0x8c, 0x91} \ +} + +/****************************************************************************** + * netwerk/mime classes + */ + +#define NS_MIMEHEADERPARAM_CLASSNAME \ + "nsMIMEHeaderParamImpl" +// {1F4DBCF7-245C-4c8c-943D-8A1DA0495E8A} +#define NS_MIMEHEADERPARAM_CID \ +{ 0x1f4dbcf7, \ + 0x245c, \ + 0x4c8c, \ + { 0x94, 0x3d, 0x8a, 0x1d, 0xa0, 0x49, 0x5e, 0x8a } \ +} + +#define NS_MIMEHEADERPARAM_CONTRACTID "@mozilla.org/network/mime-hdrparam;1" + + +/****************************************************************************** + * netwerk/socket classes + */ + +#define NS_SOCKETPROVIDERSERVICE_CLASSNAME \ + "nsSocketProviderService" +#define NS_SOCKETPROVIDERSERVICE_CONTRACTID \ + "@mozilla.org/network/socket-provider-service;1" +#define NS_SOCKETPROVIDERSERVICE_CID \ +{ /* ed394ba0-5472-11d3-bbc8-0000861d1237 */ \ + 0xed394ba0, \ + 0x5472, \ + 0x11d3, \ + { 0xbb, 0xc8, 0x00, 0x00, 0x86, 0x1d, 0x12, 0x37 } \ +} + +#define NS_SOCKSSOCKETPROVIDER_CID \ +{ /* 8dbe7246-1dd2-11b2-9b8f-b9a849e4403a */ \ + 0x8dbe7246, \ + 0x1dd2, \ + 0x11b2, \ + { 0x9b, 0x8f, 0xb9, 0xa8, 0x49, 0xe4, 0x40, 0x3a } \ +} + +#define NS_SOCKS4SOCKETPROVIDER_CID \ +{ /* F7C9F5F4-4451-41c3-A28A-5BA2447FBACE */ \ + 0xf7c9f5f4, \ + 0x4451, \ + 0x41c3, \ + { 0xa2, 0x8a, 0x5b, 0xa2, 0x44, 0x7f, 0xba, 0xce } \ +} + +#define NS_SSLSOCKETPROVIDER_CONTRACTID \ + NS_NETWORK_SOCKET_CONTRACTID_PREFIX "ssl" + +/* This code produces a normal socket which can be used to initiate the + * STARTTLS protocol by calling its nsISSLSocketControl->StartTLS() + */ +#define NS_STARTTLSSOCKETPROVIDER_CONTRACTID \ + NS_NETWORK_SOCKET_CONTRACTID_PREFIX "starttls" + + +/****************************************************************************** + * netwerk/cookie classes + */ + +// service implementing nsICookieManager and nsICookieManager2. +#define NS_COOKIEMANAGER_CLASSNAME \ + "CookieManager" +#define NS_COOKIEMANAGER_CONTRACTID \ + "@mozilla.org/cookiemanager;1" +#define NS_COOKIEMANAGER_CID \ +{ /* aaab6710-0f2c-11d5-a53b-0010a401eb10 */ \ + 0xaaab6710, \ + 0x0f2c, \ + 0x11d5, \ + { 0xa5, 0x3b, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 } \ +} + +// service implementing nsICookieService. +#define NS_COOKIESERVICE_CLASSNAME \ + "CookieService" +#define NS_COOKIESERVICE_CONTRACTID \ + "@mozilla.org/cookieService;1" +#define NS_COOKIESERVICE_CID \ +{ /* c375fa80-150f-11d6-a618-0010a401eb10 */ \ + 0xc375fa80, \ + 0x150f, \ + 0x11d6, \ + { 0xa6, 0x18, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 } \ +} + +/****************************************************************************** + * netwerk/streamconv classes + */ + +// service implementing nsIStreamConverterService +#define NS_STREAMCONVERTERSERVICE_CID \ +{ /* 892FFEB0-3F80-11d3-A16C-0050041CAF44 */ \ + 0x892ffeb0, \ + 0x3f80, \ + 0x11d3, \ + {0xa1, 0x6c, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44} \ +} + +#endif // nsNetCID_h__ diff --git a/Src/nprt_plugin/gecko/1.8/win/lib/embed_base_s.lib b/Src/nprt_plugin/gecko/1.8/win/lib/embed_base_s.lib Binary files differnew file mode 100644 index 00000000..917d153e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/lib/embed_base_s.lib diff --git a/Src/nprt_plugin/gecko/1.8/win/lib/nspr4.lib b/Src/nprt_plugin/gecko/1.8/win/lib/nspr4.lib Binary files differnew file mode 100644 index 00000000..395be62f --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/lib/nspr4.lib diff --git a/Src/nprt_plugin/gecko/1.8/win/lib/plc4.lib b/Src/nprt_plugin/gecko/1.8/win/lib/plc4.lib Binary files differnew file mode 100644 index 00000000..6d265609 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/lib/plc4.lib diff --git a/Src/nprt_plugin/gecko/1.8/win/lib/plds4.lib b/Src/nprt_plugin/gecko/1.8/win/lib/plds4.lib Binary files differnew file mode 100644 index 00000000..b3ff8398 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/lib/plds4.lib diff --git a/Src/nprt_plugin/gecko/1.8/win/lib/xpcom.lib b/Src/nprt_plugin/gecko/1.8/win/lib/xpcom.lib Binary files differnew file mode 100644 index 00000000..f01cbdb3 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/lib/xpcom.lib diff --git a/Src/nprt_plugin/gecko/1.8/win/lib/xpcomglue.lib b/Src/nprt_plugin/gecko/1.8/win/lib/xpcomglue.lib Binary files differnew file mode 100644 index 00000000..6326975e --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/lib/xpcomglue.lib diff --git a/Src/nprt_plugin/gecko/1.8/win/lib/xpcomglue_s.lib b/Src/nprt_plugin/gecko/1.8/win/lib/xpcomglue_s.lib Binary files differnew file mode 100644 index 00000000..46ae2dbd --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/lib/xpcomglue_s.lib diff --git a/Src/nprt_plugin/gecko/1.8/win/version.txt b/Src/nprt_plugin/gecko/1.8/win/version.txt new file mode 100644 index 00000000..9d404c00 --- /dev/null +++ b/Src/nprt_plugin/gecko/1.8/win/version.txt @@ -0,0 +1 @@ +FireFOx 1.5.0 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
\ No newline at end of file diff --git a/Src/nprt_plugin/np_entry.cpp b/Src/nprt_plugin/np_entry.cpp new file mode 100644 index 00000000..4a2d66b5 --- /dev/null +++ b/Src/nprt_plugin/np_entry.cpp @@ -0,0 +1,189 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +////////////////////////////////////////////////////////////// +// +// Main plugin entry point implementation +// +#include "npapi.h" +#include "npupp.h" + +#ifndef HIBYTE +#define HIBYTE(x) ((((uint32)(x)) & 0xff00) >> 8) +#endif + +NPNetscapeFuncs NPNFuncs; + +#ifdef XP_WIN + +NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs) +{ + if(pFuncs == NULL) + return NPERR_INVALID_FUNCTABLE_ERROR; + + if(pFuncs->size < sizeof(NPPluginFuncs)) + return NPERR_INVALID_FUNCTABLE_ERROR; + + pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR; + pFuncs->newp = NPP_New; + pFuncs->destroy = NPP_Destroy; + pFuncs->setwindow = NPP_SetWindow; + pFuncs->newstream = NPP_NewStream; + pFuncs->destroystream = NPP_DestroyStream; + pFuncs->asfile = NPP_StreamAsFile; + pFuncs->writeready = NPP_WriteReady; + pFuncs->write = NPP_Write; + pFuncs->print = NPP_Print; + pFuncs->event = NPP_HandleEvent; + pFuncs->urlnotify = NPP_URLNotify; + pFuncs->getvalue = NPP_GetValue; + pFuncs->setvalue = NPP_SetValue; + pFuncs->javaClass = NULL; + + return NPERR_NO_ERROR; +} + +#endif /* XP_WIN */ + +char *NPP_GetMIMEDescription(); + +char * +NP_GetMIMEDescription() +{ + return NPP_GetMIMEDescription(); +} + +NPError +NP_GetValue(void* future, NPPVariable variable, void *value) +{ + return NPP_GetValue((NPP_t *)future, variable, value); +} + +NPError OSCALL +NP_Initialize(NPNetscapeFuncs* pFuncs +#ifdef XP_UNIX + , NPPluginFuncs* pluginFuncs +#endif + ) +{ + if(pFuncs == NULL) + return NPERR_INVALID_FUNCTABLE_ERROR; + + if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR) + return NPERR_INCOMPATIBLE_VERSION_ERROR; + + if(pFuncs->size < sizeof(NPNetscapeFuncs)) + return NPERR_INVALID_FUNCTABLE_ERROR; + + NPNFuncs.size = pFuncs->size; + NPNFuncs.version = pFuncs->version; + NPNFuncs.geturlnotify = pFuncs->geturlnotify; + NPNFuncs.geturl = pFuncs->geturl; + NPNFuncs.posturlnotify = pFuncs->posturlnotify; + NPNFuncs.posturl = pFuncs->posturl; + NPNFuncs.requestread = pFuncs->requestread; + NPNFuncs.newstream = pFuncs->newstream; + NPNFuncs.write = pFuncs->write; + NPNFuncs.destroystream = pFuncs->destroystream; + NPNFuncs.status = pFuncs->status; + NPNFuncs.uagent = pFuncs->uagent; + NPNFuncs.memalloc = pFuncs->memalloc; + NPNFuncs.memfree = pFuncs->memfree; + NPNFuncs.memflush = pFuncs->memflush; + NPNFuncs.reloadplugins = pFuncs->reloadplugins; + NPNFuncs.getJavaEnv = pFuncs->getJavaEnv; + NPNFuncs.getJavaPeer = pFuncs->getJavaPeer; + NPNFuncs.getvalue = pFuncs->getvalue; + NPNFuncs.setvalue = pFuncs->setvalue; + NPNFuncs.invalidaterect = pFuncs->invalidaterect; + NPNFuncs.invalidateregion = pFuncs->invalidateregion; + NPNFuncs.forceredraw = pFuncs->forceredraw; + NPNFuncs.getstringidentifier = pFuncs->getstringidentifier; + NPNFuncs.getstringidentifiers = pFuncs->getstringidentifiers; + NPNFuncs.getintidentifier = pFuncs->getintidentifier; + NPNFuncs.identifierisstring = pFuncs->identifierisstring; + NPNFuncs.utf8fromidentifier = pFuncs->utf8fromidentifier; + NPNFuncs.intfromidentifier = pFuncs->intfromidentifier; + NPNFuncs.createobject = pFuncs->createobject; + NPNFuncs.retainobject = pFuncs->retainobject; + NPNFuncs.releaseobject = pFuncs->releaseobject; + NPNFuncs.invoke = pFuncs->invoke; + NPNFuncs.invokeDefault = pFuncs->invokeDefault; + NPNFuncs.evaluate = pFuncs->evaluate; + NPNFuncs.getproperty = pFuncs->getproperty; + NPNFuncs.setproperty = pFuncs->setproperty; + NPNFuncs.removeproperty = pFuncs->removeproperty; + NPNFuncs.hasproperty = pFuncs->hasproperty; + NPNFuncs.hasmethod = pFuncs->hasmethod; + NPNFuncs.releasevariantvalue = pFuncs->releasevariantvalue; + NPNFuncs.setexception = pFuncs->setexception; + +#ifdef XP_UNIX + /* + * Set up the plugin function table that Netscape will use to + * call us. Netscape needs to know about our version and size + * and have a UniversalProcPointer for every function we + * implement. + */ + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); + pluginFuncs->newp = NewNPP_NewProc(NPP_New); + pluginFuncs->destroy = NewNPP_DestroyProc(NPP_Destroy); + pluginFuncs->setwindow = NewNPP_SetWindowProc(NPP_SetWindow); + pluginFuncs->newstream = NewNPP_NewStreamProc(NPP_NewStream); + pluginFuncs->destroystream = NewNPP_DestroyStreamProc(NPP_DestroyStream); + pluginFuncs->asfile = NewNPP_StreamAsFileProc(NPP_StreamAsFile); + pluginFuncs->writeready = NewNPP_WriteReadyProc(NPP_WriteReady); + pluginFuncs->write = NewNPP_WriteProc(NPP_Write); + pluginFuncs->print = NewNPP_PrintProc(NPP_Print); + pluginFuncs->urlnotify = NewNPP_URLNotifyProc(NPP_URLNotify); + pluginFuncs->event = NULL; + pluginFuncs->getvalue = NewNPP_GetValueProc(NPP_GetValue); +#ifdef OJI + pluginFuncs->javaClass = NPP_GetJavaClass(); +#endif + + NPP_Initialize(); +#endif + + return NPERR_NO_ERROR; +} + +NPError OSCALL NP_Shutdown() +{ + return NPERR_NO_ERROR; +} diff --git a/Src/nprt_plugin/npn_gate.cpp b/Src/nprt_plugin/npn_gate.cpp new file mode 100644 index 00000000..55570f73 --- /dev/null +++ b/Src/nprt_plugin/npn_gate.cpp @@ -0,0 +1,322 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +//////////////////////////////////////////////////////////// +// +// Implementation of Netscape entry points (NPN_*) +// +#include "npapi.h" +#include "npupp.h" + +#ifndef HIBYTE +#define HIBYTE(x) ((((uint32)(x)) & 0xff00) >> 8) +#endif + +#ifndef LOBYTE +#define LOBYTE(W) ((W) & 0xFF) +#endif + +extern NPNetscapeFuncs NPNFuncs; + +void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor) +{ + *plugin_major = NP_VERSION_MAJOR; + *plugin_minor = NP_VERSION_MINOR; + *netscape_major = HIBYTE(NPNFuncs.version); + *netscape_minor = LOBYTE(NPNFuncs.version); +} + +NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData) +{ + int navMinorVers = NPNFuncs.version & 0xFF; + NPError rv = NPERR_NO_ERROR; + + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + rv = NPNFuncs.geturlnotify(instance, url, target, notifyData); + else + rv = NPERR_INCOMPATIBLE_VERSION_ERROR; + + return rv; +} + +NPError NPN_GetURL(NPP instance, const char *url, const char *target) +{ + NPError rv = NPNFuncs.geturl(instance, url, target); + return rv; +} + +NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) +{ + int navMinorVers = NPNFuncs.version & 0xFF; + NPError rv = NPERR_NO_ERROR; + + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + rv = NPNFuncs.posturlnotify(instance, url, window, len, buf, file, notifyData); + else + rv = NPERR_INCOMPATIBLE_VERSION_ERROR; + + return rv; +} + +NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) +{ + NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file); + return rv; +} + +NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) +{ + NPError rv = NPNFuncs.requestread(stream, rangeList); + return rv; +} + +NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream) +{ + int navMinorVersion = NPNFuncs.version & 0xFF; + + NPError rv = NPERR_NO_ERROR; + + if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) + rv = NPNFuncs.newstream(instance, type, target, stream); + else + rv = NPERR_INCOMPATIBLE_VERSION_ERROR; + + return rv; +} + +int32 NPN_Write(NPP instance, NPStream *stream, int32 len, void *buffer) +{ + int navMinorVersion = NPNFuncs.version & 0xFF; + int32 rv = 0; + + if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) + rv = NPNFuncs.write(instance, stream, len, buffer); + else + rv = -1; + + return rv; +} + +NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) +{ + int navMinorVersion = NPNFuncs.version & 0xFF; + NPError rv = NPERR_NO_ERROR; + + if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) + rv = NPNFuncs.destroystream(instance, stream, reason); + else + rv = NPERR_INCOMPATIBLE_VERSION_ERROR; + + return rv; +} + +void NPN_Status(NPP instance, const char *message) +{ + NPNFuncs.status(instance, message); +} + +const char* NPN_UserAgent(NPP instance) +{ + const char * rv = NULL; + rv = NPNFuncs.uagent(instance); + return rv; +} + +void* NPN_MemAlloc(uint32 size) +{ + void * rv = NULL; + rv = NPNFuncs.memalloc(size); + return rv; +} + +void NPN_MemFree(void* ptr) +{ + NPNFuncs.memfree(ptr); +} + +uint32 NPN_MemFlush(uint32 size) +{ + uint32 rv = NPNFuncs.memflush(size); + return rv; +} + +void NPN_ReloadPlugins(NPBool reloadPages) +{ + NPNFuncs.reloadplugins(reloadPages); +} + +JRIEnv* NPN_GetJavaEnv(void) +{ + JRIEnv * rv = NULL; + rv = NPNFuncs.getJavaEnv(); + return rv; +} + +jref NPN_GetJavaPeer(NPP instance) +{ + jref rv; + rv = NPNFuncs.getJavaPeer(instance); + return rv; +} + +NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value) +{ + NPError rv = NPNFuncs.getvalue(instance, variable, value); + return rv; +} + +NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value) +{ + NPError rv = NPNFuncs.setvalue(instance, variable, value); + return rv; +} + +void NPN_InvalidateRect(NPP instance, NPRect *invalidRect) +{ + NPNFuncs.invalidaterect(instance, invalidRect); +} + +void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) +{ + NPNFuncs.invalidateregion(instance, invalidRegion); +} + +void NPN_ForceRedraw(NPP instance) +{ + NPNFuncs.forceredraw(instance); +} + +NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) +{ + return NPNFuncs.getstringidentifier(name); +} + +void NPN_GetStringIdentifiers(const NPUTF8 **names, uint32_t nameCount, + NPIdentifier *identifiers) +{ + return NPNFuncs.getstringidentifiers(names, nameCount, identifiers); +} + +NPIdentifier NPN_GetStringIdentifier(int32_t intid) +{ + return NPNFuncs.getintidentifier(intid); +} + +bool NPN_IdentifierIsString(NPIdentifier identifier) +{ + return NPNFuncs.identifierisstring(identifier); +} + +NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier) +{ + return NPNFuncs.utf8fromidentifier(identifier); +} + +int32_t NPN_IntFromIdentifier(NPIdentifier identifier) +{ + return NPNFuncs.intfromidentifier(identifier); +} + +NPObject *NPN_CreateObject(NPP npp, NPClass *aClass) +{ + return NPNFuncs.createobject(npp, aClass); +} + +NPObject *NPN_RetainObject(NPObject *obj) +{ + return NPNFuncs.retainobject(obj); +} + +void NPN_ReleaseObject(NPObject *obj) +{ + return NPNFuncs.releaseobject(obj); +} + +bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, + const NPVariant *args, uint32_t argCount, NPVariant *result) +{ + return NPNFuncs.invoke(npp, obj, methodName, args, argCount, result); +} + +bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args, + uint32_t argCount, NPVariant *result) +{ + return NPNFuncs.invokeDefault(npp, obj, args, argCount, result); +} + +bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script, + NPVariant *result) +{ + return NPNFuncs.evaluate(npp, obj, script, result); +} + +bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, + NPVariant *result) +{ + return NPNFuncs.getproperty(npp, obj, propertyName, result); +} + +bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, + const NPVariant *value) +{ + return NPNFuncs.setproperty(npp, obj, propertyName, value); +} + +bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) +{ + return NPNFuncs.removeproperty(npp, obj, propertyName); +} + +bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) +{ + return NPNFuncs.hasproperty(npp, obj, propertyName); +} + +bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName) +{ + return NPNFuncs.hasmethod(npp, obj, methodName); +} + +void NPN_ReleaseVariantValue(NPVariant *variant) +{ + NPNFuncs.releasevariantvalue(variant); +} + +void NPN_SetException(NPObject* obj, const NPUTF8 *message) +{ + NPNFuncs.setexception(obj, message); +} diff --git a/Src/nprt_plugin/npp_gate.cpp b/Src/nprt_plugin/npp_gate.cpp new file mode 100644 index 00000000..54a46fec --- /dev/null +++ b/Src/nprt_plugin/npp_gate.cpp @@ -0,0 +1,262 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +//////////////////////////////////////////////////////////// +// +// Implementation of plugin entry points (NPP_*) +// most are just empty stubs for this particular plugin +// +#include "plugin.h" + +char* +NPP_GetMIMEDescription(void) +{ + return "application/x-winampx-1.0.0.1::Winamp Application Detector"; +} + + + +NPError NPP_Initialize(void) +{ + return NPERR_NO_ERROR; +} + +void NPP_Shutdown(void) +{ +} + +// here the plugin creates an instance of our CPlugin object which +// will be associated with this newly created plugin instance and +// will do all the neccessary job +NPError NPP_New(NPMIMEType pluginType, + NPP instance, + uint16 mode, + int16 argc, + char* argn[], + char* argv[], + NPSavedData* saved) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + NPError rv = NPERR_NO_ERROR; + + CPlugin * pPlugin = new CPlugin(instance); + if(pPlugin == NULL) + return NPERR_OUT_OF_MEMORY_ERROR; + + instance->pdata = (void *)pPlugin; + return rv; +} + +// here is the place to clean up and destroy the CPlugin object +NPError NPP_Destroy (NPP instance, NPSavedData** save) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + NPError rv = NPERR_NO_ERROR; + + CPlugin * pPlugin = (CPlugin *)instance->pdata; + if(pPlugin != NULL) { + pPlugin->shut(); + delete pPlugin; + } + return rv; +} + +// during this call we know when the plugin window is ready or +// is about to be destroyed so we can do some gui specific +// initialization and shutdown +NPError NPP_SetWindow (NPP instance, NPWindow* pNPWindow) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + NPError rv = NPERR_NO_ERROR; + + if(pNPWindow == NULL) + return NPERR_GENERIC_ERROR; + + CPlugin * pPlugin = (CPlugin *)instance->pdata; + + if(pPlugin == NULL) + return NPERR_GENERIC_ERROR; + + // window just created + if(!pPlugin->isInitialized() && (pNPWindow->window != NULL)) { + if(!pPlugin->init(pNPWindow)) { + delete pPlugin; + pPlugin = NULL; + return NPERR_MODULE_LOAD_FAILED_ERROR; + } + } + + // window goes away + if((pNPWindow->window == NULL) && pPlugin->isInitialized()) + return NPERR_NO_ERROR; + + // window resized + if(pPlugin->isInitialized() && (pNPWindow->window != NULL)) + return NPERR_NO_ERROR; + + // this should not happen, nothing to do + if((pNPWindow->window == NULL) && !pPlugin->isInitialized()) + return NPERR_NO_ERROR; + + return rv; +} + +// ============================== +// ! Scriptability related code ! +// ============================== +// +// here the plugin is asked by Mozilla to tell if it is scriptable +// we should return a valid interface id and a pointer to +// nsScriptablePeer interface which we should have implemented +// and which should be defined in the corressponding *.xpt file +// in the bin/components folder +NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + NPError rv = NPERR_NO_ERROR; + + if(instance == NULL) + return NPERR_GENERIC_ERROR; + + CPlugin * plugin = (CPlugin *)instance->pdata; + if(plugin == NULL) + return NPERR_GENERIC_ERROR; + + switch (variable) { + case NPPVpluginNameString: + *((char **)value) = "Winamp Application Detector"; + break; + case NPPVpluginDescriptionString: + *((char **)value) = "Winamp Application Detector"; + break; + case NPPVpluginScriptableNPObject: + *(NPObject **)value = plugin->GetScriptableObject(); + break; + default: + rv = NPERR_GENERIC_ERROR; + } + + return rv; +} + +NPError NPP_NewStream(NPP instance, + NPMIMEType type, + NPStream* stream, + NPBool seekable, + uint16* stype) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + NPError rv = NPERR_NO_ERROR; + return rv; +} + +int32 NPP_WriteReady (NPP instance, NPStream *stream) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + int32 rv = 0x0fffffff; + return rv; +} + +int32 NPP_Write (NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + int32 rv = len; + return rv; +} + +NPError NPP_DestroyStream (NPP instance, NPStream *stream, NPError reason) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + NPError rv = NPERR_NO_ERROR; + return rv; +} + +void NPP_StreamAsFile (NPP instance, NPStream* stream, const char* fname) +{ + if(instance == NULL) + return; +} + +void NPP_Print (NPP instance, NPPrint* printInfo) +{ + if(instance == NULL) + return; +} + +void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData) +{ + if(instance == NULL) + return; +} + +NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value) +{ + if(instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + NPError rv = NPERR_NO_ERROR; + return rv; +} + +int16 NPP_HandleEvent(NPP instance, void* event) +{ + if(instance == NULL) + return 0; + + int16 rv = 0; + CPlugin * pPlugin = (CPlugin *)instance->pdata; + if (pPlugin) + rv = pPlugin->handleEvent(event); + + return rv; +} diff --git a/Src/nprt_plugin/nprt.def b/Src/nprt_plugin/nprt.def new file mode 100644 index 00000000..241e1603 --- /dev/null +++ b/Src/nprt_plugin/nprt.def @@ -0,0 +1,6 @@ +LIBRARY NPWACHK + +EXPORTS + NP_GetEntryPoints @1 + NP_Initialize @2 + NP_Shutdown @3 diff --git a/Src/nprt_plugin/nprt.rc b/Src/nprt_plugin/nprt.rc new file mode 100644 index 00000000..7684e249 --- /dev/null +++ b/Src/nprt_plugin/nprt.rc @@ -0,0 +1,103 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "Winamp SA" + VALUE "FileDescription", "Winamp Application Detector" + VALUE "FileOpenName", "winamp" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "AppDetector" + VALUE "LegalCopyright", "Copyright © 2009-2014 Winamp SA" + VALUE "MIMEType", "application/x-winampx-1.0.0.1" + VALUE "ProductName", "Winamp Application Detector" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Src/nprt_plugin/nprt_plugin.sln b/Src/nprt_plugin/nprt_plugin.sln new file mode 100644 index 00000000..80ed5f38 --- /dev/null +++ b/Src/nprt_plugin/nprt_plugin.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nprt_plugin", "nprt_plugin.vcproj", "{CAFDC55A-9657-47A8-8824-CE2C5F595478}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CAFDC55A-9657-47A8-8824-CE2C5F595478}.Debug|Win32.ActiveCfg = Debug|Win32 + {CAFDC55A-9657-47A8-8824-CE2C5F595478}.Debug|Win32.Build.0 = Debug|Win32 + {CAFDC55A-9657-47A8-8824-CE2C5F595478}.Release|Win32.ActiveCfg = Release|Win32 + {CAFDC55A-9657-47A8-8824-CE2C5F595478}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Src/nprt_plugin/nprt_plugin.vcproj b/Src/nprt_plugin/nprt_plugin.vcproj new file mode 100644 index 00000000..2e49b621 --- /dev/null +++ b/Src/nprt_plugin/nprt_plugin.vcproj @@ -0,0 +1,229 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="nprt_plugin" + ProjectGUID="{CAFDC55A-9657-47A8-8824-CE2C5F595478}" + RootNamespace="nprt_plugin" + Keyword="Win32Proj" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="include;gecko\1.8\win\include;gecko\1.8\win\includeMoz;"$(OutDir)"" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;XP_WIN32;MOZILLA_STRICT_API;XPCOM_GLUE;XP_WIN;_X86_;NPSIMPLE_EXPORTS;_USRDLL;NPRT_PLUGIN_EXPORTS;_CRT_SECURE_NO_WARNINGS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="Version.lib" + OutputFile="$(ProgramFiles)\Winamp\browserplugins\mozilla\plugins\npwachk.dll" + LinkIncremental="2" + ModuleDefinitionFile=".\nprt.def" + GenerateDebugInformation="true" + SubSystem="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="include;gecko\1.8\win\include;gecko\1.8\win\includeMoz;"$(OutDir)"" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;XP_WIN32;MOZILLA_STRICT_API;XPCOM_GLUE;XP_WIN;_X86_;NPSIMPLE_EXPORTS;_USRDLL;NPRT_PLUGIN_EXPORTS;_CRT_SECURE_NO_WARNINGS" + StringPooling="true" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="Version.lib" + OutputFile="$(ProgramFiles)\Winamp\browserplugins\mozilla\plugins\npwachk.dll" + LinkIncremental="1" + ModuleDefinitionFile=".\nprt.def" + GenerateDebugInformation="false" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\np_entry.cpp" + > + </File> + <File + RelativePath=".\npn_gate.cpp" + > + </File> + <File + RelativePath=".\npp_gate.cpp" + > + </File> + <File + RelativePath=".\plugin.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\plugin.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\nprt.def" + > + </File> + <File + RelativePath=".\nprt.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Src/nprt_plugin/plugin.cpp b/Src/nprt_plugin/plugin.cpp new file mode 100644 index 00000000..4dd0c980 --- /dev/null +++ b/Src/nprt_plugin/plugin.cpp @@ -0,0 +1,470 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +////////////////////////////////////////////////// +// +// CPlugin class implementation +// +#include <windows.h> +#include <windowsx.h> +#include "plugin.h" +#include "npupp.h" +#include "nsError.h" +#include <malloc.h> + +static NPIdentifier sGetVersion_id; +//static NPObject *sWindowObj; + +#define BUFFER_LEN 1024 + +// Helper class that can be used to map calls to the NPObject hooks +// into virtual methods on instances of classes that derive from this +// class. +class ScriptablePluginObjectBase : public NPObject +{ +public: + ScriptablePluginObjectBase(NPP npp) + : mNpp(npp) + { + } + + virtual ~ScriptablePluginObjectBase() + { + } + + // Virtual NPObject hooks called through this base class. Override + // as you see fit. + virtual void Invalidate(); + virtual bool HasMethod(NPIdentifier name); + virtual bool Invoke(NPIdentifier name, const NPVariant *args, + uint32_t argCount, NPVariant *result); + virtual bool InvokeDefault(const NPVariant *args, uint32_t argCount, + NPVariant *result); + virtual bool HasProperty(NPIdentifier name); + virtual bool GetProperty(NPIdentifier name, NPVariant *result); + virtual bool SetProperty(NPIdentifier name, const NPVariant *value); + virtual bool RemoveProperty(NPIdentifier name); + +public: + static void _Deallocate(NPObject *npobj); + static void _Invalidate(NPObject *npobj); + static bool _HasMethod(NPObject *npobj, NPIdentifier name); + static bool _Invoke(NPObject *npobj, NPIdentifier name, + const NPVariant *args, uint32_t argCount, + NPVariant *result); + static bool _InvokeDefault(NPObject *npobj, const NPVariant *args, + uint32_t argCount, NPVariant *result); + static bool _HasProperty(NPObject * npobj, NPIdentifier name); + static bool _GetProperty(NPObject *npobj, NPIdentifier name, + NPVariant *result); + static bool _SetProperty(NPObject *npobj, NPIdentifier name, + const NPVariant *value); + static bool _RemoveProperty(NPObject *npobj, NPIdentifier name); + +protected: + NPP mNpp; +}; + +#define DECLARE_NPOBJECT_CLASS_WITH_BASE(_class, ctor) \ +static NPClass s##_class##_NPClass = { \ + NP_CLASS_STRUCT_VERSION, \ + ctor, \ + ScriptablePluginObjectBase::_Deallocate, \ + ScriptablePluginObjectBase::_Invalidate, \ + ScriptablePluginObjectBase::_HasMethod, \ + ScriptablePluginObjectBase::_Invoke, \ + ScriptablePluginObjectBase::_InvokeDefault, \ + ScriptablePluginObjectBase::_HasProperty, \ + ScriptablePluginObjectBase::_GetProperty, \ + ScriptablePluginObjectBase::_SetProperty, \ + ScriptablePluginObjectBase::_RemoveProperty, \ +} + +#define GET_NPOBJECT_CLASS(_class) &s##_class##_NPClass + +void +ScriptablePluginObjectBase::Invalidate() +{ +} + +bool +ScriptablePluginObjectBase::HasMethod(NPIdentifier name) +{ + return false; +} + +bool +ScriptablePluginObjectBase::Invoke(NPIdentifier name, const NPVariant *args, + uint32_t argCount, NPVariant *result) +{ + return false; +} + +bool +ScriptablePluginObjectBase::InvokeDefault(const NPVariant *args, + uint32_t argCount, NPVariant *result) +{ + return false; +} + +bool +ScriptablePluginObjectBase::HasProperty(NPIdentifier name) +{ + return false; +} + +bool +ScriptablePluginObjectBase::GetProperty(NPIdentifier name, NPVariant *result) +{ + return false; +} + +bool +ScriptablePluginObjectBase::SetProperty(NPIdentifier name, + const NPVariant *value) +{ + return false; +} + +bool +ScriptablePluginObjectBase::RemoveProperty(NPIdentifier name) +{ + return false; +} + +// static +void +ScriptablePluginObjectBase::_Deallocate(NPObject *npobj) +{ + // Call the virtual destructor. + delete (ScriptablePluginObjectBase *)npobj; +} + +// static +void +ScriptablePluginObjectBase::_Invalidate(NPObject *npobj) +{ + ((ScriptablePluginObjectBase *)npobj)->Invalidate(); +} + +// static +bool +ScriptablePluginObjectBase::_HasMethod(NPObject *npobj, NPIdentifier name) +{ + return ((ScriptablePluginObjectBase *)npobj)->HasMethod(name); +} + +// static +bool +ScriptablePluginObjectBase::_Invoke(NPObject *npobj, NPIdentifier name, + const NPVariant *args, uint32_t argCount, + NPVariant *result) +{ + return ((ScriptablePluginObjectBase *)npobj)->Invoke(name, args, argCount, + result); +} + +// static +bool +ScriptablePluginObjectBase::_InvokeDefault(NPObject *npobj, + const NPVariant *args, + uint32_t argCount, + NPVariant *result) +{ + return ((ScriptablePluginObjectBase *)npobj)->InvokeDefault(args, argCount, + result); +} + +// static +bool +ScriptablePluginObjectBase::_HasProperty(NPObject * npobj, NPIdentifier name) +{ + return ((ScriptablePluginObjectBase *)npobj)->HasProperty(name); +} + +// static +bool +ScriptablePluginObjectBase::_GetProperty(NPObject *npobj, NPIdentifier name, + NPVariant *result) +{ + return ((ScriptablePluginObjectBase *)npobj)->GetProperty(name, result); +} + +// static +bool +ScriptablePluginObjectBase::_SetProperty(NPObject *npobj, NPIdentifier name, + const NPVariant *value) +{ + return ((ScriptablePluginObjectBase *)npobj)->SetProperty(name, value); +} + +// static +bool +ScriptablePluginObjectBase::_RemoveProperty(NPObject *npobj, NPIdentifier name) +{ + return ((ScriptablePluginObjectBase *)npobj)->RemoveProperty(name); +} + +class ScriptablePluginObject : public ScriptablePluginObjectBase +{ +public: + ScriptablePluginObject(NPP npp) + : ScriptablePluginObjectBase(npp) + { + } + + virtual bool HasMethod(NPIdentifier name); + virtual bool HasProperty(NPIdentifier name); + virtual bool GetProperty(NPIdentifier name, NPVariant *result); + virtual bool Invoke(NPIdentifier name, const NPVariant *args, + uint32_t argCount, NPVariant *result); + virtual bool InvokeDefault(const NPVariant *args, uint32_t argCount, + NPVariant *result); +}; + +static NPObject * +AllocateScriptablePluginObject(NPP npp, NPClass *aClass) +{ + return new ScriptablePluginObject(npp); +} + +DECLARE_NPOBJECT_CLASS_WITH_BASE(ScriptablePluginObject, + AllocateScriptablePluginObject); + +bool +ScriptablePluginObject::HasMethod(NPIdentifier name) +{ + return name == sGetVersion_id; +} + +bool +ScriptablePluginObject::HasProperty(NPIdentifier name) +{ + return PR_FALSE; +} + +bool +ScriptablePluginObject::GetProperty(NPIdentifier name, NPVariant *result) +{ + VOID_TO_NPVARIANT(*result); + + return PR_FALSE; +} + +bool +ScriptablePluginObject::Invoke(NPIdentifier name, const NPVariant *args, + uint32_t argCount, NPVariant *result) +{ + VOID_TO_NPVARIANT(*result); + + if (name == sGetVersion_id) { + char csVersion[BUFFER_LEN]; + memset(&csVersion[0], '\0', BUFFER_LEN); + + DWORD BufferSize = BUFFER_LEN; + DWORD cbData; + bool keyFound = false; + + wchar_t exeName[] = L"\\winamp.exe"; + wchar_t fileName[BUFFER_LEN]; + memset(&fileName[0],'\0',BUFFER_LEN); + wchar_t fileNameTemp[BUFFER_LEN]; + + HKEY hKey; + cbData = BUFFER_LEN; + + // first check the protocol handler registry key, we're looking for + // the winamp:// protocol handler. If we find this, then this is the + // "right" exe for winamp we need to get the version number on + if (RegOpenKeyEx(HKEY_CLASSES_ROOT, TEXT("winamp\\shell\\open\\command"), 0, KEY_READ, &hKey) == ERROR_SUCCESS) { + if ( RegQueryValueEx( hKey, + TEXT(""), + NULL, + NULL, + (LPBYTE) fileNameTemp, + &cbData ) != ERROR_SUCCESS) { + return PR_FALSE; + } + + RegCloseKey (hKey); + if (wcsstr(fileNameTemp,L"winamp.exe")) { + int indexOfFirstQuote = wcscspn(fileNameTemp, L"\""); + int indexOfSecondQuote = wcscspn(&fileNameTemp[indexOfFirstQuote+1], L"\""); + if (indexOfFirstQuote >= 0) { + keyFound = true; + wcsncpy(fileName,&fileNameTemp[indexOfFirstQuote+1], indexOfSecondQuote); + } + } else { + // some other app (itunes ??) controlling the winamp:// protocol + // return error + return PR_FALSE; + } + } + + if (!keyFound) { + // See if the reg key exists + if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Winamp"), 0, KEY_READ, &hKey) != ERROR_SUCCESS) { + return PR_FALSE; + } + + cbData = BUFFER_LEN; + if ( RegQueryValueEx( hKey, + TEXT(""), + NULL, + NULL, + (LPBYTE) fileName, + &cbData ) != ERROR_SUCCESS) { + return PR_FALSE; + } + RegCloseKey (hKey); + keyFound = true; + wcscat(fileName,exeName); + } + + if (!keyFound) { + return PR_FALSE; + } + + static TCHAR sBackSlash[] = {'\\','\0'}; + DWORD dwVersionDataLen = GetFileVersionInfoSize(fileName, NULL); + + if (dwVersionDataLen) { + char* fvBuf = (char *)alloca(dwVersionDataLen); + if (GetFileVersionInfo(fileName, 0, dwVersionDataLen, fvBuf)) { + + LPVOID pVal; + UINT nValLen; + if (VerQueryValue(fvBuf, sBackSlash, &pVal, &nValLen)) { + if (nValLen == sizeof(VS_FIXEDFILEINFO)) { + VS_FIXEDFILEINFO* pFixedFileInfo = (VS_FIXEDFILEINFO*)pVal; + //sprintf(csVersion, "%d.%d.%d.%d", + //HIWORD(pFixedFileInfo->dwFileVersionMS), LOWORD(pFixedFileInfo->dwFileVersionMS), + //HIWORD(pFixedFileInfo->dwFileVersionLS), LOWORD(pFixedFileInfo->dwFileVersionLS)); + sprintf(csVersion, "%d.%d%d", + HIWORD(pFixedFileInfo->dwFileVersionMS), LOWORD(pFixedFileInfo->dwFileVersionMS), + HIWORD(pFixedFileInfo->dwFileVersionLS)); + } + } + } + } + + size_t versionLen = (uint32)strlen(&csVersion[0]) + 1; + char *targetResult = (char *) NPN_MemAlloc(versionLen); + + if (targetResult != NULL ) + memcpy(targetResult, csVersion, versionLen); + else + return PR_FALSE; + + STRINGZ_TO_NPVARIANT(targetResult, *result); + return PR_TRUE; + } + + return PR_FALSE; +} + +bool +ScriptablePluginObject::InvokeDefault(const NPVariant *args, uint32_t argCount, + NPVariant *result) +{ + VOID_TO_NPVARIANT(*result); + + return PR_FALSE; +} + +CPlugin::CPlugin(NPP pNPInstance) : + m_pNPInstance(pNPInstance), + m_bInitialized(FALSE), + m_pScriptableObject(NULL) +{ + //NPN_GetValue(m_pNPInstance, NPNVWindowNPObject, &sWindowObj); + + sGetVersion_id = NPN_GetStringIdentifier("getVersion"); +} + +CPlugin::~CPlugin() +{ + //if (sWindowObj) + // NPN_ReleaseObject(sWindowObj); + if (m_pScriptableObject) + NPN_ReleaseObject(m_pScriptableObject); + + //sWindowObj = 0; +} + +NPBool CPlugin::init(NPWindow* pNPWindow) +{ + if(pNPWindow == NULL) + return FALSE; + + m_Window = pNPWindow; + + m_bInitialized = TRUE; + return TRUE; +} + +void CPlugin::shut() +{ + m_bInitialized = FALSE; +} + +NPBool CPlugin::isInitialized() +{ + return m_bInitialized; +} + + +int16 CPlugin::handleEvent(void* event) +{ + return 0; +} + +NPObject * +CPlugin::GetScriptableObject() +{ + if (!m_pScriptableObject) { + m_pScriptableObject = + NPN_CreateObject(m_pNPInstance, + GET_NPOBJECT_CLASS(ScriptablePluginObject)); + } + + if (m_pScriptableObject) { + NPN_RetainObject(m_pScriptableObject); + } + + return m_pScriptableObject; +}
\ No newline at end of file diff --git a/Src/nprt_plugin/plugin.h b/Src/nprt_plugin/plugin.h new file mode 100644 index 00000000..6e7bdf8e --- /dev/null +++ b/Src/nprt_plugin/plugin.h @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef __PLUGIN_H__ +#define __PLUGIN_H__ + +#include "npapi.h" +#include "npruntime.h" + +class CPlugin +{ +private: + NPP m_pNPInstance; + + NPWindow * m_Window; + + NPBool m_bInitialized; + + NPObject *m_pScriptableObject; + +public: + CPlugin(NPP pNPInstance); + ~CPlugin(); + + NPBool init(NPWindow* pNPWindow); + void shut(); + NPBool isInitialized(); + + int16 handleEvent(void* event); + + NPObject *GetScriptableObject(); +}; + +#endif // __PLUGIN_H__ diff --git a/Src/nprt_plugin/resource.h b/Src/nprt_plugin/resource.h new file mode 100644 index 00000000..9a21b16a --- /dev/null +++ b/Src/nprt_plugin/resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by nprt.rc +// +#define IDD_MAIN 101 +#define IDC_BUTTON_GO 1002 +#define IDC_STATIC_UA 1003 +#define IDC_BUTTON1 1005 +#define IDC_BUTTON_DONT 1005 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1006 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Src/nprt_plugin/test.html b/Src/nprt_plugin/test.html new file mode 100644 index 00000000..fbb8b3fd --- /dev/null +++ b/Src/nprt_plugin/test.html @@ -0,0 +1,30 @@ +<HTML> +<HEAD> +<TITLE>Scriptable Plug-in Test</TITLE> +</HEAD> +<BODY id="bodyId"> + +<center> +<h1>Scriptable Plug-in </h1> +</center> + +<br><br> + +<center> + +<embed id="pluginobj" type="application/x-winampx-1.0.0.1" width=600 height=0><br> + +<script> +var pluginobj = document.getElementById('pluginobj'); +</script> + +<br> +<form name="formname"> +<br> +<input type=button value="alert(pluginobj.getVersion())" onclick='alert(pluginobj.getVersion())'> +</form> + +</center> + +</BODY> +</HTML> |