/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/url-classifier/nsIUrlClassifierFeature.idl */ #ifndef __gen_nsIUrlClassifierFeature_h__ #define __gen_nsIUrlClassifierFeature_h__ #include "nsISupports.h" #include "nsIUrlClassifierExceptionList.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 // %{C++:8-9 #include "nsStringFwd.h" #include "nsTArrayForwardDeclare.h" // %} class nsIChannel; /* forward declaration */ class nsIURI; /* forward declaration */ /* starting interface: nsIUrlClassifierFeature */ #define NS_IURLCLASSIFIERFEATURE_IID_STR "a6c9b24e-b4f1-426e-af58-2c976c3943a8" #define NS_IURLCLASSIFIERFEATURE_IID \ {0xa6c9b24e, 0xb4f1, 0x426e, \ { 0xaf, 0x58, 0x2c, 0x97, 0x6c, 0x39, 0x43, 0xa8 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIUrlClassifierFeature) nsIUrlClassifierFeature : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IURLCLASSIFIERFEATURE_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIUrlClassifierFeature; enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIUrlClassifierFeature_listType) listType : uint8_t { blocklist MOZ_BINDING(binding_to, idl, const, XPIDL_nsIUrlClassifierFeature_listType_blocklist) = 0, entitylist MOZ_BINDING(binding_to, idl, const, XPIDL_nsIUrlClassifierFeature_listType_entitylist) = 1, }; enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIUrlClassifierFeature_URIType) URIType : uint8_t { blocklistURI MOZ_BINDING(binding_to, idl, const, XPIDL_nsIUrlClassifierFeature_URIType_blocklistURI) = 0, entitylistURI MOZ_BINDING(binding_to, idl, const, XPIDL_nsIUrlClassifierFeature_URIType_entitylistURI) = 1, pairwiseEntitylistURI MOZ_BINDING(binding_to, idl, const, XPIDL_nsIUrlClassifierFeature_URIType_pairwiseEntitylistURI) = 2, }; /* readonly attribute ACString name; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeature_name) NS_IMETHOD GetName(nsACString& aName) = 0; /* [noscript] StringArrayRef getTables (in nsIUrlClassifierFeature_listType aListType); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_getTables) NS_IMETHOD GetTables(nsIUrlClassifierFeature::listType aListType, nsTArray & _retval) = 0; /* [noscript] boolean hasTable (in ACString aTable, in nsIUrlClassifierFeature_listType aListType); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_hasTable) NS_IMETHOD HasTable(const nsACString& aTable, nsIUrlClassifierFeature::listType aListType, bool *_retval) = 0; /* [noscript] boolean hasHostInPreferences (in ACString aHost, in nsIUrlClassifierFeature_listType aListType, out ACString aPrefTableName); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_hasHostInPreferences) NS_IMETHOD HasHostInPreferences(const nsACString& aHost, nsIUrlClassifierFeature::listType aListType, nsACString& aPrefTableName, bool *_retval) = 0; /* readonly attribute nsIUrlClassifierExceptionList exceptionList; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeature_exceptionList) NS_IMETHOD GetExceptionList(nsIUrlClassifierExceptionList **aExceptionList) = 0; /* [noscript] boolean processChannel (in nsIChannel aChannel, in ConstStringArrayRef aList, in ConstStringArrayRef aHashes); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_processChannel) NS_IMETHOD ProcessChannel(nsIChannel *aChannel, const nsTArray & aList, const nsTArray & aHashes, bool *_retval) = 0; /* [noscript] nsIURI getURIByListType (in nsIChannel channel, in nsIUrlClassifierFeature_listType listType, out nsIUrlClassifierFeature_URIType URIType); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_getURIByListType) NS_IMETHOD GetURIByListType(nsIChannel *channel, nsIUrlClassifierFeature::listType listType, nsIUrlClassifierFeature::URIType *URIType, nsIURI **_retval) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIURLCLASSIFIERFEATURE \ NS_IMETHOD GetName(nsACString& aName) override; \ NS_IMETHOD GetTables(nsIUrlClassifierFeature::listType aListType, nsTArray & _retval) override; \ NS_IMETHOD HasTable(const nsACString& aTable, nsIUrlClassifierFeature::listType aListType, bool *_retval) override; \ NS_IMETHOD HasHostInPreferences(const nsACString& aHost, nsIUrlClassifierFeature::listType aListType, nsACString& aPrefTableName, bool *_retval) override; \ NS_IMETHOD GetExceptionList(nsIUrlClassifierExceptionList **aExceptionList) override; \ NS_IMETHOD ProcessChannel(nsIChannel *aChannel, const nsTArray & aList, const nsTArray & aHashes, bool *_retval) override; \ NS_IMETHOD GetURIByListType(nsIChannel *channel, nsIUrlClassifierFeature::listType listType, nsIUrlClassifierFeature::URIType *URIType, nsIURI **_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_NSIURLCLASSIFIERFEATURE \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeature_name)\ nsresult GetName(nsACString& aName); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_getTables)\ nsresult GetTables(nsIUrlClassifierFeature::listType aListType, nsTArray & _retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_hasTable)\ nsresult HasTable(const nsACString& aTable, nsIUrlClassifierFeature::listType aListType, bool *_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_hasHostInPreferences)\ nsresult HasHostInPreferences(const nsACString& aHost, nsIUrlClassifierFeature::listType aListType, nsACString& aPrefTableName, bool *_retval); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeature_exceptionList)\ nsresult GetExceptionList(nsIUrlClassifierExceptionList **aExceptionList); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_processChannel)\ nsresult ProcessChannel(nsIChannel *aChannel, const nsTArray & aList, const nsTArray & aHashes, bool *_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeature_getURIByListType)\ nsresult GetURIByListType(nsIChannel *channel, nsIUrlClassifierFeature::listType listType, nsIUrlClassifierFeature::URIType *URIType, nsIURI **_retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIURLCLASSIFIERFEATURE(_to) \ NS_IMETHOD GetName(nsACString& aName) override { return _to GetName(aName); } \ NS_IMETHOD GetTables(nsIUrlClassifierFeature::listType aListType, nsTArray & _retval) override { return _to GetTables(aListType, _retval); } \ NS_IMETHOD HasTable(const nsACString& aTable, nsIUrlClassifierFeature::listType aListType, bool *_retval) override { return _to HasTable(aTable, aListType, _retval); } \ NS_IMETHOD HasHostInPreferences(const nsACString& aHost, nsIUrlClassifierFeature::listType aListType, nsACString& aPrefTableName, bool *_retval) override { return _to HasHostInPreferences(aHost, aListType, aPrefTableName, _retval); } \ NS_IMETHOD GetExceptionList(nsIUrlClassifierExceptionList **aExceptionList) override { return _to GetExceptionList(aExceptionList); } \ NS_IMETHOD ProcessChannel(nsIChannel *aChannel, const nsTArray & aList, const nsTArray & aHashes, bool *_retval) override { return _to ProcessChannel(aChannel, aList, aHashes, _retval); } \ NS_IMETHOD GetURIByListType(nsIChannel *channel, nsIUrlClassifierFeature::listType listType, nsIUrlClassifierFeature::URIType *URIType, nsIURI **_retval) override { return _to GetURIByListType(channel, listType, URIType, _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_NSIURLCLASSIFIERFEATURE(_to) \ NS_IMETHOD GetName(nsACString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ NS_IMETHOD GetTables(nsIUrlClassifierFeature::listType aListType, nsTArray & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTables(aListType, _retval); } \ NS_IMETHOD HasTable(const nsACString& aTable, nsIUrlClassifierFeature::listType aListType, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasTable(aTable, aListType, _retval); } \ NS_IMETHOD HasHostInPreferences(const nsACString& aHost, nsIUrlClassifierFeature::listType aListType, nsACString& aPrefTableName, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasHostInPreferences(aHost, aListType, aPrefTableName, _retval); } \ NS_IMETHOD GetExceptionList(nsIUrlClassifierExceptionList **aExceptionList) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExceptionList(aExceptionList); } \ NS_IMETHOD ProcessChannel(nsIChannel *aChannel, const nsTArray & aList, const nsTArray & aHashes, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ProcessChannel(aChannel, aList, aHashes, _retval); } \ NS_IMETHOD GetURIByListType(nsIChannel *channel, nsIUrlClassifierFeature::listType listType, nsIUrlClassifierFeature::URIType *URIType, nsIURI **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURIByListType(channel, listType, URIType, _retval); } /* starting interface: nsIUrlClassifierFeatureResult */ #define NS_IURLCLASSIFIERFEATURERESULT_IID_STR "ccb88140-5d66-4873-9815-a1b98d6cdc92" #define NS_IURLCLASSIFIERFEATURERESULT_IID \ {0xccb88140, 0x5d66, 0x4873, \ { 0x98, 0x15, 0xa1, 0xb9, 0x8d, 0x6c, 0xdc, 0x92 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIUrlClassifierFeatureResult) nsIUrlClassifierFeatureResult : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IURLCLASSIFIERFEATURERESULT_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIUrlClassifierFeatureResult; /* readonly attribute nsIURI uri; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeatureResult_uri) NS_IMETHOD GetUri(nsIURI **aUri) = 0; /* readonly attribute nsIUrlClassifierFeature feature; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeatureResult_feature) NS_IMETHOD GetFeature(nsIUrlClassifierFeature **aFeature) = 0; /* readonly attribute ACString list; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeatureResult_list) NS_IMETHOD GetList(nsACString& aList) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIURLCLASSIFIERFEATURERESULT \ NS_IMETHOD GetUri(nsIURI **aUri) override; \ NS_IMETHOD GetFeature(nsIUrlClassifierFeature **aFeature) override; \ NS_IMETHOD GetList(nsACString& aList) 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_NSIURLCLASSIFIERFEATURERESULT \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeatureResult_uri)\ nsresult GetUri(nsIURI **aUri); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeatureResult_feature)\ nsresult GetFeature(nsIUrlClassifierFeature **aFeature); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIUrlClassifierFeatureResult_list)\ nsresult GetList(nsACString& aList); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIURLCLASSIFIERFEATURERESULT(_to) \ NS_IMETHOD GetUri(nsIURI **aUri) override { return _to GetUri(aUri); } \ NS_IMETHOD GetFeature(nsIUrlClassifierFeature **aFeature) override { return _to GetFeature(aFeature); } \ NS_IMETHOD GetList(nsACString& aList) override { return _to GetList(aList); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIURLCLASSIFIERFEATURERESULT(_to) \ NS_IMETHOD GetUri(nsIURI **aUri) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUri(aUri); } \ NS_IMETHOD GetFeature(nsIUrlClassifierFeature **aFeature) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFeature(aFeature); } \ NS_IMETHOD GetList(nsACString& aList) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetList(aList); } /* starting interface: nsIUrlClassifierFeatureCallback */ #define NS_IURLCLASSIFIERFEATURECALLBACK_IID_STR "2ea83c26-dfc9-44ed-9cfc-171d4753d78e" #define NS_IURLCLASSIFIERFEATURECALLBACK_IID \ {0x2ea83c26, 0xdfc9, 0x44ed, \ { 0x9c, 0xfc, 0x17, 0x1d, 0x47, 0x53, 0xd7, 0x8e }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIUrlClassifierFeatureCallback) nsIUrlClassifierFeatureCallback : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IURLCLASSIFIERFEATURECALLBACK_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIUrlClassifierFeatureCallback; /* void onClassifyComplete (in Array aResults); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeatureCallback_onClassifyComplete) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnClassifyComplete(const nsTArray>& aResults) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIURLCLASSIFIERFEATURECALLBACK \ NS_IMETHOD OnClassifyComplete(const nsTArray>& aResults) 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_NSIURLCLASSIFIERFEATURECALLBACK \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIUrlClassifierFeatureCallback_onClassifyComplete)\ nsresult OnClassifyComplete(const nsTArray>& aResults); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIURLCLASSIFIERFEATURECALLBACK(_to) \ NS_IMETHOD OnClassifyComplete(const nsTArray>& aResults) override { return _to OnClassifyComplete(aResults); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIURLCLASSIFIERFEATURECALLBACK(_to) \ NS_IMETHOD OnClassifyComplete(const nsTArray>& aResults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnClassifyComplete(aResults); } #endif /* __gen_nsIUrlClassifierFeature_h__ */