Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/security/manager/ssl/nsIDataStorage.idl
*/
#ifndef __gen_nsIDataStorage_h__
#define __gen_nsIDataStorage_h__
#include "nsISupports.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 nsIDataStorage; /* forward declaration */
class nsIDataStorageItem; /* forward declaration */
/* starting interface: nsIDataStorageManager */
#define NS_IDATASTORAGEMANAGER_IID_STR "71b49926-fd4e-43e2-ab8d-d9b049413c0b"
#define NS_IDATASTORAGEMANAGER_IID \
{0x71b49926, 0xfd4e, 0x43e2, \
{ 0xab, 0x8d, 0xd9, 0xb0, 0x49, 0x41, 0x3c, 0x0b }}
class NS_NO_VTABLE nsIDataStorageManager : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDATASTORAGEMANAGER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIDataStorageManager;
enum DataStorage : uint8_t {
AlternateServices = 0,
ClientAuthRememberList = 1,
SiteSecurityServiceState = 2,
};
/* nsIDataStorage get (in nsIDataStorageManager_DataStorage dataStorage); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Get(nsIDataStorageManager::DataStorage dataStorage, nsIDataStorage **_retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDataStorageManager, NS_IDATASTORAGEMANAGER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDATASTORAGEMANAGER \
NS_IMETHOD Get(nsIDataStorageManager::DataStorage dataStorage, nsIDataStorage **_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_NSIDATASTORAGEMANAGER \
nsresult Get(nsIDataStorageManager::DataStorage dataStorage, nsIDataStorage **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDATASTORAGEMANAGER(_to) \
NS_IMETHOD Get(nsIDataStorageManager::DataStorage dataStorage, nsIDataStorage **_retval) override { return _to Get(dataStorage, _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_NSIDATASTORAGEMANAGER(_to) \
NS_IMETHOD Get(nsIDataStorageManager::DataStorage dataStorage, nsIDataStorage **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Get(dataStorage, _retval); }
/* starting interface: nsIDataStorage */
#define NS_IDATASTORAGE_IID_STR "fcbb5ec4-7134-4069-91c6-9378eff51e03"
#define NS_IDATASTORAGE_IID \
{0xfcbb5ec4, 0x7134, 0x4069, \
{ 0x91, 0xc6, 0x93, 0x78, 0xef, 0xf5, 0x1e, 0x03 }}
class NS_NO_VTABLE nsIDataStorage : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDATASTORAGE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIDataStorage;
enum DataType : uint8_t {
Persistent = 0,
Private = 1,
};
/* ACString get (in ACString key, in nsIDataStorage_DataType type); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Get(const nsACString& key, nsIDataStorage::DataType type, nsACString& _retval) = 0;
/* void put (in ACString key, in ACString value, in nsIDataStorage_DataType type); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Put(const nsACString& key, const nsACString& value, nsIDataStorage::DataType type) = 0;
/* void remove (in ACString key, in nsIDataStorage_DataType type); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Remove(const nsACString& key, nsIDataStorage::DataType type) = 0;
/* void clear (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Clear(void) = 0;
/* boolean isReady (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsReady(bool *_retval) = 0;
/* Array<nsIDataStorageItem> getAll (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAll(nsTArray<RefPtr<nsIDataStorageItem>>& _retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDataStorage, NS_IDATASTORAGE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDATASTORAGE \
NS_IMETHOD Get(const nsACString& key, nsIDataStorage::DataType type, nsACString& _retval) override; \
NS_IMETHOD Put(const nsACString& key, const nsACString& value, nsIDataStorage::DataType type) override; \
NS_IMETHOD Remove(const nsACString& key, nsIDataStorage::DataType type) override; \
NS_IMETHOD Clear(void) override; \
NS_IMETHOD IsReady(bool *_retval) override; \
NS_IMETHOD GetAll(nsTArray<RefPtr<nsIDataStorageItem>>& _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_NSIDATASTORAGE \
nsresult Get(const nsACString& key, nsIDataStorage::DataType type, nsACString& _retval); \
nsresult Put(const nsACString& key, const nsACString& value, nsIDataStorage::DataType type); \
nsresult Remove(const nsACString& key, nsIDataStorage::DataType type); \
nsresult Clear(void); \
nsresult IsReady(bool *_retval); \
nsresult GetAll(nsTArray<RefPtr<nsIDataStorageItem>>& _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDATASTORAGE(_to) \
NS_IMETHOD Get(const nsACString& key, nsIDataStorage::DataType type, nsACString& _retval) override { return _to Get(key, type, _retval); } \
NS_IMETHOD Put(const nsACString& key, const nsACString& value, nsIDataStorage::DataType type) override { return _to Put(key, value, type); } \
NS_IMETHOD Remove(const nsACString& key, nsIDataStorage::DataType type) override { return _to Remove(key, type); } \
NS_IMETHOD Clear(void) override { return _to Clear(); } \
NS_IMETHOD IsReady(bool *_retval) override { return _to IsReady(_retval); } \
NS_IMETHOD GetAll(nsTArray<RefPtr<nsIDataStorageItem>>& _retval) override { return _to GetAll(_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_NSIDATASTORAGE(_to) \
NS_IMETHOD Get(const nsACString& key, nsIDataStorage::DataType type, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Get(key, type, _retval); } \
NS_IMETHOD Put(const nsACString& key, const nsACString& value, nsIDataStorage::DataType type) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Put(key, value, type); } \
NS_IMETHOD Remove(const nsACString& key, nsIDataStorage::DataType type) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(key, type); } \
NS_IMETHOD Clear(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Clear(); } \
NS_IMETHOD IsReady(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsReady(_retval); } \
NS_IMETHOD GetAll(nsTArray<RefPtr<nsIDataStorageItem>>& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAll(_retval); }
/* starting interface: nsIDataStorageItem */
#define NS_IDATASTORAGEITEM_IID_STR "4501f984-0e3a-4199-a67e-7753649e93f1"
#define NS_IDATASTORAGEITEM_IID \
{0x4501f984, 0x0e3a, 0x4199, \
{ 0xa6, 0x7e, 0x77, 0x53, 0x64, 0x9e, 0x93, 0xf1 }}
class NS_NO_VTABLE nsIDataStorageItem : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDATASTORAGEITEM_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIDataStorageItem;
/* readonly attribute ACString key; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetKey(nsACString& aKey) = 0;
/* readonly attribute ACString value; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetValue(nsACString& aValue) = 0;
/* readonly attribute nsIDataStorage_DataType type; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetType(nsIDataStorage::DataType *aType) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDataStorageItem, NS_IDATASTORAGEITEM_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDATASTORAGEITEM \
NS_IMETHOD GetKey(nsACString& aKey) override; \
NS_IMETHOD GetValue(nsACString& aValue) override; \
NS_IMETHOD GetType(nsIDataStorage::DataType *aType) 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_NSIDATASTORAGEITEM \
nsresult GetKey(nsACString& aKey); \
nsresult GetValue(nsACString& aValue); \
nsresult GetType(nsIDataStorage::DataType *aType);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDATASTORAGEITEM(_to) \
NS_IMETHOD GetKey(nsACString& aKey) override { return _to GetKey(aKey); } \
NS_IMETHOD GetValue(nsACString& aValue) override { return _to GetValue(aValue); } \
NS_IMETHOD GetType(nsIDataStorage::DataType *aType) override { return _to GetType(aType); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDATASTORAGEITEM(_to) \
NS_IMETHOD GetKey(nsACString& aKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKey(aKey); } \
NS_IMETHOD GetValue(nsACString& aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
NS_IMETHOD GetType(nsIDataStorage::DataType *aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); }
#endif /* __gen_nsIDataStorage_h__ */