Back to index

lightning-sunbird  0.9+nobinonly
CreateProxyJNI.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
00002  * ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Sun Microsystems, Inc.
00019  * Portions created by the Initial Developer are Copyright (C) 1999
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 #include <nsISecureEnv.h>
00038 
00039 class nsDummySecureEnv : public nsISecureEnv {
00040 public:
00041     nsDummySecureEnv() {}
00042 
00043        //nsISupports interface
00044 
00045     NS_METHOD QueryInterface(const nsIID & uuid, void * *result) { return NS_OK; }
00046 
00047     NS_METHOD_(nsrefcnt) AddRef(void) { return NS_OK; }
00048 
00049     NS_METHOD_(nsrefcnt) Release(void) { return NS_OK; }
00050 
00051 
00052        //nsISecureEnv interface
00053 
00054     NS_METHOD NewObject(/*[in]*/  jclass clazz, 
00055                          /*[in]*/  jmethodID methodID,
00056                          /*[in]*/  jvalue *args, 
00057                          /*[out]*/ jobject* result,
00058                          /*[in]*/  nsISecurityContext* ctx = NULL) { return NS_OK; }
00059    
00060     NS_METHOD CallMethod(/*[in]*/  jni_type type,
00061                           /*[in]*/  jobject obj, 
00062                           /*[in]*/  jmethodID methodID,
00063                           /*[in]*/  jvalue *args, 
00064                           /*[out]*/ jvalue* result,
00065                           /*[in]*/  nsISecurityContext* ctx = NULL) { return NS_OK; }
00066 
00067     NS_METHOD CallNonvirtualMethod(/*[in]*/  jni_type type,
00068                                     /*[in]*/  jobject obj, 
00069                                     /*[in]*/  jclass clazz,
00070                                     /*[in]*/  jmethodID methodID,
00071                                     /*[in]*/  jvalue *args, 
00072                                     /*[out]*/ jvalue* result,
00073                                     /*[in]*/  nsISecurityContext* ctx = NULL) { return NS_OK; }
00074 
00075     NS_METHOD GetField(/*[in]*/  jni_type type,
00076                         /*[in]*/  jobject obj, 
00077                         /*[in]*/  jfieldID fieldID,
00078                         /*[out]*/ jvalue* result,
00079                         /*[in]*/  nsISecurityContext* ctx = NULL) { return NS_OK; }
00080 
00081     NS_METHOD SetField(/*[in]*/ jni_type type,
00082                         /*[in]*/ jobject obj, 
00083                         /*[in]*/ jfieldID fieldID,
00084                         /*[in]*/ jvalue val,
00085                         /*[in]*/ nsISecurityContext* ctx = NULL) { return NS_OK; }
00086 
00087     NS_METHOD CallStaticMethod(/*[in]*/  jni_type type,
00088                                 /*[in]*/  jclass clazz,
00089                                 /*[in]*/  jmethodID methodID,
00090                                 /*[in]*/  jvalue *args, 
00091                                 /*[out]*/ jvalue* result,
00092                                 /*[in]*/  nsISecurityContext* ctx = NULL) { return NS_OK; }
00093 
00094     NS_METHOD GetStaticField(/*[in]*/  jni_type type,
00095                               /*[in]*/  jclass clazz, 
00096                               /*[in]*/  jfieldID fieldID, 
00097                               /*[out]*/ jvalue* result,
00098                               /*[in]*/  nsISecurityContext* ctx = NULL) { return NS_OK; }
00099 
00100 
00101     NS_METHOD SetStaticField(/*[in]*/ jni_type type,
00102                               /*[in]*/ jclass clazz, 
00103                               /*[in]*/ jfieldID fieldID,
00104                               /*[in]*/ jvalue val,
00105                               /*[in]*/ nsISecurityContext* ctx = NULL) { return NS_OK; }
00106 
00107 
00108     NS_METHOD GetVersion(/*[out]*/ jint* version) { return NS_OK; }
00109 
00110     NS_METHOD DefineClass(/*[in]*/  const char* name,
00111                            /*[in]*/  jobject loader,
00112                            /*[in]*/  const jbyte *buf,
00113                            /*[in]*/  jsize len,
00114                            /*[out]*/ jclass* clazz) { return NS_OK; }
00115 
00116     NS_METHOD FindClass(/*[in]*/  const char* name, 
00117                          /*[out]*/ jclass* clazz) { return NS_OK; }
00118 
00119     NS_METHOD GetSuperclass(/*[in]*/  jclass sub,
00120                              /*[out]*/ jclass* super) { return NS_OK; }
00121 
00122     NS_METHOD IsAssignableFrom(/*[in]*/  jclass sub,
00123                                 /*[in]*/  jclass super,
00124                                 /*[out]*/ jboolean* result) { return NS_OK; }
00125 
00126     NS_METHOD Throw(/*[in]*/  jthrowable obj,
00127                      /*[out]*/ jint* result) { return NS_OK; }
00128 
00129     NS_METHOD ThrowNew(/*[in]*/  jclass clazz,
00130                         /*[in]*/  const char *msg,
00131                         /*[out]*/ jint* result) { return NS_OK; }
00132 
00133     NS_METHOD ExceptionOccurred(/*[out]*/ jthrowable* result) { return NS_OK; }
00134 
00135     NS_METHOD ExceptionDescribe(void) { return NS_OK; }
00136 
00137     NS_METHOD ExceptionClear(void) { return NS_OK; }
00138 
00139     NS_METHOD FatalError(/*[in]*/ const char* msg) { return NS_OK; }
00140 
00141     NS_METHOD NewGlobalRef(/*[in]*/  jobject lobj, 
00142                             /*[out]*/ jobject* result) { return NS_OK; }
00143 
00144     NS_METHOD DeleteGlobalRef(/*[in]*/ jobject gref) { return NS_OK; }
00145 
00146     NS_METHOD DeleteLocalRef(/*[in]*/ jobject obj) { return NS_OK; }
00147 
00148     NS_METHOD IsSameObject(/*[in]*/  jobject obj1,
00149                             /*[in]*/  jobject obj2,
00150                             /*[out]*/ jboolean* result) { return NS_OK; }
00151 
00152     NS_METHOD AllocObject(/*[in]*/  jclass clazz,
00153                            /*[out]*/ jobject* result) { return NS_OK; }
00154 
00155     NS_METHOD GetObjectClass(/*[in]*/  jobject obj,
00156                               /*[out]*/ jclass* result) { return NS_OK; }
00157 
00158     NS_METHOD IsInstanceOf(/*[in]*/  jobject obj,
00159                             /*[in]*/  jclass clazz,
00160                             /*[out]*/ jboolean* result) { return NS_OK; }
00161 
00162     NS_METHOD GetMethodID(/*[in]*/  jclass clazz, 
00163                            /*[in]*/  const char* name,
00164                            /*[in]*/  const char* sig,
00165                            /*[out]*/ jmethodID* id) { return NS_OK; }
00166 
00167     NS_METHOD GetFieldID(/*[in]*/  jclass clazz, 
00168                           /*[in]*/  const char* name,
00169                           /*[in]*/  const char* sig,
00170                           /*[out]*/ jfieldID* id) { return NS_OK; }
00171 
00172     NS_METHOD GetStaticMethodID(/*[in]*/  jclass clazz, 
00173                                  /*[in]*/  const char* name,
00174                                  /*[in]*/  const char* sig,
00175                                  /*[out]*/ jmethodID* id) { return NS_OK; }
00176 
00177     NS_METHOD GetStaticFieldID(/*[in]*/  jclass clazz, 
00178                                 /*[in]*/  const char* name,
00179                                 /*[in]*/  const char* sig,
00180                                 /*[out]*/ jfieldID* id) { return NS_OK; }
00181 
00182     NS_METHOD NewString(/*[in]*/  const jchar* unicode,
00183                          /*[in]*/  jsize len,
00184                          /*[out]*/ jstring* result) { return NS_OK; }
00185 
00186     NS_METHOD GetStringLength(/*[in]*/  jstring str,
00187                                /*[out]*/ jsize* result) { return NS_OK; }
00188     
00189     NS_METHOD GetStringChars(/*[in]*/  jstring str,
00190                               /*[in]*/  jboolean *isCopy,
00191                               /*[out]*/ const jchar** result) { return NS_OK; }
00192 
00193     NS_METHOD ReleaseStringChars(/*[in]*/  jstring str,
00194                                   /*[in]*/  const jchar *chars) { return NS_OK; }
00195 
00196     NS_METHOD NewStringUTF(/*[in]*/  const char *utf,
00197                             /*[out]*/ jstring* result) { return NS_OK; }
00198 
00199     NS_METHOD GetStringUTFLength(/*[in]*/  jstring str,
00200                                   /*[out]*/ jsize* result) { return NS_OK; }
00201     
00202     NS_METHOD GetStringUTFChars(/*[in]*/  jstring str,
00203                                  /*[in]*/  jboolean *isCopy,
00204                                  /*[out]*/ const char** result) { return NS_OK; }
00205 
00206     NS_METHOD ReleaseStringUTFChars(/*[in]*/  jstring str,
00207                                      /*[in]*/  const char *chars) { return NS_OK; }
00208 
00209     NS_METHOD GetArrayLength(/*[in]*/  jarray array,
00210                               /*[out]*/ jsize* result) { return NS_OK; }
00211 
00212     NS_METHOD NewObjectArray(/*[in]*/  jsize len,
00213                                    /*[in]*/  jclass clazz,
00214                         /*[in]*/  jobject init,
00215                         /*[out]*/ jobjectArray* result) { return NS_OK; }
00216 
00217     NS_METHOD GetObjectArrayElement(/*[in]*/  jobjectArray array,
00218                                      /*[in]*/  jsize index,
00219                                      /*[out]*/ jobject* result) { return NS_OK; }
00220 
00221     NS_METHOD SetObjectArrayElement(/*[in]*/  jobjectArray array,
00222                                      /*[in]*/  jsize index,
00223                                      /*[in]*/  jobject val) { return NS_OK; }
00224 
00225     NS_METHOD NewArray(/*[in]*/ jni_type element_type,
00226                         /*[in]*/  jsize len,
00227                         /*[out]*/ jarray* result) { return NS_OK; }
00228 
00229     NS_METHOD GetArrayElements(/*[in]*/  jni_type type,
00230                                 /*[in]*/  jarray array,
00231                                 /*[in]*/  jboolean *isCopy,
00232                                 /*[out]*/ void* result) { return NS_OK; }
00233 
00234     NS_METHOD ReleaseArrayElements(/*[in]*/ jni_type type,
00235                                     /*[in]*/ jarray array,
00236                                     /*[in]*/ void *elems,
00237                                     /*[in]*/ jint mode) { return NS_OK; }
00238 
00239 
00240     NS_METHOD GetArrayRegion(/*[in]*/  jni_type type,
00241                               /*[in]*/  jarray array,
00242                               /*[in]*/  jsize start,
00243                               /*[in]*/  jsize len,
00244                               /*[out]*/ void* buf) { return NS_OK; }
00245 
00246     NS_METHOD SetArrayRegion(/*[in]*/  jni_type type,
00247                               /*[in]*/  jarray array,
00248                               /*[in]*/  jsize start,
00249                               /*[in]*/  jsize len,
00250                               /*[in]*/  void* buf) { return NS_OK; }
00251 
00252     NS_METHOD RegisterNatives(/*[in]*/  jclass clazz,
00253                                /*[in]*/  const JNINativeMethod *methods,
00254                                /*[in]*/  jint nMethods,
00255                                /*[out]*/ jint* result) { return NS_OK; }
00256 
00257     NS_METHOD UnregisterNatives(/*[in]*/  jclass clazz,
00258                                  /*[out]*/ jint* result) { return NS_OK; }
00259 
00260     NS_METHOD MonitorEnter(/*[in]*/  jobject obj,
00261                             /*[out]*/ jint* result) { return NS_OK; }
00262 
00263     NS_METHOD MonitorExit(/*[in]*/  jobject obj,
00264                            /*[out]*/ jint* result) { return NS_OK; }
00265 
00266     NS_METHOD GetJavaVM(/*[in]*/  JavaVM **vm,
00267                          /*[out]*/ jint* result) { return NS_OK; }
00268 
00269 };
00270