Skip to content

Instantly share code, notes, and snippets.

@andreastt
Created September 30, 2019 14:43
Show Gist options
  • Save andreastt/3f25d5eefd10fbd11a7c26dd5c47ccc5 to your computer and use it in GitHub Desktop.
Save andreastt/3f25d5eefd10fbd11a7c26dd5c47ccc5 to your computer and use it in GitHub Desktop.
% cat dist/include/nsIRemoteAgent.h
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM /home/ato/src/gecko/remote/nsIRemoteAgent.idl
*/
#ifndef __gen_nsIRemoteAgent_h__
#define __gen_nsIRemoteAgent_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
#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 nsIURI; /* forward declaration */
#define NS_REMOTEAGENT_CONTRACTID "@mozilla.org/remote/agent"
#define NS_REMOTEAGENT_CID \
{ 0x799bce21, 0x98ab, 0x45f5, \
{ 0x92, 0xf4, 0xd9, 0x3e, 0x12, 0x98, 0x28, 0x5b } }
/* starting interface: nsIRemoteAgent */
#define NS_IREMOTEAGENT_IID_STR "799bce21-98ab-45f5-92f4-d93e1298285b"
#define NS_IREMOTEAGENT_IID \
{0x799bce21, 0x98ab, 0x45f5, \
{ 0x92, 0xf4, 0xd9, 0x3e, 0x12, 0x98, 0x28, 0x5b }}
class NS_NO_VTABLE nsIRemoteAgent : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IREMOTEAGENT_IID)
/* readonly attribute boolean listening; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetListening(bool *aListening) = 0;
/* void listen (in nsIURI aAddress); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Listen(nsIURI *aAddress) = 0;
/* void close (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Close(void) = 0;
/* readonly attribute AString scheme; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetScheme(nsAString& aScheme) = 0;
/* readonly attribute AString host; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHost(nsAString& aHost) = 0;
/* readonly attribute long port; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPort(int32_t *aPort) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIRemoteAgent, NS_IREMOTEAGENT_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIREMOTEAGENT \
NS_IMETHOD GetListening(bool *aListening) override; \
NS_IMETHOD Listen(nsIURI *aAddress) override; \
NS_IMETHOD Close(void) override; \
NS_IMETHOD GetScheme(nsAString& aScheme) override; \
NS_IMETHOD GetHost(nsAString& aHost) override; \
NS_IMETHOD GetPort(int32_t *aPort) 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_NSIREMOTEAGENT \
nsresult GetListening(bool *aListening); \
nsresult Listen(nsIURI *aAddress); \
nsresult Close(void); \
nsresult GetScheme(nsAString& aScheme); \
nsresult GetHost(nsAString& aHost); \
nsresult GetPort(int32_t *aPort);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIREMOTEAGENT(_to) \
NS_IMETHOD GetListening(bool *aListening) override { return _to GetListening(aListening); } \
NS_IMETHOD Listen(nsIURI *aAddress) override { return _to Listen(aAddress); } \
NS_IMETHOD Close(void) override { return _to Close(); } \
NS_IMETHOD GetScheme(nsAString& aScheme) override { return _to GetScheme(aScheme); } \
NS_IMETHOD GetHost(nsAString& aHost) override { return _to GetHost(aHost); } \
NS_IMETHOD GetPort(int32_t *aPort) override { return _to GetPort(aPort); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIREMOTEAGENT(_to) \
NS_IMETHOD GetListening(bool *aListening) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetListening(aListening); } \
NS_IMETHOD Listen(nsIURI *aAddress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Listen(aAddress); } \
NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
NS_IMETHOD GetScheme(nsAString& aScheme) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \
NS_IMETHOD GetHost(nsAString& aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
NS_IMETHOD GetPort(int32_t *aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); }
#endif /* __gen_nsIRemoteAgent_h__ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment