3567N/A/* ***** BEGIN LICENSE BLOCK ***** 3349N/A * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3349N/A * The contents of this file are subject to the Mozilla Public License Version 3349N/A * 1.1 (the "License"); you may not use this file except in compliance with 3349N/A * the License. You may obtain a copy of the License at 3349N/A * Software distributed under the License is distributed on an "AS IS" basis, 3349N/A * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 3349N/A * for the specific language governing rights and limitations under the 3349N/A * The Original Code is Java XPCOM Bindings. 3349N/A * The Initial Developer of the Original Code is 3349N/A * Portions created by the Initial Developer are Copyright (C) 2005 3349N/A * IBM Corporation. All Rights Reserved. 3349N/A * Javier Pedemonte (jhpedemonte@gmail.com) 3349N/A * Alternatively, the contents of this file may be used under the terms of 3349N/A * either the GNU General Public License Version 2 or later (the "GPL"), or 3349N/A * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 3349N/A * in which case the provisions of the GPL or the LGPL are applicable instead 3349N/A * of those above. If you wish to allow use of your version of this file only 3349N/A * under the terms of either the GPL or the LGPL, and not to allow others to 3349N/A * use your version of this file under the terms of the MPL, indicate your 3349N/A * decision by deleting the provisions above and replace them with the notice 3349N/A * and other provisions required by the GPL or the LGPL. If you do not delete 3349N/A * the provisions above, a recipient may use your version of this file under 3349N/A * the terms of any one of the MPL, the GPL or the LGPL. 3349N/A * ***** END LICENSE BLOCK ***** */ 3349N/A//#define DEBUG_JAVAXPCOM_REFCNT 3349N/A// The Java garbage collector runs in a separate thread. Since it calls the 3349N/A// all the structures touched by finalizeProxy() are multithread aware. 3349N/A * Initialize global structures used by JavaXPCOM. 3349N/A * @param env Java environment pointer 3349N/A * @return PR_TRUE if JavaXPCOM is initialized; PR_FALSE if an error occurred 3349N/A * Frees global structures that were allocated by InitializeJavaGlobals(). 3349N/A * @param env Java environment pointer 3349N/A/************************************** 3349N/A * Java<->XPCOM object mappings 3349N/A **************************************/ 3349N/A * Maps native XPCOM objects to their associated Java proxy object. 3349N/A "MUST call Destroy() before deleting object");
3349N/A * Maps Java objects to their associated nsJavaXPTCStub. 3349N/A "MUST call Destroy() before deleting object");
3349N/A/******************************* 3349N/A *******************************/ 3349N/A * Convert a native nsISupports to a Java object. 3349N/A * @param env Java environment pointer 3349N/A * @param aIID desired interface IID for Java object 3349N/A * @param aObjectLoader Java object whose class loader we use for finding 3349N/A * @param aResult on success, holds reference to Java object 3349N/A * @return NS_OK if succeeded; all other return values are error codes. 3349N/A * Convert a Java object to a native nsISupports object. 3349N/A * @param env Java environment pointer 3349N/A * @param aIID desired interface IID for XPCOM object 3349N/A * @param aResult on success, holds AddRef'd reference to XPCOM object 3349N/A * @return NS_OK if succeeded; all other return values are error codes. 3349N/A * Returns the Class object associated with the class or interface with the 3349N/A * given string name, using the class loader of the given object. 3349N/A * @param env Java environment pointer 3349N/A * @param aObjectLoader Java object whose class loader is used to load class 3349N/A * @param aClassName fully qualified name of class to load 3349N/A * @return java.lang.Class object of requested Class; NULL if the class 3349N/A/******************************* 3349N/A *******************************/ 3349N/A * Returns a pointer to the appropriate JNIEnv structure. This function is 3349N/A * useful in callbacks or other functions that are not called directly from 3349N/A * Java and therefore do not have the JNIEnv structure passed in. 3349N/A * @return pointer to JNIEnv structure for current thread 3349N/A * Constructs and throws an exception. Some error codes (such as 3349N/A * Otherwise, an instance of XPCOMException is created with the given error 3349N/A * @param env Java environment pointer 3349N/A * zero for the default behaviour. 3349N/A * @param aMessage A string that provides details for throwing this 3349N/A * exception. Pass in <code>nsnull</code> for the default 3349N/A * @throws OutOfMemoryError if aErrorCode == NS_ERROR_OUT_OF_MEMORY 3349N/A * XPCOMException for all other error codes 3349N/A * Helper functions for converting from java.lang.String to 3349N/A * @param env Java environment pointer 3349N/A * @param aString Java string to convert 3349N/A * <code>null</code>; or <code>nsnull</code> if out of memory 3349N/A * Helper function for converting from java.io.File to nsILocalFile. 3349N/A * @param env Java environment pointer 3349N/A * @param aFile Java File to convert 3349N/A * @param aLocalFile returns the converted nsILocalFile 3349N/A * @return NS_OK for success; other values indicate error in conversion 3349N/A#
endif // _nsJavaXPCOMBindingUtils_h_