Generated file

Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/content-classifier/nsIContentClassifierService.idl
*/
#ifndef __gen_nsIContentClassifierService_h__
#define __gen_nsIContentClassifierService_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
/* starting interface: nsIContentClassifierService */
#define NS_ICONTENTCLASSIFIERSERVICE_IID_STR "1afc121b-6849-4ba4-a515-c7e91f20d0dc"
#define NS_ICONTENTCLASSIFIERSERVICE_IID \
{0x1afc121b, 0x6849, 0x4ba4, \
{ 0xa5, 0x15, 0xc7, 0xe9, 0x1f, 0x20, 0xd0, 0xdc }}
class NS_NO_VTABLE nsIContentClassifierService : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_ICONTENTCLASSIFIERSERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIContentClassifierService;
/* void setFilterListData (in ACString aName, in Array<uint8_t> aData); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetFilterListData(const nsACString& aName, const nsTArray<uint8_t >& aData) = 0;
/* void removeFilterList (in ACString aName); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveFilterList(const nsACString& aName) = 0;
/* void applyFilterLists (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ApplyFilterLists(void) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICONTENTCLASSIFIERSERVICE \
NS_IMETHOD SetFilterListData(const nsACString& aName, const nsTArray<uint8_t >& aData) override; \
NS_IMETHOD RemoveFilterList(const nsACString& aName) override; \
NS_IMETHOD ApplyFilterLists(void) 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_NSICONTENTCLASSIFIERSERVICE \
nsresult SetFilterListData(const nsACString& aName, const nsTArray<uint8_t >& aData); \
nsresult RemoveFilterList(const nsACString& aName); \
nsresult ApplyFilterLists(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICONTENTCLASSIFIERSERVICE(_to) \
NS_IMETHOD SetFilterListData(const nsACString& aName, const nsTArray<uint8_t >& aData) override { return _to SetFilterListData(aName, aData); } \
NS_IMETHOD RemoveFilterList(const nsACString& aName) override { return _to RemoveFilterList(aName); } \
NS_IMETHOD ApplyFilterLists(void) override { return _to ApplyFilterLists(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICONTENTCLASSIFIERSERVICE(_to) \
NS_IMETHOD SetFilterListData(const nsACString& aName, const nsTArray<uint8_t >& aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFilterListData(aName, aData); } \
NS_IMETHOD RemoveFilterList(const nsACString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveFilterList(aName); } \
NS_IMETHOD ApplyFilterLists(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ApplyFilterLists(); }
// %{C++:34-38
// Fired after filter list engines have been rebuilt, when the testing
// pref (privacy.trackingprotection.content.testing) is set. Not fired
// in production.
#define NS_CONTENT_CLASSIFIER_FILTER_LISTS_LOADED_TOPIC \
"test-content-classifier-filter-lists-loaded"
// %}
#endif /* __gen_nsIContentClassifierService_h__ */