Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/credentialmanagement/nsIIdentityCredentialStorageService.idl
*/
#ifndef __gen_nsIIdentityCredentialStorageService_h__
#define __gen_nsIIdentityCredentialStorageService_h__
#include "nsISupports.h"
#include "nsIPrincipal.h"
#include "nsTArray.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
namespace mozilla {
namespace dom {
class IdentityCredential; /* webidl IdentityCredential */
} // namespace dom
} // namespace mozilla
/* starting interface: nsIIdentityCredentialStorageService */
#define NS_IIDENTITYCREDENTIALSTORAGESERVICE_IID_STR "029823d0-0448-46c5-af1f-25cd4501d0d7"
#define NS_IIDENTITYCREDENTIALSTORAGESERVICE_IID \
{0x029823d0, 0x0448, 0x46c5, \
{ 0xaf, 0x1f, 0x25, 0xcd, 0x45, 0x01, 0xd0, 0xd7 }}
class NS_NO_VTABLE nsIIdentityCredentialStorageService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIDENTITYCREDENTIALSTORAGESERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIIdentityCredentialStorageService;
/* void setState (in nsIPrincipal rpPrincipal, in nsIPrincipal idpPrincipal, in ACString credentialID, in boolean registered, in boolean allowLogout); */
NS_IMETHOD SetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool registered, bool allowLogout) = 0;
/* void getState (in nsIPrincipal rpPrincipal, in nsIPrincipal idpPrincipal, in ACString credentialID, out boolean registered, out boolean allowLogout); */
NS_IMETHOD GetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool *registered, bool *allowLogout) = 0;
/* void delete (in nsIPrincipal rpPrincipal, in nsIPrincipal idpPrincipal, in ACString credentialID); */
NS_IMETHOD Delete(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID) = 0;
/* [noscript] void storeIdentityCredential (in IPCIdentityCredentialRef credential); */
NS_IMETHOD StoreIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential) = 0;
/* [noscript] Array<IPCIdentityCredential> getIdentityCredentials (in Array<nsIPrincipal> idpPrincipal); */
NS_IMETHOD GetIdentityCredentials(const nsTArray<RefPtr<nsIPrincipal>>& idpPrincipal, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval) = 0;
/* [noscript] Array<IPCIdentityCredential> getIdentityCredentialsOfType (in ACString type); */
NS_IMETHOD GetIdentityCredentialsOfType(const nsACString& type, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval) = 0;
/* [noscript] void deleteIdentityCredential (in IPCIdentityCredentialRef credential); */
NS_IMETHOD DeleteIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential) = 0;
/* void clear (); */
NS_IMETHOD Clear(void) = 0;
/* void deleteFromBaseDomain (in ACString baseDomain); */
NS_IMETHOD DeleteFromBaseDomain(const nsACString& baseDomain) = 0;
/* void deleteFromPrincipal (in nsIPrincipal rpPrincipal); */
NS_IMETHOD DeleteFromPrincipal(nsIPrincipal *rpPrincipal) = 0;
/* void deleteFromTimeRange (in PRTime aFrom, in PRTime aTo); */
NS_IMETHOD DeleteFromTimeRange(PRTime aFrom, PRTime aTo) = 0;
/* void deleteFromOriginAttributesPattern (in AString aPattern); */
NS_IMETHOD DeleteFromOriginAttributesPattern(const nsAString& aPattern) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIIdentityCredentialStorageService, NS_IIDENTITYCREDENTIALSTORAGESERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIIDENTITYCREDENTIALSTORAGESERVICE \
NS_IMETHOD SetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool registered, bool allowLogout) override; \
NS_IMETHOD GetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool *registered, bool *allowLogout) override; \
NS_IMETHOD Delete(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID) override; \
NS_IMETHOD StoreIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential) override; \
NS_IMETHOD GetIdentityCredentials(const nsTArray<RefPtr<nsIPrincipal>>& idpPrincipal, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval) override; \
NS_IMETHOD GetIdentityCredentialsOfType(const nsACString& type, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval) override; \
NS_IMETHOD DeleteIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential) override; \
NS_IMETHOD Clear(void) override; \
NS_IMETHOD DeleteFromBaseDomain(const nsACString& baseDomain) override; \
NS_IMETHOD DeleteFromPrincipal(nsIPrincipal *rpPrincipal) override; \
NS_IMETHOD DeleteFromTimeRange(PRTime aFrom, PRTime aTo) override; \
NS_IMETHOD DeleteFromOriginAttributesPattern(const nsAString& aPattern) 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_NSIIDENTITYCREDENTIALSTORAGESERVICE \
nsresult SetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool registered, bool allowLogout); \
nsresult GetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool *registered, bool *allowLogout); \
nsresult Delete(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID); \
nsresult StoreIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential); \
nsresult GetIdentityCredentials(const nsTArray<RefPtr<nsIPrincipal>>& idpPrincipal, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval); \
nsresult GetIdentityCredentialsOfType(const nsACString& type, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval); \
nsresult DeleteIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential); \
nsresult Clear(void); \
nsresult DeleteFromBaseDomain(const nsACString& baseDomain); \
nsresult DeleteFromPrincipal(nsIPrincipal *rpPrincipal); \
nsresult DeleteFromTimeRange(PRTime aFrom, PRTime aTo); \
nsresult DeleteFromOriginAttributesPattern(const nsAString& aPattern);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIIDENTITYCREDENTIALSTORAGESERVICE(_to) \
NS_IMETHOD SetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool registered, bool allowLogout) override { return _to SetState(rpPrincipal, idpPrincipal, credentialID, registered, allowLogout); } \
NS_IMETHOD GetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool *registered, bool *allowLogout) override { return _to GetState(rpPrincipal, idpPrincipal, credentialID, registered, allowLogout); } \
NS_IMETHOD Delete(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID) override { return _to Delete(rpPrincipal, idpPrincipal, credentialID); } \
NS_IMETHOD StoreIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential) override { return _to StoreIdentityCredential(credential); } \
NS_IMETHOD GetIdentityCredentials(const nsTArray<RefPtr<nsIPrincipal>>& idpPrincipal, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval) override { return _to GetIdentityCredentials(idpPrincipal, _retval); } \
NS_IMETHOD GetIdentityCredentialsOfType(const nsACString& type, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval) override { return _to GetIdentityCredentialsOfType(type, _retval); } \
NS_IMETHOD DeleteIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential) override { return _to DeleteIdentityCredential(credential); } \
NS_IMETHOD Clear(void) override { return _to Clear(); } \
NS_IMETHOD DeleteFromBaseDomain(const nsACString& baseDomain) override { return _to DeleteFromBaseDomain(baseDomain); } \
NS_IMETHOD DeleteFromPrincipal(nsIPrincipal *rpPrincipal) override { return _to DeleteFromPrincipal(rpPrincipal); } \
NS_IMETHOD DeleteFromTimeRange(PRTime aFrom, PRTime aTo) override { return _to DeleteFromTimeRange(aFrom, aTo); } \
NS_IMETHOD DeleteFromOriginAttributesPattern(const nsAString& aPattern) override { return _to DeleteFromOriginAttributesPattern(aPattern); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIIDENTITYCREDENTIALSTORAGESERVICE(_to) \
NS_IMETHOD SetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool registered, bool allowLogout) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetState(rpPrincipal, idpPrincipal, credentialID, registered, allowLogout); } \
NS_IMETHOD GetState(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID, bool *registered, bool *allowLogout) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetState(rpPrincipal, idpPrincipal, credentialID, registered, allowLogout); } \
NS_IMETHOD Delete(nsIPrincipal *rpPrincipal, nsIPrincipal *idpPrincipal, const nsACString& credentialID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Delete(rpPrincipal, idpPrincipal, credentialID); } \
NS_IMETHOD StoreIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StoreIdentityCredential(credential); } \
NS_IMETHOD GetIdentityCredentials(const nsTArray<RefPtr<nsIPrincipal>>& idpPrincipal, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdentityCredentials(idpPrincipal, _retval); } \
NS_IMETHOD GetIdentityCredentialsOfType(const nsACString& type, nsTArray<mozilla::dom::IPCIdentityCredential >& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdentityCredentialsOfType(type, _retval); } \
NS_IMETHOD DeleteIdentityCredential(const mozilla::dom::IPCIdentityCredential & credential) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteIdentityCredential(credential); } \
NS_IMETHOD Clear(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Clear(); } \
NS_IMETHOD DeleteFromBaseDomain(const nsACString& baseDomain) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteFromBaseDomain(baseDomain); } \
NS_IMETHOD DeleteFromPrincipal(nsIPrincipal *rpPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteFromPrincipal(rpPrincipal); } \
NS_IMETHOD DeleteFromTimeRange(PRTime aFrom, PRTime aTo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteFromTimeRange(aFrom, aTo); } \
NS_IMETHOD DeleteFromOriginAttributesPattern(const nsAString& aPattern) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteFromOriginAttributesPattern(aPattern); }
#endif /* __gen_nsIIdentityCredentialStorageService_h__ */