2014-04-03 11:58:00 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim: set ts=8 sts=4 et sw=4 tw=99: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2012-05-21 11:12:37 +00:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
|
2016-12-13 21:33:46 +00:00
|
|
|
// If you include this file you must also include xpc_make_class.h at the top
|
|
|
|
// of the file doing the including.
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
|
|
|
|
#ifndef XPC_MAP_CLASSNAME
|
|
|
|
#error "Must #define XPC_MAP_CLASSNAME before #including xpc_map_end.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef XPC_MAP_QUOTED_CLASSNAME
|
|
|
|
#error "Must #define XPC_MAP_QUOTED_CLASSNAME before #including xpc_map_end.h"
|
|
|
|
#endif
|
|
|
|
|
2016-12-22 21:30:22 +00:00
|
|
|
#ifndef XPC_MAP_FLAGS
|
|
|
|
#error "Must #define XPC_MAP_FLAGS before #including xpc_map_end.h"
|
|
|
|
#endif
|
|
|
|
|
2013-10-10 22:22:35 +00:00
|
|
|
#include "js/Id.h"
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
/**************************************************************/
|
|
|
|
|
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::GetClassName(char * *aClassName)
|
|
|
|
{
|
|
|
|
static const char sName[] = XPC_MAP_QUOTED_CLASSNAME;
|
|
|
|
*aClassName = (char*) nsMemory::Clone(sName, sizeof(sName));
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************/
|
|
|
|
|
2012-06-17 08:11:16 +00:00
|
|
|
// virtual
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t
|
2012-06-17 08:11:16 +00:00
|
|
|
XPC_MAP_CLASSNAME::GetScriptableFlags()
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{
|
2017-01-23 02:33:58 +00:00
|
|
|
return (XPC_MAP_FLAGS);
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
}
|
|
|
|
|
2016-12-13 21:33:46 +00:00
|
|
|
// virtual
|
|
|
|
const js::Class*
|
|
|
|
XPC_MAP_CLASSNAME::GetClass()
|
|
|
|
{
|
|
|
|
static const js::ClassOps classOps =
|
|
|
|
XPC_MAKE_CLASS_OPS(GetScriptableFlags());
|
|
|
|
static const js::Class klass =
|
|
|
|
XPC_MAKE_CLASS(XPC_MAP_QUOTED_CLASSNAME, GetScriptableFlags(),
|
|
|
|
&classOps);
|
|
|
|
return &klass;
|
|
|
|
}
|
|
|
|
|
2017-01-10 01:47:57 +00:00
|
|
|
// virtual
|
|
|
|
const JSClass*
|
|
|
|
XPC_MAP_CLASSNAME::GetJSClass()
|
|
|
|
{
|
|
|
|
return Jsvalify(GetClass());
|
|
|
|
}
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
/**************************************************************/
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_PRECREATE)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports* nativeObj, JSContext * cx, JSObject * globalObj, JSObject * *parentObj)
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_GETPROPERTY)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::GetProperty(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool* _retval)
|
2007-07-11 00:27:57 +00:00
|
|
|
{NS_WARNING("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_SETPROPERTY)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::SetProperty(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool* _retval)
|
2007-07-11 00:27:57 +00:00
|
|
|
{NS_WARNING("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_NEWENUMERATE)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::NewEnumerate(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, JS::AutoIdVector& properties, bool* _retval)
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_ENUMERATE)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::Enumerate(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, bool* _retval)
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_RESOLVE)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::Resolve(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, jsid id, bool* resolvedp, bool* _retval)
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_FINALIZE)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::Finalize(nsIXPConnectWrappedNative* wrapper, JSFreeOp * fop, JSObject * obj)
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_CALL)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::Call(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, const JS::CallArgs& args, bool* _retval)
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_CONSTRUCT)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::Construct(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, const JS::CallArgs& args, bool* _retval)
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
|
|
|
#endif
|
|
|
|
|
2017-01-23 02:33:58 +00:00
|
|
|
#if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_HASINSTANCE)
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::HasInstance(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, JS::HandleValue val, bool* bp, bool* _retval)
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
{NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;}
|
|
|
|
#endif
|
|
|
|
|
2015-03-28 22:22:11 +00:00
|
|
|
NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreatePrototype(JSContext* cx, JSObject* proto)
|
2008-08-20 02:38:24 +00:00
|
|
|
{return NS_OK;}
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
/**************************************************************/
|
|
|
|
|
|
|
|
#undef XPC_MAP_CLASSNAME
|
|
|
|
#undef XPC_MAP_QUOTED_CLASSNAME
|
|
|
|
#undef XPC_MAP_FLAGS
|