Bug 1928997: Update tabs icon in Unified Search popup r=desktop-theme-reviewers,daleh...
[gecko.git] / js / xpconnect / public / xpc_map_end.h
blob7b0532bf65b987bbca5ffad5c814f22b98ad6227
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 // If you include this file you must also include xpc_make_class.h at the top
8 // of the file doing the including.
10 #ifndef XPC_MAP_CLASSNAME
11 # error "Must #define XPC_MAP_CLASSNAME before #including xpc_map_end.h"
12 #endif
14 #ifndef XPC_MAP_QUOTED_CLASSNAME
15 # error "Must #define XPC_MAP_QUOTED_CLASSNAME before #including xpc_map_end.h"
16 #endif
18 #ifndef XPC_MAP_FLAGS
19 # error "Must #define XPC_MAP_FLAGS before #including xpc_map_end.h"
20 #endif
22 #include "js/Id.h"
24 /**************************************************************/
26 NS_IMETHODIMP XPC_MAP_CLASSNAME::GetClassName(nsACString& aClassName) {
27 aClassName.AssignLiteral(XPC_MAP_QUOTED_CLASSNAME);
28 return NS_OK;
31 /**************************************************************/
33 // virtual
34 uint32_t XPC_MAP_CLASSNAME::GetScriptableFlags() { return (XPC_MAP_FLAGS); }
36 // virtual
37 const JSClass* XPC_MAP_CLASSNAME::GetJSClass() {
38 static const JSClassOps classOps = XPC_MAKE_CLASS_OPS(GetScriptableFlags());
39 static const JSClass klass =
40 XPC_MAKE_CLASS(XPC_MAP_QUOTED_CLASSNAME, GetScriptableFlags(), &classOps);
41 return &klass;
44 /**************************************************************/
46 #if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_PRECREATE)
47 NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports* nativeObj,
48 JSContext* cx, JSObject* globalObj,
49 JSObject** parentObj) {
50 NS_ERROR("never called");
51 return NS_ERROR_NOT_IMPLEMENTED;
53 #endif
55 #if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_NEWENUMERATE)
56 NS_IMETHODIMP XPC_MAP_CLASSNAME::NewEnumerate(
57 nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* obj,
58 JS::MutableHandleIdVector properties, bool enumerableOnly, bool* _retval) {
59 NS_ERROR("never called");
60 return NS_ERROR_NOT_IMPLEMENTED;
62 #endif
64 #if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_RESOLVE)
65 NS_IMETHODIMP XPC_MAP_CLASSNAME::Resolve(nsIXPConnectWrappedNative* wrapper,
66 JSContext* cx, JSObject* obj, jsid id,
67 bool* resolvedp, bool* _retval) {
68 NS_ERROR("never called");
69 return NS_ERROR_NOT_IMPLEMENTED;
71 #endif
73 #if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_FINALIZE)
74 NS_IMETHODIMP XPC_MAP_CLASSNAME::Finalize(nsIXPConnectWrappedNative* wrapper,
75 JS::GCContext* gcx, JSObject* obj) {
76 NS_ERROR("never called");
77 return NS_ERROR_NOT_IMPLEMENTED;
79 #endif
81 #if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_CALL)
82 NS_IMETHODIMP XPC_MAP_CLASSNAME::Call(nsIXPConnectWrappedNative* wrapper,
83 JSContext* cx, JSObject* obj,
84 const JS::CallArgs& args, bool* _retval) {
85 NS_ERROR("never called");
86 return NS_ERROR_NOT_IMPLEMENTED;
88 #endif
90 #if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_CONSTRUCT)
91 NS_IMETHODIMP XPC_MAP_CLASSNAME::Construct(nsIXPConnectWrappedNative* wrapper,
92 JSContext* cx, JSObject* obj,
93 const JS::CallArgs& args,
94 bool* _retval) {
95 NS_ERROR("never called");
96 return NS_ERROR_NOT_IMPLEMENTED;
98 #endif
100 #if !((XPC_MAP_FLAGS) & XPC_SCRIPTABLE_WANT_HASINSTANCE)
101 NS_IMETHODIMP XPC_MAP_CLASSNAME::HasInstance(nsIXPConnectWrappedNative* wrapper,
102 JSContext* cx, JSObject* obj,
103 JS::HandleValue val, bool* bp,
104 bool* _retval) {
105 NS_ERROR("never called");
106 return NS_ERROR_NOT_IMPLEMENTED;
108 #endif
110 /**************************************************************/
112 #undef XPC_MAP_CLASSNAME
113 #undef XPC_MAP_QUOTED_CLASSNAME
114 #undef XPC_MAP_FLAGS