/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/xpcom/ds/nsIWritablePropertyBag.idl */ #ifndef __gen_nsIWritablePropertyBag_h__ #define __gen_nsIWritablePropertyBag_h__ #include "nsIPropertyBag.h" #include "js/GCAnnotations.h" /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif /* starting interface: nsIWritablePropertyBag */ #define NS_IWRITABLEPROPERTYBAG_IID_STR "96fc4671-eeb4-4823-9421-e50fb70ad353" #define NS_IWRITABLEPROPERTYBAG_IID \ {0x96fc4671, 0xeeb4, 0x4823, \ { 0x94, 0x21, 0xe5, 0x0f, 0xb7, 0x0a, 0xd3, 0x53 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWritablePropertyBag) nsIWritablePropertyBag : public nsIPropertyBag { public: NS_INLINE_DECL_STATIC_IID(NS_IWRITABLEPROPERTYBAG_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWritablePropertyBag; /* void setProperty (in AString name, in nsIVariant value); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWritablePropertyBag_setProperty) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetProperty(const nsAString& name, nsIVariant *value) = 0; /* void deleteProperty (in AString name); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWritablePropertyBag_deleteProperty) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD DeleteProperty(const nsAString& name) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWRITABLEPROPERTYBAG \ NS_IMETHOD SetProperty(const nsAString& name, nsIVariant *value) override; \ NS_IMETHOD DeleteProperty(const nsAString& name) 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_NSIWRITABLEPROPERTYBAG \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWritablePropertyBag_setProperty)\ nsresult SetProperty(const nsAString& name, nsIVariant *value); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWritablePropertyBag_deleteProperty)\ nsresult DeleteProperty(const nsAString& name); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWRITABLEPROPERTYBAG(_to) \ NS_IMETHOD SetProperty(const nsAString& name, nsIVariant *value) override { return _to SetProperty(name, value); } \ NS_IMETHOD DeleteProperty(const nsAString& name) override { return _to DeleteProperty(name); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG(_to) \ NS_IMETHOD SetProperty(const nsAString& name, nsIVariant *value) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProperty(name, value); } \ NS_IMETHOD DeleteProperty(const nsAString& name) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteProperty(name); } #endif /* __gen_nsIWritablePropertyBag_h__ */