Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/xpcom/threads/nsIThreadShutdown.idl
*/
#ifndef __gen_nsIThreadShutdown_h__
#define __gen_nsIThreadShutdown_h__
#include "nsISupports.h"
#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIRunnable; /* forward declaration */
/* starting interface: nsIThreadShutdown */
#define NS_ITHREADSHUTDOWN_IID_STR "70a43748-6130-4ea6-a440-7c74e1b7dd7c"
#define NS_ITHREADSHUTDOWN_IID \
{0x70a43748, 0x6130, 0x4ea6, \
{ 0xa4, 0x40, 0x7c, 0x74, 0xe1, 0xb7, 0xdd, 0x7c }}
class NS_NO_VTABLE nsIThreadShutdown : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITHREADSHUTDOWN_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIThreadShutdown;
/* void onCompletion (in nsIRunnable aEvent); */
NS_IMETHOD OnCompletion(nsIRunnable *aEvent) = 0;
/* [infallible] readonly attribute boolean completed; */
NS_IMETHOD GetCompleted(bool *aCompleted) = 0;
inline bool GetCompleted()
{
bool result;
mozilla::DebugOnly<nsresult> rv = GetCompleted(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
/* void stopWaitingAndLeakThread (); */
NS_IMETHOD StopWaitingAndLeakThread(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIThreadShutdown, NS_ITHREADSHUTDOWN_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITHREADSHUTDOWN \
NS_IMETHOD OnCompletion(nsIRunnable *aEvent) override; \
using nsIThreadShutdown::GetCompleted; \
NS_IMETHOD GetCompleted(bool *aCompleted) override; \
NS_IMETHOD StopWaitingAndLeakThread(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_NSITHREADSHUTDOWN \
nsresult OnCompletion(nsIRunnable *aEvent); \
using nsIThreadShutdown::GetCompleted; \
nsresult GetCompleted(bool *aCompleted); \
nsresult StopWaitingAndLeakThread(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITHREADSHUTDOWN(_to) \
NS_IMETHOD OnCompletion(nsIRunnable *aEvent) override { return _to OnCompletion(aEvent); } \
using nsIThreadShutdown::GetCompleted; \
NS_IMETHOD GetCompleted(bool *aCompleted) override { return _to GetCompleted(aCompleted); } \
NS_IMETHOD StopWaitingAndLeakThread(void) override { return _to StopWaitingAndLeakThread(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITHREADSHUTDOWN(_to) \
NS_IMETHOD OnCompletion(nsIRunnable *aEvent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCompletion(aEvent); } \
NS_IMETHOD GetCompleted(bool *aCompleted) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCompleted(aCompleted); } \
NS_IMETHOD StopWaitingAndLeakThread(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StopWaitingAndLeakThread(); }
#endif /* __gen_nsIThreadShutdown_h__ */