Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/mozapps/defaultagent/nsIWindowsMutex.idl
*/
#ifndef __gen_nsIWindowsMutex_h__
#define __gen_nsIWindowsMutex_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
/* starting interface: nsIWindowsMutex */
#define NS_IWINDOWSMUTEX_IID_STR "26f09999-c26e-4b72-8747-5adaefa0914c"
#define NS_IWINDOWSMUTEX_IID \
{0x26f09999, 0xc26e, 0x4b72, \
{ 0x87, 0x47, 0x5a, 0xda, 0xef, 0xa0, 0x91, 0x4c }}
class NS_NO_VTABLE nsIWindowsMutex : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWINDOWSMUTEX_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIWindowsMutex;
/* void tryLock (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TryLock(void) = 0;
/* boolean isLocked (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsLocked(bool *_retval) = 0;
/* void unlock (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Unlock(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIWindowsMutex, NS_IWINDOWSMUTEX_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIWINDOWSMUTEX \
NS_IMETHOD TryLock(void) override; \
NS_IMETHOD IsLocked(bool *_retval) override; \
NS_IMETHOD Unlock(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_NSIWINDOWSMUTEX \
nsresult TryLock(void); \
nsresult IsLocked(bool *_retval); \
nsresult Unlock(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIWINDOWSMUTEX(_to) \
NS_IMETHOD TryLock(void) override { return _to TryLock(); } \
NS_IMETHOD IsLocked(bool *_retval) override { return _to IsLocked(_retval); } \
NS_IMETHOD Unlock(void) override { return _to Unlock(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIWINDOWSMUTEX(_to) \
NS_IMETHOD TryLock(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TryLock(); } \
NS_IMETHOD IsLocked(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsLocked(_retval); } \
NS_IMETHOD Unlock(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Unlock(); }
/* starting interface: nsIWindowsMutexFactory */
#define NS_IWINDOWSMUTEXFACTORY_IID_STR "d54fe2b7-438f-4629-9706-1acda5b51088"
#define NS_IWINDOWSMUTEXFACTORY_IID \
{0xd54fe2b7, 0x438f, 0x4629, \
{ 0x97, 0x06, 0x1a, 0xcd, 0xa5, 0xb5, 0x10, 0x88 }}
class NS_NO_VTABLE nsIWindowsMutexFactory : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWINDOWSMUTEXFACTORY_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIWindowsMutexFactory;
/* nsIWindowsMutex createMutex (in AString aName); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateMutex(const nsAString& aName, nsIWindowsMutex **_retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIWindowsMutexFactory, NS_IWINDOWSMUTEXFACTORY_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIWINDOWSMUTEXFACTORY \
NS_IMETHOD CreateMutex(const nsAString& aName, nsIWindowsMutex **_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_NSIWINDOWSMUTEXFACTORY \
nsresult CreateMutex(const nsAString& aName, nsIWindowsMutex **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIWINDOWSMUTEXFACTORY(_to) \
NS_IMETHOD CreateMutex(const nsAString& aName, nsIWindowsMutex **_retval) override { return _to CreateMutex(aName, _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_NSIWINDOWSMUTEXFACTORY(_to) \
NS_IMETHOD CreateMutex(const nsAString& aName, nsIWindowsMutex **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateMutex(aName, _retval); }
#endif /* __gen_nsIWindowsMutex_h__ */