js/xpconnect/public/xpc_map_end.h

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

michael@0 1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0 2 /* vim: set ts=8 sts=4 et sw=4 tw=99: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7
michael@0 8 #ifndef XPC_MAP_CLASSNAME
michael@0 9 #error "Must #define XPC_MAP_CLASSNAME before #including xpc_map_end.h"
michael@0 10 #endif
michael@0 11
michael@0 12 #ifndef XPC_MAP_QUOTED_CLASSNAME
michael@0 13 #error "Must #define XPC_MAP_QUOTED_CLASSNAME before #including xpc_map_end.h"
michael@0 14 #endif
michael@0 15
michael@0 16 #include "js/Id.h"
michael@0 17
michael@0 18 /**************************************************************/
michael@0 19
michael@0 20 NS_IMETHODIMP XPC_MAP_CLASSNAME::GetClassName(char * *aClassName)
michael@0 21 {
michael@0 22 static const char sName[] = XPC_MAP_QUOTED_CLASSNAME;
michael@0 23 *aClassName = (char*) nsMemory::Clone(sName, sizeof(sName));
michael@0 24 return NS_OK;
michael@0 25 }
michael@0 26
michael@0 27 /**************************************************************/
michael@0 28
michael@0 29 // virtual
michael@0 30 uint32_t
michael@0 31 XPC_MAP_CLASSNAME::GetScriptableFlags()
michael@0 32 {
michael@0 33 return
michael@0 34 #ifdef XPC_MAP_WANT_PRECREATE
michael@0 35 nsIXPCScriptable::WANT_PRECREATE |
michael@0 36 #endif
michael@0 37 #ifdef XPC_MAP_WANT_CREATE
michael@0 38 nsIXPCScriptable::WANT_CREATE |
michael@0 39 #endif
michael@0 40 #ifdef XPC_MAP_WANT_POSTCREATE
michael@0 41 nsIXPCScriptable::WANT_POSTCREATE |
michael@0 42 #endif
michael@0 43 #ifdef XPC_MAP_WANT_ADDPROPERTY
michael@0 44 nsIXPCScriptable::WANT_ADDPROPERTY |
michael@0 45 #endif
michael@0 46 #ifdef XPC_MAP_WANT_DELPROPERTY
michael@0 47 nsIXPCScriptable::WANT_DELPROPERTY |
michael@0 48 #endif
michael@0 49 #ifdef XPC_MAP_WANT_GETPROPERTY
michael@0 50 nsIXPCScriptable::WANT_GETPROPERTY |
michael@0 51 #endif
michael@0 52 #ifdef XPC_MAP_WANT_SETPROPERTY
michael@0 53 nsIXPCScriptable::WANT_SETPROPERTY |
michael@0 54 #endif
michael@0 55 #ifdef XPC_MAP_WANT_ENUMERATE
michael@0 56 nsIXPCScriptable::WANT_ENUMERATE |
michael@0 57 #endif
michael@0 58 #ifdef XPC_MAP_WANT_NEWENUMERATE
michael@0 59 nsIXPCScriptable::WANT_NEWENUMERATE |
michael@0 60 #endif
michael@0 61 #ifdef XPC_MAP_WANT_NEWRESOLVE
michael@0 62 nsIXPCScriptable::WANT_NEWRESOLVE |
michael@0 63 #endif
michael@0 64 #ifdef XPC_MAP_WANT_CONVERT
michael@0 65 nsIXPCScriptable::WANT_CONVERT |
michael@0 66 #endif
michael@0 67 #ifdef XPC_MAP_WANT_FINALIZE
michael@0 68 nsIXPCScriptable::WANT_FINALIZE |
michael@0 69 #endif
michael@0 70 #ifdef XPC_MAP_WANT_CALL
michael@0 71 nsIXPCScriptable::WANT_CALL |
michael@0 72 #endif
michael@0 73 #ifdef XPC_MAP_WANT_CONSTRUCT
michael@0 74 nsIXPCScriptable::WANT_CONSTRUCT |
michael@0 75 #endif
michael@0 76 #ifdef XPC_MAP_WANT_HASINSTANCE
michael@0 77 nsIXPCScriptable::WANT_HASINSTANCE |
michael@0 78 #endif
michael@0 79 #ifdef XPC_MAP_WANT_OUTER_OBJECT
michael@0 80 nsIXPCScriptable::WANT_OUTER_OBJECT |
michael@0 81 #endif
michael@0 82 #ifdef XPC_MAP_FLAGS
michael@0 83 XPC_MAP_FLAGS |
michael@0 84 #endif
michael@0 85 0;
michael@0 86 }
michael@0 87
michael@0 88 /**************************************************************/
michael@0 89
michael@0 90 #ifndef XPC_MAP_WANT_PRECREATE
michael@0 91 /* void preCreate (in nsISupports nativeObj, in JSContextPtr cx, in JSObjectPtr globalObj, out JSObjectPtr parentObj); */
michael@0 92 NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports *nativeObj, JSContext * cx, JSObject * globalObj, JSObject * *parentObj)
michael@0 93 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 94 #endif
michael@0 95
michael@0 96 #ifndef XPC_MAP_WANT_CREATE
michael@0 97 NS_IMETHODIMP XPC_MAP_CLASSNAME::Create(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj)
michael@0 98 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 99 #endif
michael@0 100
michael@0 101 #ifndef XPC_MAP_WANT_POSTCREATE
michael@0 102 NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreate(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj)
michael@0 103 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 104
michael@0 105 NS_IMETHODIMP XPC_MAP_CLASSNAME::PostTransplant(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj)
michael@0 106 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 107 #endif
michael@0 108
michael@0 109 #ifndef XPC_MAP_WANT_ADDPROPERTY
michael@0 110 NS_IMETHODIMP XPC_MAP_CLASSNAME::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool *_retval)
michael@0 111 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 112 #endif
michael@0 113
michael@0 114 #ifndef XPC_MAP_WANT_DELPROPERTY
michael@0 115 NS_IMETHODIMP XPC_MAP_CLASSNAME::DelProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, bool *_retval)
michael@0 116 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 117 #endif
michael@0 118
michael@0 119 #ifndef XPC_MAP_WANT_GETPROPERTY
michael@0 120 NS_IMETHODIMP XPC_MAP_CLASSNAME::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool *_retval)
michael@0 121 {NS_WARNING("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 122 #endif
michael@0 123
michael@0 124 #ifndef XPC_MAP_WANT_SETPROPERTY
michael@0 125 NS_IMETHODIMP XPC_MAP_CLASSNAME::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool *_retval)
michael@0 126 {NS_WARNING("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 127 #endif
michael@0 128
michael@0 129 #ifndef XPC_MAP_WANT_NEWENUMERATE
michael@0 130 NS_IMETHODIMP XPC_MAP_CLASSNAME::NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, uint32_t enum_op, JS::Value * statep, jsid * idp, bool *_retval)
michael@0 131 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 132 #endif
michael@0 133
michael@0 134 #ifndef XPC_MAP_WANT_ENUMERATE
michael@0 135 NS_IMETHODIMP XPC_MAP_CLASSNAME::Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, bool *_retval)
michael@0 136 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 137 #endif
michael@0 138
michael@0 139 #ifndef XPC_MAP_WANT_NEWRESOLVE
michael@0 140 NS_IMETHODIMP XPC_MAP_CLASSNAME::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JSObject * *objp, bool *_retval)
michael@0 141 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 142 #endif
michael@0 143
michael@0 144 #ifndef XPC_MAP_WANT_CONVERT
michael@0 145 NS_IMETHODIMP XPC_MAP_CLASSNAME::Convert(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, uint32_t type, JS::Value * vp, bool *_retval)
michael@0 146 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 147 #endif
michael@0 148
michael@0 149 #ifndef XPC_MAP_WANT_FINALIZE
michael@0 150 NS_IMETHODIMP XPC_MAP_CLASSNAME::Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp * fop, JSObject * obj)
michael@0 151 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 152 #endif
michael@0 153
michael@0 154 #ifndef XPC_MAP_WANT_CALL
michael@0 155 NS_IMETHODIMP XPC_MAP_CLASSNAME::Call(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, const JS::CallArgs &args, bool *_retval)
michael@0 156 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 157 #endif
michael@0 158
michael@0 159 #ifndef XPC_MAP_WANT_CONSTRUCT
michael@0 160 NS_IMETHODIMP XPC_MAP_CLASSNAME::Construct(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, const JS::CallArgs &args, bool *_retval)
michael@0 161 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 162 #endif
michael@0 163
michael@0 164 #ifndef XPC_MAP_WANT_HASINSTANCE
michael@0 165 NS_IMETHODIMP XPC_MAP_CLASSNAME::HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, JS::HandleValue val, bool *bp, bool *_retval)
michael@0 166 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 167 #endif
michael@0 168
michael@0 169 #ifndef XPC_MAP_WANT_OUTER_OBJECT
michael@0 170 NS_IMETHODIMP XPC_MAP_CLASSNAME::OuterObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, JSObject * *_retval)
michael@0 171 {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
michael@0 172 #endif
michael@0 173
michael@0 174 #ifndef XPC_MAP_WANT_POST_CREATE_PROTOTYPE
michael@0 175 NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreatePrototype(JSContext *cx, JSObject *proto)
michael@0 176 {return NS_OK;}
michael@0 177 #endif
michael@0 178
michael@0 179 /**************************************************************/
michael@0 180
michael@0 181 #undef XPC_MAP_CLASSNAME
michael@0 182 #undef XPC_MAP_QUOTED_CLASSNAME
michael@0 183
michael@0 184 #ifdef XPC_MAP_WANT_PRECREATE
michael@0 185 #undef XPC_MAP_WANT_PRECREATE
michael@0 186 #endif
michael@0 187
michael@0 188 #ifdef XPC_MAP_WANT_CREATE
michael@0 189 #undef XPC_MAP_WANT_CREATE
michael@0 190 #endif
michael@0 191
michael@0 192 #ifdef XPC_MAP_WANT_POSTCREATE
michael@0 193 #undef XPC_MAP_WANT_POSTCREATE
michael@0 194 #endif
michael@0 195
michael@0 196 #ifdef XPC_MAP_WANT_ADDPROPERTY
michael@0 197 #undef XPC_MAP_WANT_ADDPROPERTY
michael@0 198 #endif
michael@0 199
michael@0 200 #ifdef XPC_MAP_WANT_DELPROPERTY
michael@0 201 #undef XPC_MAP_WANT_DELPROPERTY
michael@0 202 #endif
michael@0 203
michael@0 204 #ifdef XPC_MAP_WANT_GETPROPERTY
michael@0 205 #undef XPC_MAP_WANT_GETPROPERTY
michael@0 206 #endif
michael@0 207
michael@0 208 #ifdef XPC_MAP_WANT_SETPROPERTY
michael@0 209 #undef XPC_MAP_WANT_SETPROPERTY
michael@0 210 #endif
michael@0 211
michael@0 212 #ifdef XPC_MAP_WANT_ENUMERATE
michael@0 213 #undef XPC_MAP_WANT_ENUMERATE
michael@0 214 #endif
michael@0 215
michael@0 216 #ifdef XPC_MAP_WANT_NEWENUMERATE
michael@0 217 #undef XPC_MAP_WANT_NEWENUMERATE
michael@0 218 #endif
michael@0 219
michael@0 220 #ifdef XPC_MAP_WANT_NEWRESOLVE
michael@0 221 #undef XPC_MAP_WANT_NEWRESOLVE
michael@0 222 #endif
michael@0 223
michael@0 224 #ifdef XPC_MAP_WANT_CONVERT
michael@0 225 #undef XPC_MAP_WANT_CONVERT
michael@0 226 #endif
michael@0 227
michael@0 228 #ifdef XPC_MAP_WANT_FINALIZE
michael@0 229 #undef XPC_MAP_WANT_FINALIZE
michael@0 230 #endif
michael@0 231
michael@0 232 #ifdef XPC_MAP_WANT_CALL
michael@0 233 #undef XPC_MAP_WANT_CALL
michael@0 234 #endif
michael@0 235
michael@0 236 #ifdef XPC_MAP_WANT_CONSTRUCT
michael@0 237 #undef XPC_MAP_WANT_CONSTRUCT
michael@0 238 #endif
michael@0 239
michael@0 240 #ifdef XPC_MAP_WANT_HASINSTANCE
michael@0 241 #undef XPC_MAP_WANT_HASINSTANCE
michael@0 242 #endif
michael@0 243
michael@0 244 #ifdef XPC_MAP_WANT_OUTER_OBJECT
michael@0 245 #undef XPC_MAP_WANT_OUTER_OBJECT
michael@0 246 #endif
michael@0 247
michael@0 248 #ifdef XPC_MAP_WANT_POST_CREATE_PROTOTYPE
michael@0 249 #undef XPC_MAP_WANT_POST_CREATE_PROTOTYPE
michael@0 250 #endif
michael@0 251
michael@0 252 #ifdef XPC_MAP_FLAGS
michael@0 253 #undef XPC_MAP_FLAGS
michael@0 254 #endif

mercurial