michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* vim: set ts=8 sts=4 et sw=4 tw=99: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: #ifndef XPC_MAP_CLASSNAME michael@0: #error "Must #define XPC_MAP_CLASSNAME before #including xpc_map_end.h" michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_QUOTED_CLASSNAME michael@0: #error "Must #define XPC_MAP_QUOTED_CLASSNAME before #including xpc_map_end.h" michael@0: #endif michael@0: michael@0: #include "js/Id.h" michael@0: michael@0: /**************************************************************/ michael@0: michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::GetClassName(char * *aClassName) michael@0: { michael@0: static const char sName[] = XPC_MAP_QUOTED_CLASSNAME; michael@0: *aClassName = (char*) nsMemory::Clone(sName, sizeof(sName)); michael@0: return NS_OK; michael@0: } michael@0: michael@0: /**************************************************************/ michael@0: michael@0: // virtual michael@0: uint32_t michael@0: XPC_MAP_CLASSNAME::GetScriptableFlags() michael@0: { michael@0: return michael@0: #ifdef XPC_MAP_WANT_PRECREATE michael@0: nsIXPCScriptable::WANT_PRECREATE | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_CREATE michael@0: nsIXPCScriptable::WANT_CREATE | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_POSTCREATE michael@0: nsIXPCScriptable::WANT_POSTCREATE | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_ADDPROPERTY michael@0: nsIXPCScriptable::WANT_ADDPROPERTY | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_DELPROPERTY michael@0: nsIXPCScriptable::WANT_DELPROPERTY | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_GETPROPERTY michael@0: nsIXPCScriptable::WANT_GETPROPERTY | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_SETPROPERTY michael@0: nsIXPCScriptable::WANT_SETPROPERTY | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_ENUMERATE michael@0: nsIXPCScriptable::WANT_ENUMERATE | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_NEWENUMERATE michael@0: nsIXPCScriptable::WANT_NEWENUMERATE | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_NEWRESOLVE michael@0: nsIXPCScriptable::WANT_NEWRESOLVE | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_CONVERT michael@0: nsIXPCScriptable::WANT_CONVERT | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_FINALIZE michael@0: nsIXPCScriptable::WANT_FINALIZE | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_CALL michael@0: nsIXPCScriptable::WANT_CALL | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_CONSTRUCT michael@0: nsIXPCScriptable::WANT_CONSTRUCT | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_HASINSTANCE michael@0: nsIXPCScriptable::WANT_HASINSTANCE | michael@0: #endif michael@0: #ifdef XPC_MAP_WANT_OUTER_OBJECT michael@0: nsIXPCScriptable::WANT_OUTER_OBJECT | michael@0: #endif michael@0: #ifdef XPC_MAP_FLAGS michael@0: XPC_MAP_FLAGS | michael@0: #endif michael@0: 0; michael@0: } michael@0: michael@0: /**************************************************************/ michael@0: michael@0: #ifndef XPC_MAP_WANT_PRECREATE michael@0: /* void preCreate (in nsISupports nativeObj, in JSContextPtr cx, in JSObjectPtr globalObj, out JSObjectPtr parentObj); */ michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports *nativeObj, JSContext * cx, JSObject * globalObj, JSObject * *parentObj) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_CREATE michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::Create(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_POSTCREATE michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreate(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::PostTransplant(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_ADDPROPERTY michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_DELPROPERTY michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::DelProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, bool *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_GETPROPERTY michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool *_retval) michael@0: {NS_WARNING("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_SETPROPERTY michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool *_retval) michael@0: {NS_WARNING("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_NEWENUMERATE michael@0: 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: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_ENUMERATE michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, bool *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_NEWRESOLVE michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JSObject * *objp, bool *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_CONVERT michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::Convert(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, uint32_t type, JS::Value * vp, bool *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_FINALIZE michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp * fop, JSObject * obj) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_CALL michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::Call(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, const JS::CallArgs &args, bool *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_CONSTRUCT michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::Construct(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, const JS::CallArgs &args, bool *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_HASINSTANCE michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, JS::HandleValue val, bool *bp, bool *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_OUTER_OBJECT michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::OuterObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, JSObject * *_retval) michael@0: {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} michael@0: #endif michael@0: michael@0: #ifndef XPC_MAP_WANT_POST_CREATE_PROTOTYPE michael@0: NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreatePrototype(JSContext *cx, JSObject *proto) michael@0: {return NS_OK;} michael@0: #endif michael@0: michael@0: /**************************************************************/ michael@0: michael@0: #undef XPC_MAP_CLASSNAME michael@0: #undef XPC_MAP_QUOTED_CLASSNAME michael@0: michael@0: #ifdef XPC_MAP_WANT_PRECREATE michael@0: #undef XPC_MAP_WANT_PRECREATE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_CREATE michael@0: #undef XPC_MAP_WANT_CREATE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_POSTCREATE michael@0: #undef XPC_MAP_WANT_POSTCREATE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_ADDPROPERTY michael@0: #undef XPC_MAP_WANT_ADDPROPERTY michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_DELPROPERTY michael@0: #undef XPC_MAP_WANT_DELPROPERTY michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_GETPROPERTY michael@0: #undef XPC_MAP_WANT_GETPROPERTY michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_SETPROPERTY michael@0: #undef XPC_MAP_WANT_SETPROPERTY michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_ENUMERATE michael@0: #undef XPC_MAP_WANT_ENUMERATE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_NEWENUMERATE michael@0: #undef XPC_MAP_WANT_NEWENUMERATE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_NEWRESOLVE michael@0: #undef XPC_MAP_WANT_NEWRESOLVE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_CONVERT michael@0: #undef XPC_MAP_WANT_CONVERT michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_FINALIZE michael@0: #undef XPC_MAP_WANT_FINALIZE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_CALL michael@0: #undef XPC_MAP_WANT_CALL michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_CONSTRUCT michael@0: #undef XPC_MAP_WANT_CONSTRUCT michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_HASINSTANCE michael@0: #undef XPC_MAP_WANT_HASINSTANCE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_OUTER_OBJECT michael@0: #undef XPC_MAP_WANT_OUTER_OBJECT michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_WANT_POST_CREATE_PROTOTYPE michael@0: #undef XPC_MAP_WANT_POST_CREATE_PROTOTYPE michael@0: #endif michael@0: michael@0: #ifdef XPC_MAP_FLAGS michael@0: #undef XPC_MAP_FLAGS michael@0: #endif