Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/base/nsIMockNetworkLayerController.idl
*/
#ifndef __gen_nsIMockNetworkLayerController_h__
#define __gen_nsIMockNetworkLayerController_h__
#include "nsISupports.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsINetAddr; /* forward declaration */
/* starting interface: nsIMockNetworkLayerController */
#define NS_IMOCKNETWORKLAYERCONTROLLER_IID_STR "8ef68853-dbea-4113-9dce-273b45d431c5"
#define NS_IMOCKNETWORKLAYERCONTROLLER_IID \
{0x8ef68853, 0xdbea, 0x4113, \
{ 0x9d, 0xce, 0x27, 0x3b, 0x45, 0xd4, 0x31, 0xc5 }}
class NS_NO_VTABLE nsIMockNetworkLayerController : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMOCKNETWORKLAYERCONTROLLER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIMockNetworkLayerController;
/* nsINetAddr createScriptableNetAddr (in AUTF8String aIP, in uint16_t aPort); */
NS_IMETHOD CreateScriptableNetAddr(const nsACString& aIP, uint16_t aPort, nsINetAddr **_retval) = 0;
/* void addNetAddrOverride (in nsINetAddr aFrom, in nsINetAddr aTo); */
NS_IMETHOD AddNetAddrOverride(nsINetAddr *aFrom, nsINetAddr *aTo) = 0;
/* void clearNetAddrOverrides (); */
NS_IMETHOD ClearNetAddrOverrides(void) = 0;
/* void blockUDPAddrIO (in nsINetAddr aAddr); */
NS_IMETHOD BlockUDPAddrIO(nsINetAddr *aAddr) = 0;
/* void clearBlockedUDPAddr (); */
NS_IMETHOD ClearBlockedUDPAddr(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIMockNetworkLayerController, NS_IMOCKNETWORKLAYERCONTROLLER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMOCKNETWORKLAYERCONTROLLER \
NS_IMETHOD CreateScriptableNetAddr(const nsACString& aIP, uint16_t aPort, nsINetAddr **_retval) override; \
NS_IMETHOD AddNetAddrOverride(nsINetAddr *aFrom, nsINetAddr *aTo) override; \
NS_IMETHOD ClearNetAddrOverrides(void) override; \
NS_IMETHOD BlockUDPAddrIO(nsINetAddr *aAddr) override; \
NS_IMETHOD ClearBlockedUDPAddr(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_NSIMOCKNETWORKLAYERCONTROLLER \
nsresult CreateScriptableNetAddr(const nsACString& aIP, uint16_t aPort, nsINetAddr **_retval); \
nsresult AddNetAddrOverride(nsINetAddr *aFrom, nsINetAddr *aTo); \
nsresult ClearNetAddrOverrides(void); \
nsresult BlockUDPAddrIO(nsINetAddr *aAddr); \
nsresult ClearBlockedUDPAddr(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMOCKNETWORKLAYERCONTROLLER(_to) \
NS_IMETHOD CreateScriptableNetAddr(const nsACString& aIP, uint16_t aPort, nsINetAddr **_retval) override { return _to CreateScriptableNetAddr(aIP, aPort, _retval); } \
NS_IMETHOD AddNetAddrOverride(nsINetAddr *aFrom, nsINetAddr *aTo) override { return _to AddNetAddrOverride(aFrom, aTo); } \
NS_IMETHOD ClearNetAddrOverrides(void) override { return _to ClearNetAddrOverrides(); } \
NS_IMETHOD BlockUDPAddrIO(nsINetAddr *aAddr) override { return _to BlockUDPAddrIO(aAddr); } \
NS_IMETHOD ClearBlockedUDPAddr(void) override { return _to ClearBlockedUDPAddr(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMOCKNETWORKLAYERCONTROLLER(_to) \
NS_IMETHOD CreateScriptableNetAddr(const nsACString& aIP, uint16_t aPort, nsINetAddr **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateScriptableNetAddr(aIP, aPort, _retval); } \
NS_IMETHOD AddNetAddrOverride(nsINetAddr *aFrom, nsINetAddr *aTo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddNetAddrOverride(aFrom, aTo); } \
NS_IMETHOD ClearNetAddrOverrides(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearNetAddrOverrides(); } \
NS_IMETHOD BlockUDPAddrIO(nsINetAddr *aAddr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BlockUDPAddrIO(aAddr); } \
NS_IMETHOD ClearBlockedUDPAddr(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearBlockedUDPAddr(); }
#endif /* __gen_nsIMockNetworkLayerController_h__ */