/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/kvstore/nsIKeyValue.idl
*/
#ifndef __gen_nsIKeyValue_h__
#define __gen_nsIKeyValue_h__
#include "nsISupports.h"
#include "nsIVariant.h"
#include "nsTArray.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 nsIKeyValueImporter; /* forward declaration */
class nsIKeyValueDatabaseImportOptions; /* forward declaration */
class nsIKeyValueDatabaseCallback; /* forward declaration */
class nsIKeyValueEnumeratorCallback; /* forward declaration */
class nsIKeyValuePairCallback; /* forward declaration */
class nsIKeyValueVariantCallback; /* forward declaration */
class nsIKeyValueVoidCallback; /* forward declaration */
class nsIKeyValuePair; /* forward declaration */
/* starting interface: nsIKeyValueService */
#define NS_IKEYVALUESERVICE_IID_STR "46c893dd-4c14-4de0-b33d-a1be18c6d062"
#define NS_IKEYVALUESERVICE_IID \
{0x46c893dd, 0x4c14, 0x4de0, \
{ 0xb3, 0x3d, 0xa1, 0xbe, 0x18, 0xc6, 0xd0, 0x62 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueService) nsIKeyValueService : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUESERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueService;
enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueService_RecoveryStrategy) RecoveryStrategy : uint8_t {
ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIKeyValueService_RecoveryStrategy_ERROR) = 0,
DISCARD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIKeyValueService_RecoveryStrategy_DISCARD) = 1,
RENAME MOZ_BINDING(binding_to, idl, const, XPIDL_nsIKeyValueService_RecoveryStrategy_RENAME) = 2,
};
/* void getOrCreate (in nsIKeyValueDatabaseCallback callback, in AString path, in AUTF8String name); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueService_getOrCreate)
NS_IMETHOD GetOrCreate(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name) = 0;
/* void getOrCreateWithOptions (in nsIKeyValueDatabaseCallback callback, in AString path, in AUTF8String name, [optional] in nsIKeyValueService_RecoveryStrategy recoveryStrategy); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueService_getOrCreateWithOptions)
NS_IMETHOD GetOrCreateWithOptions(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name, nsIKeyValueService::RecoveryStrategy recoveryStrategy) = 0;
/* nsIKeyValueImporter createImporter (in AUTF8String type, in AString path); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueService_createImporter)
NS_IMETHOD CreateImporter(const nsACString& type, const nsAString& path, nsIKeyValueImporter **_retval) = 0;
};
namespace mozilla::detail {
template <>
class InterfaceNeedsThreadSafeRefCnt<nsIKeyValueService> : public std::true_type {};
}
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUESERVICE \
NS_IMETHOD GetOrCreate(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name) override; \
NS_IMETHOD GetOrCreateWithOptions(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name, nsIKeyValueService::RecoveryStrategy recoveryStrategy) override; \
NS_IMETHOD CreateImporter(const nsACString& type, const nsAString& path, nsIKeyValueImporter **_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_NSIKEYVALUESERVICE \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueService_getOrCreate)\
nsresult GetOrCreate(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueService_getOrCreateWithOptions)\
nsresult GetOrCreateWithOptions(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name, nsIKeyValueService::RecoveryStrategy recoveryStrategy); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueService_createImporter)\
nsresult CreateImporter(const nsACString& type, const nsAString& path, nsIKeyValueImporter **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUESERVICE(_to) \
NS_IMETHOD GetOrCreate(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name) override { return _to GetOrCreate(callback, path, name); } \
NS_IMETHOD GetOrCreateWithOptions(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name, nsIKeyValueService::RecoveryStrategy recoveryStrategy) override { return _to GetOrCreateWithOptions(callback, path, name, recoveryStrategy); } \
NS_IMETHOD CreateImporter(const nsACString& type, const nsAString& path, nsIKeyValueImporter **_retval) override { return _to CreateImporter(type, path, _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_NSIKEYVALUESERVICE(_to) \
NS_IMETHOD GetOrCreate(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrCreate(callback, path, name); } \
NS_IMETHOD GetOrCreateWithOptions(nsIKeyValueDatabaseCallback *callback, const nsAString& path, const nsACString& name, nsIKeyValueService::RecoveryStrategy recoveryStrategy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrCreateWithOptions(callback, path, name, recoveryStrategy); } \
NS_IMETHOD CreateImporter(const nsACString& type, const nsAString& path, nsIKeyValueImporter **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateImporter(type, path, _retval); }
/* starting interface: nsIKeyValueImportSourceSpec */
#define NS_IKEYVALUEIMPORTSOURCESPEC_IID_STR "ed0980f5-64e8-4ca6-af97-b49a766fe016"
#define NS_IKEYVALUEIMPORTSOURCESPEC_IID \
{0xed0980f5, 0x64e8, 0x4ca6, \
{ 0xaf, 0x97, 0xb4, 0x9a, 0x76, 0x6f, 0xe0, 0x16 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueImportSourceSpec) nsIKeyValueImportSourceSpec : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEIMPORTSOURCESPEC_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueImportSourceSpec;
/* readonly attribute AString path; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIKeyValueImportSourceSpec_path)
NS_IMETHOD GetPath(nsAString& aPath) = 0;
/* nsIKeyValueDatabaseImportOptions addDatabase (in AUTF8String name); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueImportSourceSpec_addDatabase)
NS_IMETHOD AddDatabase(const nsACString& name, nsIKeyValueDatabaseImportOptions **_retval) = 0;
/* nsIKeyValueDatabaseImportOptions addAllDatabases (); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueImportSourceSpec_addAllDatabases)
NS_IMETHOD AddAllDatabases(nsIKeyValueDatabaseImportOptions **_retval) = 0;
};
namespace mozilla::detail {
template <>
class InterfaceNeedsThreadSafeRefCnt<nsIKeyValueImportSourceSpec> : public std::true_type {};
}
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEIMPORTSOURCESPEC \
NS_IMETHOD GetPath(nsAString& aPath) override; \
NS_IMETHOD AddDatabase(const nsACString& name, nsIKeyValueDatabaseImportOptions **_retval) override; \
NS_IMETHOD AddAllDatabases(nsIKeyValueDatabaseImportOptions **_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_NSIKEYVALUEIMPORTSOURCESPEC \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIKeyValueImportSourceSpec_path)\
nsresult GetPath(nsAString& aPath); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueImportSourceSpec_addDatabase)\
nsresult AddDatabase(const nsACString& name, nsIKeyValueDatabaseImportOptions **_retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueImportSourceSpec_addAllDatabases)\
nsresult AddAllDatabases(nsIKeyValueDatabaseImportOptions **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEIMPORTSOURCESPEC(_to) \
NS_IMETHOD GetPath(nsAString& aPath) override { return _to GetPath(aPath); } \
NS_IMETHOD AddDatabase(const nsACString& name, nsIKeyValueDatabaseImportOptions **_retval) override { return _to AddDatabase(name, _retval); } \
NS_IMETHOD AddAllDatabases(nsIKeyValueDatabaseImportOptions **_retval) override { return _to AddAllDatabases(_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_NSIKEYVALUEIMPORTSOURCESPEC(_to) \
NS_IMETHOD GetPath(nsAString& aPath) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPath(aPath); } \
NS_IMETHOD AddDatabase(const nsACString& name, nsIKeyValueDatabaseImportOptions **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDatabase(name, _retval); } \
NS_IMETHOD AddAllDatabases(nsIKeyValueDatabaseImportOptions **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddAllDatabases(_retval); }
/* starting interface: nsIKeyValueImporter */
#define NS_IKEYVALUEIMPORTER_IID_STR "470d71c0-d601-4867-8c09-810af7ffa67e"
#define NS_IKEYVALUEIMPORTER_IID \
{0x470d71c0, 0xd601, 0x4867, \
{ 0x8c, 0x09, 0x81, 0x0a, 0xf7, 0xff, 0xa6, 0x7e }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueImporter) nsIKeyValueImporter : public nsIKeyValueImportSourceSpec {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEIMPORTER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueImporter;
enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueImporter_ConflictPolicy) ConflictPolicy : uint8_t {
ERROR_ON_CONFLICT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIKeyValueImporter_ConflictPolicy_ERROR_ON_CONFLICT) = 0,
IGNORE_ON_CONFLICT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIKeyValueImporter_ConflictPolicy_IGNORE_ON_CONFLICT) = 1,
REPLACE_ON_CONFLICT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIKeyValueImporter_ConflictPolicy_REPLACE_ON_CONFLICT) = 2,
};
enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueImporter_CleanupPolicy) CleanupPolicy : uint8_t {
KEEP_AFTER_IMPORT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIKeyValueImporter_CleanupPolicy_KEEP_AFTER_IMPORT) = 0,
DELETE_AFTER_IMPORT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIKeyValueImporter_CleanupPolicy_DELETE_AFTER_IMPORT) = 1,
};
/* readonly attribute AUTF8String type; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIKeyValueImporter_type)
NS_IMETHOD GetType(nsACString& aType) = 0;
/* nsIKeyValueImportSourceSpec addPath (in AString path); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueImporter_addPath)
NS_IMETHOD AddPath(const nsAString& path, nsIKeyValueImportSourceSpec **_retval) = 0;
/* void import (in nsIKeyValueVoidCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueImporter_import)
NS_IMETHOD Import(nsIKeyValueVoidCallback *callback) = 0;
};
namespace mozilla::detail {
template <>
class InterfaceNeedsThreadSafeRefCnt<nsIKeyValueImporter> : public std::true_type {};
}
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEIMPORTER \
NS_IMETHOD GetType(nsACString& aType) override; \
NS_IMETHOD AddPath(const nsAString& path, nsIKeyValueImportSourceSpec **_retval) override; \
NS_IMETHOD Import(nsIKeyValueVoidCallback *callback) 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_NSIKEYVALUEIMPORTER \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIKeyValueImporter_type)\
nsresult GetType(nsACString& aType); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueImporter_addPath)\
nsresult AddPath(const nsAString& path, nsIKeyValueImportSourceSpec **_retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueImporter_import)\
nsresult Import(nsIKeyValueVoidCallback *callback);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEIMPORTER(_to) \
NS_IMETHOD GetType(nsACString& aType) override { return _to GetType(aType); } \
NS_IMETHOD AddPath(const nsAString& path, nsIKeyValueImportSourceSpec **_retval) override { return _to AddPath(path, _retval); } \
NS_IMETHOD Import(nsIKeyValueVoidCallback *callback) override { return _to Import(callback); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIKEYVALUEIMPORTER(_to) \
NS_IMETHOD GetType(nsACString& aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
NS_IMETHOD AddPath(const nsAString& path, nsIKeyValueImportSourceSpec **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddPath(path, _retval); } \
NS_IMETHOD Import(nsIKeyValueVoidCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Import(callback); }
/* starting interface: nsIKeyValueDatabaseImportOptions */
#define NS_IKEYVALUEDATABASEIMPORTOPTIONS_IID_STR "8e983362-fb16-4811-b1fe-8f9921932fd5"
#define NS_IKEYVALUEDATABASEIMPORTOPTIONS_IID \
{0x8e983362, 0xfb16, 0x4811, \
{ 0xb1, 0xfe, 0x8f, 0x99, 0x21, 0x93, 0x2f, 0xd5 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueDatabaseImportOptions) nsIKeyValueDatabaseImportOptions : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEDATABASEIMPORTOPTIONS_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueDatabaseImportOptions;
/* nsIKeyValueDatabaseImportOptions setConflictPolicy (in nsIKeyValueImporter_ConflictPolicy conflictPolicy); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabaseImportOptions_setConflictPolicy)
NS_IMETHOD SetConflictPolicy(nsIKeyValueImporter::ConflictPolicy conflictPolicy, nsIKeyValueDatabaseImportOptions **_retval) = 0;
/* nsIKeyValueDatabaseImportOptions setCleanupPolicy (in nsIKeyValueImporter_CleanupPolicy cleanupPolicy); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabaseImportOptions_setCleanupPolicy)
NS_IMETHOD SetCleanupPolicy(nsIKeyValueImporter::CleanupPolicy cleanupPolicy, nsIKeyValueDatabaseImportOptions **_retval) = 0;
};
namespace mozilla::detail {
template <>
class InterfaceNeedsThreadSafeRefCnt<nsIKeyValueDatabaseImportOptions> : public std::true_type {};
}
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEDATABASEIMPORTOPTIONS \
NS_IMETHOD SetConflictPolicy(nsIKeyValueImporter::ConflictPolicy conflictPolicy, nsIKeyValueDatabaseImportOptions **_retval) override; \
NS_IMETHOD SetCleanupPolicy(nsIKeyValueImporter::CleanupPolicy cleanupPolicy, nsIKeyValueDatabaseImportOptions **_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_NSIKEYVALUEDATABASEIMPORTOPTIONS \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabaseImportOptions_setConflictPolicy)\
nsresult SetConflictPolicy(nsIKeyValueImporter::ConflictPolicy conflictPolicy, nsIKeyValueDatabaseImportOptions **_retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabaseImportOptions_setCleanupPolicy)\
nsresult SetCleanupPolicy(nsIKeyValueImporter::CleanupPolicy cleanupPolicy, nsIKeyValueDatabaseImportOptions **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEDATABASEIMPORTOPTIONS(_to) \
NS_IMETHOD SetConflictPolicy(nsIKeyValueImporter::ConflictPolicy conflictPolicy, nsIKeyValueDatabaseImportOptions **_retval) override { return _to SetConflictPolicy(conflictPolicy, _retval); } \
NS_IMETHOD SetCleanupPolicy(nsIKeyValueImporter::CleanupPolicy cleanupPolicy, nsIKeyValueDatabaseImportOptions **_retval) override { return _to SetCleanupPolicy(cleanupPolicy, _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_NSIKEYVALUEDATABASEIMPORTOPTIONS(_to) \
NS_IMETHOD SetConflictPolicy(nsIKeyValueImporter::ConflictPolicy conflictPolicy, nsIKeyValueDatabaseImportOptions **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetConflictPolicy(conflictPolicy, _retval); } \
NS_IMETHOD SetCleanupPolicy(nsIKeyValueImporter::CleanupPolicy cleanupPolicy, nsIKeyValueDatabaseImportOptions **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCleanupPolicy(cleanupPolicy, _retval); }
/* starting interface: nsIKeyValueDatabase */
#define NS_IKEYVALUEDATABASE_IID_STR "c449398e-174c-425b-8195-da6aa0ccd9a5"
#define NS_IKEYVALUEDATABASE_IID \
{0xc449398e, 0x174c, 0x425b, \
{ 0x81, 0x95, 0xda, 0x6a, 0xa0, 0xcc, 0xd9, 0xa5 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueDatabase) nsIKeyValueDatabase : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEDATABASE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueDatabase;
/* void isEmpty (in nsIKeyValueVariantCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_isEmpty)
NS_IMETHOD IsEmpty(nsIKeyValueVariantCallback *callback) = 0;
/* void count (in nsIKeyValueVariantCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_count)
NS_IMETHOD Count(nsIKeyValueVariantCallback *callback) = 0;
/* void size (in nsIKeyValueVariantCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_size)
NS_IMETHOD Size(nsIKeyValueVariantCallback *callback) = 0;
/* void put (in nsIKeyValueVoidCallback callback, in AUTF8String key, in nsIVariant value); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_put)
NS_IMETHOD Put(nsIKeyValueVoidCallback *callback, const nsACString& key, nsIVariant *value) = 0;
/* void writeMany (in nsIKeyValueVoidCallback callback, in Array<nsIKeyValuePair> pairs); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_writeMany)
NS_IMETHOD WriteMany(nsIKeyValueVoidCallback *callback, const nsTArray<RefPtr<nsIKeyValuePair>>& pairs) = 0;
/* void get (in nsIKeyValueVariantCallback callback, in AUTF8String key, [optional] in nsIVariant defaultValue); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_get)
NS_IMETHOD Get(nsIKeyValueVariantCallback *callback, const nsACString& key, nsIVariant *defaultValue) = 0;
/* void has (in nsIKeyValueVariantCallback callback, in AUTF8String key); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_has)
NS_IMETHOD Has(nsIKeyValueVariantCallback *callback, const nsACString& key) = 0;
/* void delete (in nsIKeyValueVoidCallback callback, in AUTF8String key); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_delete)
NS_IMETHOD Delete(nsIKeyValueVoidCallback *callback, const nsACString& key) = 0;
/* void deleteRange (in nsIKeyValueVoidCallback callback, [optional] in AUTF8String fromKey, [optional] in AUTF8String toKey); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_deleteRange)
NS_IMETHOD DeleteRange(nsIKeyValueVoidCallback *callback, const nsACString& fromKey, const nsACString& toKey) = 0;
/* void clear (in nsIKeyValueVoidCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_clear)
NS_IMETHOD Clear(nsIKeyValueVoidCallback *callback) = 0;
/* void enumerate (in nsIKeyValueEnumeratorCallback callback, [optional] in AUTF8String fromKey, [optional] in AUTF8String toKey); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_enumerate)
NS_IMETHOD Enumerate(nsIKeyValueEnumeratorCallback *callback, const nsACString& fromKey, const nsACString& toKey) = 0;
/* void close (in nsIKeyValueVoidCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_close)
NS_IMETHOD Close(nsIKeyValueVoidCallback *callback) = 0;
};
namespace mozilla::detail {
template <>
class InterfaceNeedsThreadSafeRefCnt<nsIKeyValueDatabase> : public std::true_type {};
}
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEDATABASE \
NS_IMETHOD IsEmpty(nsIKeyValueVariantCallback *callback) override; \
NS_IMETHOD Count(nsIKeyValueVariantCallback *callback) override; \
NS_IMETHOD Size(nsIKeyValueVariantCallback *callback) override; \
NS_IMETHOD Put(nsIKeyValueVoidCallback *callback, const nsACString& key, nsIVariant *value) override; \
NS_IMETHOD WriteMany(nsIKeyValueVoidCallback *callback, const nsTArray<RefPtr<nsIKeyValuePair>>& pairs) override; \
NS_IMETHOD Get(nsIKeyValueVariantCallback *callback, const nsACString& key, nsIVariant *defaultValue) override; \
NS_IMETHOD Has(nsIKeyValueVariantCallback *callback, const nsACString& key) override; \
NS_IMETHOD Delete(nsIKeyValueVoidCallback *callback, const nsACString& key) override; \
NS_IMETHOD DeleteRange(nsIKeyValueVoidCallback *callback, const nsACString& fromKey, const nsACString& toKey) override; \
NS_IMETHOD Clear(nsIKeyValueVoidCallback *callback) override; \
NS_IMETHOD Enumerate(nsIKeyValueEnumeratorCallback *callback, const nsACString& fromKey, const nsACString& toKey) override; \
NS_IMETHOD Close(nsIKeyValueVoidCallback *callback) 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_NSIKEYVALUEDATABASE \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_isEmpty)\
nsresult IsEmpty(nsIKeyValueVariantCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_count)\
nsresult Count(nsIKeyValueVariantCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_size)\
nsresult Size(nsIKeyValueVariantCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_put)\
nsresult Put(nsIKeyValueVoidCallback *callback, const nsACString& key, nsIVariant *value); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_writeMany)\
nsresult WriteMany(nsIKeyValueVoidCallback *callback, const nsTArray<RefPtr<nsIKeyValuePair>>& pairs); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_get)\
nsresult Get(nsIKeyValueVariantCallback *callback, const nsACString& key, nsIVariant *defaultValue); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_has)\
nsresult Has(nsIKeyValueVariantCallback *callback, const nsACString& key); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_delete)\
nsresult Delete(nsIKeyValueVoidCallback *callback, const nsACString& key); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_deleteRange)\
nsresult DeleteRange(nsIKeyValueVoidCallback *callback, const nsACString& fromKey, const nsACString& toKey); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_clear)\
nsresult Clear(nsIKeyValueVoidCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_enumerate)\
nsresult Enumerate(nsIKeyValueEnumeratorCallback *callback, const nsACString& fromKey, const nsACString& toKey); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabase_close)\
nsresult Close(nsIKeyValueVoidCallback *callback);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEDATABASE(_to) \
NS_IMETHOD IsEmpty(nsIKeyValueVariantCallback *callback) override { return _to IsEmpty(callback); } \
NS_IMETHOD Count(nsIKeyValueVariantCallback *callback) override { return _to Count(callback); } \
NS_IMETHOD Size(nsIKeyValueVariantCallback *callback) override { return _to Size(callback); } \
NS_IMETHOD Put(nsIKeyValueVoidCallback *callback, const nsACString& key, nsIVariant *value) override { return _to Put(callback, key, value); } \
NS_IMETHOD WriteMany(nsIKeyValueVoidCallback *callback, const nsTArray<RefPtr<nsIKeyValuePair>>& pairs) override { return _to WriteMany(callback, pairs); } \
NS_IMETHOD Get(nsIKeyValueVariantCallback *callback, const nsACString& key, nsIVariant *defaultValue) override { return _to Get(callback, key, defaultValue); } \
NS_IMETHOD Has(nsIKeyValueVariantCallback *callback, const nsACString& key) override { return _to Has(callback, key); } \
NS_IMETHOD Delete(nsIKeyValueVoidCallback *callback, const nsACString& key) override { return _to Delete(callback, key); } \
NS_IMETHOD DeleteRange(nsIKeyValueVoidCallback *callback, const nsACString& fromKey, const nsACString& toKey) override { return _to DeleteRange(callback, fromKey, toKey); } \
NS_IMETHOD Clear(nsIKeyValueVoidCallback *callback) override { return _to Clear(callback); } \
NS_IMETHOD Enumerate(nsIKeyValueEnumeratorCallback *callback, const nsACString& fromKey, const nsACString& toKey) override { return _to Enumerate(callback, fromKey, toKey); } \
NS_IMETHOD Close(nsIKeyValueVoidCallback *callback) override { return _to Close(callback); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIKEYVALUEDATABASE(_to) \
NS_IMETHOD IsEmpty(nsIKeyValueVariantCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsEmpty(callback); } \
NS_IMETHOD Count(nsIKeyValueVariantCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Count(callback); } \
NS_IMETHOD Size(nsIKeyValueVariantCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Size(callback); } \
NS_IMETHOD Put(nsIKeyValueVoidCallback *callback, const nsACString& key, nsIVariant *value) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Put(callback, key, value); } \
NS_IMETHOD WriteMany(nsIKeyValueVoidCallback *callback, const nsTArray<RefPtr<nsIKeyValuePair>>& pairs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteMany(callback, pairs); } \
NS_IMETHOD Get(nsIKeyValueVariantCallback *callback, const nsACString& key, nsIVariant *defaultValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Get(callback, key, defaultValue); } \
NS_IMETHOD Has(nsIKeyValueVariantCallback *callback, const nsACString& key) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Has(callback, key); } \
NS_IMETHOD Delete(nsIKeyValueVoidCallback *callback, const nsACString& key) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Delete(callback, key); } \
NS_IMETHOD DeleteRange(nsIKeyValueVoidCallback *callback, const nsACString& fromKey, const nsACString& toKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteRange(callback, fromKey, toKey); } \
NS_IMETHOD Clear(nsIKeyValueVoidCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Clear(callback); } \
NS_IMETHOD Enumerate(nsIKeyValueEnumeratorCallback *callback, const nsACString& fromKey, const nsACString& toKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Enumerate(callback, fromKey, toKey); } \
NS_IMETHOD Close(nsIKeyValueVoidCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(callback); }
/* starting interface: nsIKeyValuePair */
#define NS_IKEYVALUEPAIR_IID_STR "bc37b06a-23b5-4b32-8281-4b8479601c7e"
#define NS_IKEYVALUEPAIR_IID \
{0xbc37b06a, 0x23b5, 0x4b32, \
{ 0x82, 0x81, 0x4b, 0x84, 0x79, 0x60, 0x1c, 0x7e }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValuePair) nsIKeyValuePair : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEPAIR_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValuePair;
/* readonly attribute AUTF8String key; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIKeyValuePair_key)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetKey(nsACString& aKey) = 0;
/* readonly attribute nsIVariant value; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIKeyValuePair_value)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetValue(nsIVariant **aValue) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEPAIR \
NS_IMETHOD GetKey(nsACString& aKey) override; \
NS_IMETHOD GetValue(nsIVariant **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_NSIKEYVALUEPAIR \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIKeyValuePair_key)\
nsresult GetKey(nsACString& aKey); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIKeyValuePair_value)\
nsresult GetValue(nsIVariant **aValue);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEPAIR(_to) \
NS_IMETHOD GetKey(nsACString& aKey) override { return _to GetKey(aKey); } \
NS_IMETHOD GetValue(nsIVariant **aValue) override { return _to GetValue(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_NSIKEYVALUEPAIR(_to) \
NS_IMETHOD GetKey(nsACString& aKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKey(aKey); } \
NS_IMETHOD GetValue(nsIVariant **aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); }
/* starting interface: nsIKeyValueEnumerator */
#define NS_IKEYVALUEENUMERATOR_IID_STR "b9ba7116-b7ff-4717-9a28-a08e6879b199"
#define NS_IKEYVALUEENUMERATOR_IID \
{0xb9ba7116, 0xb7ff, 0x4717, \
{ 0x9a, 0x28, 0xa0, 0x8e, 0x68, 0x79, 0xb1, 0x99 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueEnumerator) nsIKeyValueEnumerator : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEENUMERATOR_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueEnumerator;
/* boolean hasMoreElements (); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueEnumerator_hasMoreElements)
NS_IMETHOD HasMoreElements(bool *_retval) = 0;
/* nsIKeyValuePair getNext (); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueEnumerator_getNext)
NS_IMETHOD GetNext(nsIKeyValuePair **_retval) = 0;
};
namespace mozilla::detail {
template <>
class InterfaceNeedsThreadSafeRefCnt<nsIKeyValueEnumerator> : public std::true_type {};
}
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEENUMERATOR \
NS_IMETHOD HasMoreElements(bool *_retval) override; \
NS_IMETHOD GetNext(nsIKeyValuePair **_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_NSIKEYVALUEENUMERATOR \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueEnumerator_hasMoreElements)\
nsresult HasMoreElements(bool *_retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueEnumerator_getNext)\
nsresult GetNext(nsIKeyValuePair **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEENUMERATOR(_to) \
NS_IMETHOD HasMoreElements(bool *_retval) override { return _to HasMoreElements(_retval); } \
NS_IMETHOD GetNext(nsIKeyValuePair **_retval) override { return _to GetNext(_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_NSIKEYVALUEENUMERATOR(_to) \
NS_IMETHOD HasMoreElements(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasMoreElements(_retval); } \
NS_IMETHOD GetNext(nsIKeyValuePair **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNext(_retval); }
/* starting interface: nsIKeyValueDatabaseCallback */
#define NS_IKEYVALUEDATABASECALLBACK_IID_STR "2becc1f8-2d80-4b63-92a8-24ee8f79ee45"
#define NS_IKEYVALUEDATABASECALLBACK_IID \
{0x2becc1f8, 0x2d80, 0x4b63, \
{ 0x92, 0xa8, 0x24, 0xee, 0x8f, 0x79, 0xee, 0x45 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueDatabaseCallback) nsIKeyValueDatabaseCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEDATABASECALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueDatabaseCallback;
/* void resolve (in nsIKeyValueDatabase database); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabaseCallback_resolve)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Resolve(nsIKeyValueDatabase *database) = 0;
/* void reject (in AUTF8String message); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabaseCallback_reject)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Reject(const nsACString& message) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEDATABASECALLBACK \
NS_IMETHOD Resolve(nsIKeyValueDatabase *database) override; \
NS_IMETHOD Reject(const nsACString& message) 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_NSIKEYVALUEDATABASECALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabaseCallback_resolve)\
nsresult Resolve(nsIKeyValueDatabase *database); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueDatabaseCallback_reject)\
nsresult Reject(const nsACString& message);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEDATABASECALLBACK(_to) \
NS_IMETHOD Resolve(nsIKeyValueDatabase *database) override { return _to Resolve(database); } \
NS_IMETHOD Reject(const nsACString& message) override { return _to Reject(message); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIKEYVALUEDATABASECALLBACK(_to) \
NS_IMETHOD Resolve(nsIKeyValueDatabase *database) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(database); } \
NS_IMETHOD Reject(const nsACString& message) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reject(message); }
/* starting interface: nsIKeyValueEnumeratorCallback */
#define NS_IKEYVALUEENUMERATORCALLBACK_IID_STR "b7ea2183-880b-4424-ab24-5aa1555b775d"
#define NS_IKEYVALUEENUMERATORCALLBACK_IID \
{0xb7ea2183, 0x880b, 0x4424, \
{ 0xab, 0x24, 0x5a, 0xa1, 0x55, 0x5b, 0x77, 0x5d }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueEnumeratorCallback) nsIKeyValueEnumeratorCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEENUMERATORCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueEnumeratorCallback;
/* void resolve (in nsIKeyValueEnumerator enumerator); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueEnumeratorCallback_resolve)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Resolve(nsIKeyValueEnumerator *enumerator) = 0;
/* void reject (in AUTF8String message); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueEnumeratorCallback_reject)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Reject(const nsACString& message) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEENUMERATORCALLBACK \
NS_IMETHOD Resolve(nsIKeyValueEnumerator *enumerator) override; \
NS_IMETHOD Reject(const nsACString& message) 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_NSIKEYVALUEENUMERATORCALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueEnumeratorCallback_resolve)\
nsresult Resolve(nsIKeyValueEnumerator *enumerator); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueEnumeratorCallback_reject)\
nsresult Reject(const nsACString& message);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEENUMERATORCALLBACK(_to) \
NS_IMETHOD Resolve(nsIKeyValueEnumerator *enumerator) override { return _to Resolve(enumerator); } \
NS_IMETHOD Reject(const nsACString& message) override { return _to Reject(message); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIKEYVALUEENUMERATORCALLBACK(_to) \
NS_IMETHOD Resolve(nsIKeyValueEnumerator *enumerator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(enumerator); } \
NS_IMETHOD Reject(const nsACString& message) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reject(message); }
/* starting interface: nsIKeyValuePairCallback */
#define NS_IKEYVALUEPAIRCALLBACK_IID_STR "50f65485-ec1e-4307-812b-b8a15e1f382e"
#define NS_IKEYVALUEPAIRCALLBACK_IID \
{0x50f65485, 0xec1e, 0x4307, \
{ 0x81, 0x2b, 0xb8, 0xa1, 0x5e, 0x1f, 0x38, 0x2e }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValuePairCallback) nsIKeyValuePairCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEPAIRCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValuePairCallback;
/* void resolve (in nsIKeyValuePair pair); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValuePairCallback_resolve)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Resolve(nsIKeyValuePair *pair) = 0;
/* void reject (in AUTF8String message); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValuePairCallback_reject)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Reject(const nsACString& message) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEPAIRCALLBACK \
NS_IMETHOD Resolve(nsIKeyValuePair *pair) override; \
NS_IMETHOD Reject(const nsACString& message) 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_NSIKEYVALUEPAIRCALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValuePairCallback_resolve)\
nsresult Resolve(nsIKeyValuePair *pair); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValuePairCallback_reject)\
nsresult Reject(const nsACString& message);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEPAIRCALLBACK(_to) \
NS_IMETHOD Resolve(nsIKeyValuePair *pair) override { return _to Resolve(pair); } \
NS_IMETHOD Reject(const nsACString& message) override { return _to Reject(message); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIKEYVALUEPAIRCALLBACK(_to) \
NS_IMETHOD Resolve(nsIKeyValuePair *pair) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(pair); } \
NS_IMETHOD Reject(const nsACString& message) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reject(message); }
/* starting interface: nsIKeyValueVariantCallback */
#define NS_IKEYVALUEVARIANTCALLBACK_IID_STR "174ebfa1-74ea-42a7-aa90-85bbaf1da4bf"
#define NS_IKEYVALUEVARIANTCALLBACK_IID \
{0x174ebfa1, 0x74ea, 0x42a7, \
{ 0xaa, 0x90, 0x85, 0xbb, 0xaf, 0x1d, 0xa4, 0xbf }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueVariantCallback) nsIKeyValueVariantCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEVARIANTCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueVariantCallback;
/* void resolve (in nsIVariant result); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueVariantCallback_resolve)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Resolve(nsIVariant *result) = 0;
/* void reject (in AUTF8String message); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueVariantCallback_reject)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Reject(const nsACString& message) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEVARIANTCALLBACK \
NS_IMETHOD Resolve(nsIVariant *result) override; \
NS_IMETHOD Reject(const nsACString& message) 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_NSIKEYVALUEVARIANTCALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueVariantCallback_resolve)\
nsresult Resolve(nsIVariant *result); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueVariantCallback_reject)\
nsresult Reject(const nsACString& message);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEVARIANTCALLBACK(_to) \
NS_IMETHOD Resolve(nsIVariant *result) override { return _to Resolve(result); } \
NS_IMETHOD Reject(const nsACString& message) override { return _to Reject(message); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIKEYVALUEVARIANTCALLBACK(_to) \
NS_IMETHOD Resolve(nsIVariant *result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(result); } \
NS_IMETHOD Reject(const nsACString& message) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reject(message); }
/* starting interface: nsIKeyValueVoidCallback */
#define NS_IKEYVALUEVOIDCALLBACK_IID_STR "0c17497a-ccf8-451a-838d-9dfa7f846379"
#define NS_IKEYVALUEVOIDCALLBACK_IID \
{0x0c17497a, 0xccf8, 0x451a, \
{ 0x83, 0x8d, 0x9d, 0xfa, 0x7f, 0x84, 0x63, 0x79 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIKeyValueVoidCallback) nsIKeyValueVoidCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IKEYVALUEVOIDCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIKeyValueVoidCallback;
/* void resolve (); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueVoidCallback_resolve)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Resolve(void) = 0;
/* void reject (in AUTF8String message); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueVoidCallback_reject)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Reject(const nsACString& message) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIKEYVALUEVOIDCALLBACK \
NS_IMETHOD Resolve(void) override; \
NS_IMETHOD Reject(const nsACString& message) 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_NSIKEYVALUEVOIDCALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueVoidCallback_resolve)\
nsresult Resolve(void); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIKeyValueVoidCallback_reject)\
nsresult Reject(const nsACString& message);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIKEYVALUEVOIDCALLBACK(_to) \
NS_IMETHOD Resolve(void) override { return _to Resolve(); } \
NS_IMETHOD Reject(const nsACString& message) override { return _to Reject(message); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIKEYVALUEVOIDCALLBACK(_to) \
NS_IMETHOD Resolve(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(); } \
NS_IMETHOD Reject(const nsACString& message) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reject(message); }
#endif /* __gen_nsIKeyValue_h__ */