Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/autocomplete/nsIAutoCompleteSearch.idl
*/
#ifndef __gen_nsIAutoCompleteSearch_h__
#define __gen_nsIAutoCompleteSearch_h__
#include "nsISupports.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 nsIAutoCompleteResult; /* forward declaration */
class nsIAutoCompleteObserver; /* forward declaration */
class nsIPropertyBag2; /* forward declaration */
/* starting interface: nsIAutoCompleteSearch */
#define NS_IAUTOCOMPLETESEARCH_IID_STR "de8db85f-c1de-4d87-94ba-7844890f91fe"
#define NS_IAUTOCOMPLETESEARCH_IID \
{0xde8db85f, 0xc1de, 0x4d87, \
{ 0x94, 0xba, 0x78, 0x44, 0x89, 0x0f, 0x91, 0xfe }}
class NS_NO_VTABLE nsIAutoCompleteSearch : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAUTOCOMPLETESEARCH_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAutoCompleteSearch;
/* void startSearch (in AString searchString, in AString searchParam, in nsIAutoCompleteResult previousResult, in nsIAutoCompleteObserver listener); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD StartSearch(const nsAString& searchString, const nsAString& searchParam, nsIAutoCompleteResult *previousResult, nsIAutoCompleteObserver *listener) = 0;
/* void stopSearch (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD StopSearch(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAutoCompleteSearch, NS_IAUTOCOMPLETESEARCH_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIAUTOCOMPLETESEARCH \
NS_IMETHOD StartSearch(const nsAString& searchString, const nsAString& searchParam, nsIAutoCompleteResult *previousResult, nsIAutoCompleteObserver *listener) override; \
NS_IMETHOD StopSearch(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_NSIAUTOCOMPLETESEARCH \
nsresult StartSearch(const nsAString& searchString, const nsAString& searchParam, nsIAutoCompleteResult *previousResult, nsIAutoCompleteObserver *listener); \
nsresult StopSearch(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIAUTOCOMPLETESEARCH(_to) \
NS_IMETHOD StartSearch(const nsAString& searchString, const nsAString& searchParam, nsIAutoCompleteResult *previousResult, nsIAutoCompleteObserver *listener) override { return _to StartSearch(searchString, searchParam, previousResult, listener); } \
NS_IMETHOD StopSearch(void) override { return _to StopSearch(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIAUTOCOMPLETESEARCH(_to) \
NS_IMETHOD StartSearch(const nsAString& searchString, const nsAString& searchParam, nsIAutoCompleteResult *previousResult, nsIAutoCompleteObserver *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartSearch(searchString, searchParam, previousResult, listener); } \
NS_IMETHOD StopSearch(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StopSearch(); }
/* starting interface: nsIAutoCompleteObserver */
#define NS_IAUTOCOMPLETEOBSERVER_IID_STR "8bd1dbbc-dcce-4007-9afa-b551eb687b61"
#define NS_IAUTOCOMPLETEOBSERVER_IID \
{0x8bd1dbbc, 0xdcce, 0x4007, \
{ 0x9a, 0xfa, 0xb5, 0x51, 0xeb, 0x68, 0x7b, 0x61 }}
class NS_NO_VTABLE nsIAutoCompleteObserver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAUTOCOMPLETEOBSERVER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAutoCompleteObserver;
/* [can_run_script] void onSearchResult (in nsIAutoCompleteSearch search, in nsIAutoCompleteResult result); */
JS_HAZ_CAN_RUN_SCRIPT MOZ_CAN_RUN_SCRIPT NS_IMETHOD OnSearchResult(nsIAutoCompleteSearch *search, nsIAutoCompleteResult *result) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAutoCompleteObserver, NS_IAUTOCOMPLETEOBSERVER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIAUTOCOMPLETEOBSERVER \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD OnSearchResult(nsIAutoCompleteSearch *search, nsIAutoCompleteResult *result) 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_NSIAUTOCOMPLETEOBSERVER \
MOZ_CAN_RUN_SCRIPT nsresult OnSearchResult(nsIAutoCompleteSearch *search, nsIAutoCompleteResult *result);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIAUTOCOMPLETEOBSERVER(_to) \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD OnSearchResult(nsIAutoCompleteSearch *search, nsIAutoCompleteResult *result) override { return _to OnSearchResult(search, result); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIAUTOCOMPLETEOBSERVER(_to) \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD OnSearchResult(nsIAutoCompleteSearch *search, nsIAutoCompleteResult *result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSearchResult(search, result); }
#endif /* __gen_nsIAutoCompleteSearch_h__ */