Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/cache2/nsICachePurgeLock.idl
*/
#ifndef __gen_nsICachePurgeLock_h__
#define __gen_nsICachePurgeLock_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 nsIFile; /* forward declaration */
/* starting interface: nsICachePurgeLock */
#define NS_ICACHEPURGELOCK_IID_STR "8abb21e3-c6a0-4b4d-9333-cc0d72f2c23b"
#define NS_ICACHEPURGELOCK_IID \
{0x8abb21e3, 0xc6a0, 0x4b4d, \
{ 0x93, 0x33, 0xcc, 0x0d, 0x72, 0xf2, 0xc2, 0x3b }}
class NS_NO_VTABLE nsICachePurgeLock : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICACHEPURGELOCK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsICachePurgeLock;
/* void lock (in AUTF8String profileName); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Lock(const nsACString& profileName) = 0;
/* boolean isOtherInstanceRunning (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsOtherInstanceRunning(bool *_retval) = 0;
/* void unlock (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Unlock(void) = 0;
/* nsIFile getLockFile (in AUTF8String profileName); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetLockFile(const nsACString& profileName, nsIFile **_retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICachePurgeLock, NS_ICACHEPURGELOCK_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICACHEPURGELOCK \
NS_IMETHOD Lock(const nsACString& profileName) override; \
NS_IMETHOD IsOtherInstanceRunning(bool *_retval) override; \
NS_IMETHOD Unlock(void) override; \
NS_IMETHOD GetLockFile(const nsACString& profileName, nsIFile **_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_NSICACHEPURGELOCK \
nsresult Lock(const nsACString& profileName); \
nsresult IsOtherInstanceRunning(bool *_retval); \
nsresult Unlock(void); \
nsresult GetLockFile(const nsACString& profileName, nsIFile **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICACHEPURGELOCK(_to) \
NS_IMETHOD Lock(const nsACString& profileName) override { return _to Lock(profileName); } \
NS_IMETHOD IsOtherInstanceRunning(bool *_retval) override { return _to IsOtherInstanceRunning(_retval); } \
NS_IMETHOD Unlock(void) override { return _to Unlock(); } \
NS_IMETHOD GetLockFile(const nsACString& profileName, nsIFile **_retval) override { return _to GetLockFile(profileName, _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_NSICACHEPURGELOCK(_to) \
NS_IMETHOD Lock(const nsACString& profileName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Lock(profileName); } \
NS_IMETHOD IsOtherInstanceRunning(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsOtherInstanceRunning(_retval); } \
NS_IMETHOD Unlock(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Unlock(); } \
NS_IMETHOD GetLockFile(const nsACString& profileName, nsIFile **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLockFile(profileName, _retval); }
#endif /* __gen_nsICachePurgeLock_h__ */