Back to index

lightning-sunbird  0.9+nobinonly
xpc_map_end.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is Mozilla Communicator client code, released
00017  * March 31, 1998.
00018  *
00019  * The Initial Developer of the Original Code is
00020  * Netscape Communications Corporation.
00021  * Portions created by the Initial Developer are Copyright (C) 1998
00022  * the Initial Developer. All Rights Reserved.
00023  *
00024  * Contributor(s):
00025  *   John Bandhauer <jband@netscape.com>
00026  *
00027  * Alternatively, the contents of this file may be used under the terms of
00028  * either of the GNU General Public License Version 2 or later (the "GPL"),
00029  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00030  * in which case the provisions of the GPL or the LGPL are applicable instead
00031  * of those above. If you wish to allow use of your version of this file only
00032  * under the terms of either the GPL or the LGPL, and not to allow others to
00033  * use your version of this file under the terms of the MPL, indicate your
00034  * decision by deleting the provisions above and replace them with the notice
00035  * and other provisions required by the GPL or the LGPL. If you do not delete
00036  * the provisions above, a recipient may use your version of this file under
00037  * the terms of any one of the MPL, the GPL or the LGPL.
00038  *
00039  * ***** END LICENSE BLOCK ***** */
00040 
00041 
00042 #ifndef XPC_MAP_CLASSNAME
00043 #error "Must #define XPC_MAP_CLASSNAME before #including xpc_map_end.h"
00044 #endif
00045 
00046 #ifndef XPC_MAP_QUOTED_CLASSNAME
00047 #error "Must #define XPC_MAP_QUOTED_CLASSNAME before #including xpc_map_end.h"
00048 #endif
00049 
00050 /**************************************************************/
00051 
00052 NS_IMETHODIMP XPC_MAP_CLASSNAME::GetClassName(char * *aClassName)
00053 {
00054     static const char sName[] = XPC_MAP_QUOTED_CLASSNAME;
00055     *aClassName = (char*) nsMemory::Clone(sName, sizeof(sName));
00056     return NS_OK;
00057 }
00058 
00059 /**************************************************************/
00060 
00061 NS_IMETHODIMP XPC_MAP_CLASSNAME::GetScriptableFlags(PRUint32 *aFlags)
00062 {
00063     *aFlags =
00064 #ifdef XPC_MAP_WANT_PRECREATE
00065     nsIXPCScriptable::WANT_PRECREATE |
00066 #endif
00067 #ifdef XPC_MAP_WANT_CREATE
00068     nsIXPCScriptable::WANT_CREATE |
00069 #endif
00070 #ifdef XPC_MAP_WANT_POSTCREATE
00071     nsIXPCScriptable::WANT_POSTCREATE |
00072 #endif
00073 #ifdef XPC_MAP_WANT_ADDPROPERTY
00074     nsIXPCScriptable::WANT_ADDPROPERTY |
00075 #endif
00076 #ifdef XPC_MAP_WANT_DELPROPERTY
00077     nsIXPCScriptable::WANT_DELPROPERTY |
00078 #endif
00079 #ifdef XPC_MAP_WANT_GETPROPERTY
00080     nsIXPCScriptable::WANT_GETPROPERTY |
00081 #endif
00082 #ifdef XPC_MAP_WANT_SETPROPERTY
00083     nsIXPCScriptable::WANT_SETPROPERTY |
00084 #endif
00085 #ifdef XPC_MAP_WANT_ENUMERATE
00086     nsIXPCScriptable::WANT_ENUMERATE |
00087 #endif
00088 #ifdef XPC_MAP_WANT_NEWENUMERATE
00089     nsIXPCScriptable::WANT_NEWENUMERATE |
00090 #endif
00091 #ifdef XPC_MAP_WANT_NEWRESOLVE
00092     nsIXPCScriptable::WANT_NEWRESOLVE |
00093 #endif
00094 #ifdef XPC_MAP_WANT_CONVERT
00095     nsIXPCScriptable::WANT_CONVERT |
00096 #endif
00097 #ifdef XPC_MAP_WANT_FINALIZE
00098     nsIXPCScriptable::WANT_FINALIZE |
00099 #endif
00100 #ifdef XPC_MAP_WANT_CHECKACCESS
00101     nsIXPCScriptable::WANT_CHECKACCESS |
00102 #endif
00103 #ifdef XPC_MAP_WANT_CALL
00104     nsIXPCScriptable::WANT_CALL |
00105 #endif
00106 #ifdef XPC_MAP_WANT_CONSTRUCT
00107     nsIXPCScriptable::WANT_CONSTRUCT |
00108 #endif
00109 #ifdef XPC_MAP_WANT_HASINSTANCE
00110     nsIXPCScriptable::WANT_HASINSTANCE |
00111 #endif
00112 #ifdef XPC_MAP_WANT_MARK
00113     nsIXPCScriptable::WANT_MARK |
00114 #endif
00115 #ifdef XPC_MAP_WANT_EQUALITY
00116     nsIXPCScriptable::WANT_EQUALITY |
00117 #endif
00118 #ifdef XPC_MAP_WANT_OUTER_OBJECT
00119     nsIXPCScriptable::WANT_OUTER_OBJECT |
00120 #endif
00121 #ifdef XPC_MAP_WANT_INNER_OBJECT
00122     nsIXPCScriptable::WANT_INNER_OBJECT |
00123 #endif
00124 
00125 #ifdef XPC_MAP_FLAGS
00126     XPC_MAP_FLAGS |
00127 #endif
00128     0;
00129     return NS_OK;
00130 }
00131 
00132 /**************************************************************/
00133 
00134 #ifndef XPC_MAP_WANT_PRECREATE
00135 /* void preCreate (in nsISupports nativeObj, in JSContextPtr cx, in JSObjectPtr globalObj, out JSObjectPtr parentObj); */
00136 NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports *nativeObj, JSContext * cx, JSObject * globalObj, JSObject * *parentObj)
00137     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00138 #endif
00139 
00140 #ifndef XPC_MAP_WANT_CREATE
00141 NS_IMETHODIMP XPC_MAP_CLASSNAME::Create(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj)
00142     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00143 #endif
00144 
00145 #ifndef XPC_MAP_WANT_POSTCREATE
00146 NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreate(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj)
00147     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00148 #endif
00149 
00150 #ifndef XPC_MAP_WANT_ADDPROPERTY
00151 NS_IMETHODIMP XPC_MAP_CLASSNAME::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsval id, jsval * vp, PRBool *_retval)
00152     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00153 #endif
00154 
00155 #ifndef XPC_MAP_WANT_DELPROPERTY
00156 NS_IMETHODIMP XPC_MAP_CLASSNAME::DelProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsval id, jsval * vp, PRBool *_retval)
00157     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00158 #endif
00159 
00160 #ifndef XPC_MAP_WANT_GETPROPERTY
00161 NS_IMETHODIMP XPC_MAP_CLASSNAME::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsval id, jsval * vp, PRBool *_retval)
00162     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00163 #endif
00164 
00165 #ifndef XPC_MAP_WANT_SETPROPERTY
00166 NS_IMETHODIMP XPC_MAP_CLASSNAME::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsval id, jsval * vp, PRBool *_retval)
00167     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00168 #endif
00169 
00170 #ifndef XPC_MAP_WANT_NEWENUMERATE
00171 NS_IMETHODIMP XPC_MAP_CLASSNAME::NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, PRUint32 enum_op, jsval * statep, jsid * idp, PRBool *_retval)
00172     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00173 #endif
00174 
00175 #ifndef XPC_MAP_WANT_ENUMERATE
00176 NS_IMETHODIMP XPC_MAP_CLASSNAME::Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, PRBool *_retval)
00177     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00178 #endif
00179 
00180 #ifndef XPC_MAP_WANT_NEWRESOLVE
00181 NS_IMETHODIMP XPC_MAP_CLASSNAME::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsval id, PRUint32 flags, JSObject * *objp, PRBool *_retval)
00182     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00183 #endif
00184 
00185 #ifndef XPC_MAP_WANT_CONVERT
00186 NS_IMETHODIMP XPC_MAP_CLASSNAME::Convert(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, PRUint32 type, jsval * vp, PRBool *_retval)
00187     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00188 #endif
00189 
00190 #ifndef XPC_MAP_WANT_FINALIZE
00191 NS_IMETHODIMP XPC_MAP_CLASSNAME::Finalize(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj)
00192     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00193 #endif
00194 
00195 #ifndef XPC_MAP_WANT_CHECKACCESS
00196 NS_IMETHODIMP XPC_MAP_CLASSNAME::CheckAccess(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsval id, PRUint32 mode, jsval * vp, PRBool *_retval)
00197     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00198 #endif
00199 
00200 #ifndef XPC_MAP_WANT_CALL
00201 NS_IMETHODIMP XPC_MAP_CLASSNAME::Call(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, PRUint32 argc, jsval * argv, jsval * vp, PRBool *_retval)
00202     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00203 #endif
00204 
00205 #ifndef XPC_MAP_WANT_CONSTRUCT
00206 NS_IMETHODIMP XPC_MAP_CLASSNAME::Construct(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, PRUint32 argc, jsval * argv, jsval * vp, PRBool *_retval)
00207     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00208 #endif
00209 
00210 #ifndef XPC_MAP_WANT_HASINSTANCE
00211 NS_IMETHODIMP XPC_MAP_CLASSNAME::HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsval val, PRBool *bp, PRBool *_retval)
00212     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00213 #endif
00214 
00215 #ifndef XPC_MAP_WANT_MARK
00216 NS_IMETHODIMP XPC_MAP_CLASSNAME::Mark(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, void * arg, PRUint32 *_retval)
00217     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00218 #endif
00219 
00220 #ifndef XPC_MAP_WANT_EQUALITY
00221 NS_IMETHODIMP XPC_MAP_CLASSNAME::Equality(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsval val, PRBool *bp)
00222     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00223 #endif
00224 
00225 #ifndef XPC_MAP_WANT_OUTER_OBJECT
00226 NS_IMETHODIMP XPC_MAP_CLASSNAME::OuterObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, JSObject * *_retval)
00227     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00228 #endif
00229 
00230 #ifndef XPC_MAP_WANT_INNER_OBJECT
00231 NS_IMETHODIMP XPC_MAP_CLASSNAME::InnerObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, JSObject * *_retval)
00232     {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
00233 #endif
00234 
00235 /**************************************************************/
00236 
00237 #undef XPC_MAP_CLASSNAME
00238 #undef XPC_MAP_QUOTED_CLASSNAME
00239 
00240 #ifdef XPC_MAP_WANT_PRECREATE
00241 #undef XPC_MAP_WANT_PRECREATE
00242 #endif
00243 
00244 #ifdef XPC_MAP_WANT_CREATE
00245 #undef XPC_MAP_WANT_CREATE
00246 #endif
00247 
00248 #ifdef XPC_MAP_WANT_POSTCREATE
00249 #undef XPC_MAP_WANT_POSTCREATE
00250 #endif
00251 
00252 #ifdef XPC_MAP_WANT_ADDPROPERTY
00253 #undef XPC_MAP_WANT_ADDPROPERTY
00254 #endif
00255 
00256 #ifdef XPC_MAP_WANT_DELPROPERTY
00257 #undef XPC_MAP_WANT_DELPROPERTY
00258 #endif
00259 
00260 #ifdef XPC_MAP_WANT_GETPROPERTY
00261 #undef XPC_MAP_WANT_GETPROPERTY
00262 #endif
00263 
00264 #ifdef XPC_MAP_WANT_SETPROPERTY
00265 #undef XPC_MAP_WANT_SETPROPERTY
00266 #endif
00267 
00268 #ifdef XPC_MAP_WANT_ENUMERATE
00269 #undef XPC_MAP_WANT_ENUMERATE
00270 #endif
00271 
00272 #ifdef XPC_MAP_WANT_NEWENUMERATE
00273 #undef XPC_MAP_WANT_NEWENUMERATE
00274 #endif
00275 
00276 #ifdef XPC_MAP_WANT_NEWRESOLVE
00277 #undef XPC_MAP_WANT_NEWRESOLVE
00278 #endif
00279 
00280 #ifdef XPC_MAP_WANT_CONVERT
00281 #undef XPC_MAP_WANT_CONVERT
00282 #endif
00283 
00284 #ifdef XPC_MAP_WANT_FINALIZE
00285 #undef XPC_MAP_WANT_FINALIZE
00286 #endif
00287 
00288 #ifdef XPC_MAP_WANT_CHECKACCESS
00289 #undef XPC_MAP_WANT_CHECKACCESS
00290 #endif
00291 
00292 #ifdef XPC_MAP_WANT_CALL
00293 #undef XPC_MAP_WANT_CALL
00294 #endif
00295 
00296 #ifdef XPC_MAP_WANT_CONSTRUCT
00297 #undef XPC_MAP_WANT_CONSTRUCT
00298 #endif
00299 
00300 #ifdef XPC_MAP_WANT_HASINSTANCE
00301 #undef XPC_MAP_WANT_HASINSTANCE
00302 #endif
00303 
00304 #ifdef XPC_MAP_WANT_MARK
00305 #undef XPC_MAP_WANT_MARK
00306 #endif
00307 
00308 #ifdef XPC_MAP_WANT_EQUALITY
00309 #undef XPC_MAP_WANT_EQUALITY
00310 #endif
00311 
00312 #ifdef XPC_MAP_WANT_OUTER_OBJECT
00313 #undef XPC_MAP_WANT_OUTER_OBJECT
00314 #endif
00315 
00316 #ifdef XPC_MAP_FLAGS
00317 #undef XPC_MAP_FLAGS
00318 #endif