/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/xpcom/ds/nsIPersistentProperties2.idl */ #ifndef __gen_nsIPersistentProperties2_h__ #define __gen_nsIPersistentProperties2_h__ #include "nsIProperties.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 class nsIInputStream; /* forward declaration */ class nsIOutputStream; /* forward declaration */ class nsISimpleEnumerator; /* forward declaration */ // %{C++:12-12 #include "mozilla/MemoryReporting.h" // %} /* starting interface: nsIPropertyElement */ #define NS_IPROPERTYELEMENT_IID_STR "283ee646-1aef-11d4-98b3-00c04fa0ce9a" #define NS_IPROPERTYELEMENT_IID \ {0x283ee646, 0x1aef, 0x11d4, \ { 0x98, 0xb3, 0x00, 0xc0, 0x4f, 0xa0, 0xce, 0x9a }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIPropertyElement) nsIPropertyElement : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IPROPERTYELEMENT_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIPropertyElement; /* attribute AUTF8String key; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIPropertyElement_key) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetKey(nsACString& aKey) = 0; MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIPropertyElement_key) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetKey(const nsACString& aKey) = 0; /* attribute AString value; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIPropertyElement_value) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetValue(nsAString& aValue) = 0; MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIPropertyElement_value) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetValue(const nsAString& aValue) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIPROPERTYELEMENT \ NS_IMETHOD GetKey(nsACString& aKey) override; \ NS_IMETHOD SetKey(const nsACString& aKey) override; \ NS_IMETHOD GetValue(nsAString& aValue) override; \ NS_IMETHOD SetValue(const nsAString& aValue) 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_NSIPROPERTYELEMENT \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIPropertyElement_key)\ nsresult GetKey(nsACString& aKey); \ MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIPropertyElement_key)\ nsresult SetKey(const nsACString& aKey); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIPropertyElement_value)\ nsresult GetValue(nsAString& aValue); \ MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIPropertyElement_value)\ nsresult SetValue(const nsAString& aValue); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIPROPERTYELEMENT(_to) \ NS_IMETHOD GetKey(nsACString& aKey) override { return _to GetKey(aKey); } \ NS_IMETHOD SetKey(const nsACString& aKey) override { return _to SetKey(aKey); } \ NS_IMETHOD GetValue(nsAString& aValue) override { return _to GetValue(aValue); } \ NS_IMETHOD SetValue(const nsAString& aValue) override { return _to SetValue(aValue); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIPROPERTYELEMENT(_to) \ NS_IMETHOD GetKey(nsACString& aKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKey(aKey); } \ NS_IMETHOD SetKey(const nsACString& aKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetKey(aKey); } \ NS_IMETHOD GetValue(nsAString& aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ NS_IMETHOD SetValue(const nsAString& aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } /* starting interface: nsIPersistentProperties */ #define NS_IPERSISTENTPROPERTIES_IID_STR "706867af-0400-4faa-beb1-0dae87308784" #define NS_IPERSISTENTPROPERTIES_IID \ {0x706867af, 0x0400, 0x4faa, \ { 0xbe, 0xb1, 0x0d, 0xae, 0x87, 0x30, 0x87, 0x84 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIPersistentProperties) nsIPersistentProperties : public nsIProperties { public: NS_INLINE_DECL_STATIC_IID(NS_IPERSISTENTPROPERTIES_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIPersistentProperties; /* void load (in nsIInputStream input); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_load) NS_IMETHOD Load(nsIInputStream *input) = 0; /* void save (in nsIOutputStream output, in AUTF8String header); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_save) NS_IMETHOD Save(nsIOutputStream *output, const nsACString& header) = 0; /* nsISimpleEnumerator enumerate (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_enumerate) NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) = 0; /* AString getStringProperty (in AUTF8String key); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_getStringProperty) NS_IMETHOD GetStringProperty(const nsACString& key, nsAString& _retval) = 0; /* AString setStringProperty (in AUTF8String key, in AString value); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_setStringProperty) NS_IMETHOD SetStringProperty(const nsACString& key, const nsAString& value, nsAString& _retval) = 0; /* [nostdcall,notxpcom] size_t sizeOfIncludingThis (in MallocSizeOf aMallocSizeOf); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_sizeOfIncludingThis) virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIPERSISTENTPROPERTIES \ NS_IMETHOD Load(nsIInputStream *input) override; \ NS_IMETHOD Save(nsIOutputStream *output, const nsACString& header) override; \ NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) override; \ NS_IMETHOD GetStringProperty(const nsACString& key, nsAString& _retval) override; \ NS_IMETHOD SetStringProperty(const nsACString& key, const nsAString& value, nsAString& _retval) override; \ virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) 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_NSIPERSISTENTPROPERTIES \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_load)\ nsresult Load(nsIInputStream *input); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_save)\ nsresult Save(nsIOutputStream *output, const nsACString& header); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_enumerate)\ nsresult Enumerate(nsISimpleEnumerator **_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_getStringProperty)\ nsresult GetStringProperty(const nsACString& key, nsAString& _retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_setStringProperty)\ nsresult SetStringProperty(const nsACString& key, const nsAString& value, nsAString& _retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPersistentProperties_sizeOfIncludingThis)\ size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIPERSISTENTPROPERTIES(_to) \ NS_IMETHOD Load(nsIInputStream *input) override { return _to Load(input); } \ NS_IMETHOD Save(nsIOutputStream *output, const nsACString& header) override { return _to Save(output, header); } \ NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) override { return _to Enumerate(_retval); } \ NS_IMETHOD GetStringProperty(const nsACString& key, nsAString& _retval) override { return _to GetStringProperty(key, _retval); } \ NS_IMETHOD SetStringProperty(const nsACString& key, const nsAString& value, nsAString& _retval) override { return _to SetStringProperty(key, value, _retval); } \ virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) override { return _to SizeOfIncludingThis(aMallocSizeOf); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIPERSISTENTPROPERTIES(_to) \ NS_IMETHOD Load(nsIInputStream *input) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Load(input); } \ NS_IMETHOD Save(nsIOutputStream *output, const nsACString& header) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Save(output, header); } \ NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Enumerate(_retval); } \ NS_IMETHOD GetStringProperty(const nsACString& key, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStringProperty(key, _retval); } \ NS_IMETHOD SetStringProperty(const nsACString& key, const nsAString& value, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStringProperty(key, value, _retval); } \ virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) override; #endif /* __gen_nsIPersistentProperties2_h__ */