Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/modules/libpref/nsIPrefOverrideMap.idl
*/
#ifndef __gen_nsIPrefOverrideMap_h__
#define __gen_nsIPrefOverrideMap_h__
#include "nsISupports.h"
#include "nsISupportsPrimitives.h"
#include "js/Value.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: nsIPrefOverrideMap */
#define NS_IPREFOVERRIDEMAP_IID_STR "56ba17e3-4bfd-4804-bdf7-9c6e70170279"
#define NS_IPREFOVERRIDEMAP_IID \
{0x56ba17e3, 0x4bfd, 0x4804, \
{ 0xbd, 0xf7, 0x9c, 0x6e, 0x70, 0x17, 0x02, 0x79 }}
class NS_NO_VTABLE nsIPrefOverrideMap : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IPREFOVERRIDEMAP_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIPrefOverrideMap;
/* [implicit_jscontext] void addEntry (in ACString aPrefName, in jsval aPrefValue); */
NS_IMETHOD AddEntry(const nsACString& aPrefName, JS::Handle<JS::Value> aPrefValue, JSContext* cx) = 0;
/* [implicit_jscontext] jsval getEntry (in ACString aPrefName); */
NS_IMETHOD GetEntry(const nsACString& aPrefName, JSContext* cx, JS::MutableHandle<JS::Value> _retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPREFOVERRIDEMAP \
NS_IMETHOD AddEntry(const nsACString& aPrefName, JS::Handle<JS::Value> aPrefValue, JSContext* cx) override; \
NS_IMETHOD GetEntry(const nsACString& aPrefName, JSContext* cx, JS::MutableHandle<JS::Value> _retval) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIPREFOVERRIDEMAP \
nsresult AddEntry(const nsACString& aPrefName, JS::Handle<JS::Value> aPrefValue, JSContext* cx); \
nsresult GetEntry(const nsACString& aPrefName, JSContext* cx, JS::MutableHandle<JS::Value> _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPREFOVERRIDEMAP(_to) \
NS_IMETHOD AddEntry(const nsACString& aPrefName, JS::Handle<JS::Value> aPrefValue, JSContext* cx) override { return _to AddEntry(aPrefName, aPrefValue, cx); } \
NS_IMETHOD GetEntry(const nsACString& aPrefName, JSContext* cx, JS::MutableHandle<JS::Value> _retval) override { return _to GetEntry(aPrefName, cx, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPREFOVERRIDEMAP(_to) \
NS_IMETHOD AddEntry(const nsACString& aPrefName, JS::Handle<JS::Value> aPrefValue, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEntry(aPrefName, aPrefValue, cx); } \
NS_IMETHOD GetEntry(const nsACString& aPrefName, JSContext* cx, JS::MutableHandle<JS::Value> _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntry(aPrefName, cx, _retval); }
#endif /* __gen_nsIPrefOverrideMap_h__ */