Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/dom/workers/nsIWorkerChannelInfo.idl
*/
#ifndef __gen_nsIWorkerChannelInfo_h__
#define __gen_nsIWorkerChannelInfo_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
namespace mozilla {
namespace dom {
class BrowsingContext; /* webidl BrowsingContext */
} // namespace dom
} // namespace mozilla
/* starting interface: nsIWorkerChannelLoadInfo */
#define NS_IWORKERCHANNELLOADINFO_IID_STR "bf9a175a-03bc-4d7b-ba2f-76347cf40d7b"
#define NS_IWORKERCHANNELLOADINFO_IID \
{0xbf9a175a, 0x03bc, 0x4d7b, \
{ 0xba, 0x2f, 0x76, 0x34, 0x7c, 0xf4, 0x0d, 0x7b }}
class NS_NO_VTABLE nsIWorkerChannelLoadInfo : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWORKERCHANNELLOADINFO_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIWorkerChannelLoadInfo;
/* [infallible] attribute unsigned long long workerAssociatedBrowsingContextID; */
NS_IMETHOD GetWorkerAssociatedBrowsingContextID(uint64_t *aWorkerAssociatedBrowsingContextID) = 0;
inline uint64_t GetWorkerAssociatedBrowsingContextID()
{
uint64_t result;
mozilla::DebugOnly<nsresult> rv = GetWorkerAssociatedBrowsingContextID(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
NS_IMETHOD SetWorkerAssociatedBrowsingContextID(uint64_t aWorkerAssociatedBrowsingContextID) = 0;
/* [infallible] readonly attribute BrowsingContext workerAssociatedBrowsingContext; */
NS_IMETHOD GetWorkerAssociatedBrowsingContext(mozilla::dom::BrowsingContext **aWorkerAssociatedBrowsingContext) = 0;
inline already_AddRefed<mozilla::dom::BrowsingContext> GetWorkerAssociatedBrowsingContext()
{
mozilla::dom::BrowsingContext* result = nullptr;
mozilla::DebugOnly<nsresult> rv = GetWorkerAssociatedBrowsingContext(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return already_AddRefed<mozilla::dom::BrowsingContext>(result);
}
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIWorkerChannelLoadInfo, NS_IWORKERCHANNELLOADINFO_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIWORKERCHANNELLOADINFO \
using nsIWorkerChannelLoadInfo::GetWorkerAssociatedBrowsingContextID; \
NS_IMETHOD GetWorkerAssociatedBrowsingContextID(uint64_t *aWorkerAssociatedBrowsingContextID) override; \
NS_IMETHOD SetWorkerAssociatedBrowsingContextID(uint64_t aWorkerAssociatedBrowsingContextID) override; \
using nsIWorkerChannelLoadInfo::GetWorkerAssociatedBrowsingContext; \
NS_IMETHOD GetWorkerAssociatedBrowsingContext(mozilla::dom::BrowsingContext **aWorkerAssociatedBrowsingContext) 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_NSIWORKERCHANNELLOADINFO \
using nsIWorkerChannelLoadInfo::GetWorkerAssociatedBrowsingContextID; \
nsresult GetWorkerAssociatedBrowsingContextID(uint64_t *aWorkerAssociatedBrowsingContextID); \
nsresult SetWorkerAssociatedBrowsingContextID(uint64_t aWorkerAssociatedBrowsingContextID); \
using nsIWorkerChannelLoadInfo::GetWorkerAssociatedBrowsingContext; \
nsresult GetWorkerAssociatedBrowsingContext(mozilla::dom::BrowsingContext **aWorkerAssociatedBrowsingContext);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIWORKERCHANNELLOADINFO(_to) \
using nsIWorkerChannelLoadInfo::GetWorkerAssociatedBrowsingContextID; \
NS_IMETHOD GetWorkerAssociatedBrowsingContextID(uint64_t *aWorkerAssociatedBrowsingContextID) override { return _to GetWorkerAssociatedBrowsingContextID(aWorkerAssociatedBrowsingContextID); } \
NS_IMETHOD SetWorkerAssociatedBrowsingContextID(uint64_t aWorkerAssociatedBrowsingContextID) override { return _to SetWorkerAssociatedBrowsingContextID(aWorkerAssociatedBrowsingContextID); } \
using nsIWorkerChannelLoadInfo::GetWorkerAssociatedBrowsingContext; \
NS_IMETHOD GetWorkerAssociatedBrowsingContext(mozilla::dom::BrowsingContext **aWorkerAssociatedBrowsingContext) override { return _to GetWorkerAssociatedBrowsingContext(aWorkerAssociatedBrowsingContext); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIWORKERCHANNELLOADINFO(_to) \
NS_IMETHOD GetWorkerAssociatedBrowsingContextID(uint64_t *aWorkerAssociatedBrowsingContextID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWorkerAssociatedBrowsingContextID(aWorkerAssociatedBrowsingContextID); } \
NS_IMETHOD SetWorkerAssociatedBrowsingContextID(uint64_t aWorkerAssociatedBrowsingContextID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWorkerAssociatedBrowsingContextID(aWorkerAssociatedBrowsingContextID); } \
NS_IMETHOD GetWorkerAssociatedBrowsingContext(mozilla::dom::BrowsingContext **aWorkerAssociatedBrowsingContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWorkerAssociatedBrowsingContext(aWorkerAssociatedBrowsingContext); }
/* starting interface: nsIWorkerChannelInfo */
#define NS_IWORKERCHANNELINFO_IID_STR "df1fffe4-dac6-487e-979a-629ac8c64831"
#define NS_IWORKERCHANNELINFO_IID \
{0xdf1fffe4, 0xdac6, 0x487e, \
{ 0x97, 0x9a, 0x62, 0x9a, 0xc8, 0xc6, 0x48, 0x31 }}
class NS_NO_VTABLE nsIWorkerChannelInfo : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWORKERCHANNELINFO_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIWorkerChannelInfo;
/* attribute nsIWorkerChannelLoadInfo loadInfo; */
NS_IMETHOD GetLoadInfo(nsIWorkerChannelLoadInfo **aLoadInfo) = 0;
NS_IMETHOD SetLoadInfo(nsIWorkerChannelLoadInfo *aLoadInfo) = 0;
/* [must_use] readonly attribute uint64_t channelId; */
[[nodiscard]] NS_IMETHOD GetChannelId(uint64_t *aChannelId) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIWorkerChannelInfo, NS_IWORKERCHANNELINFO_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIWORKERCHANNELINFO \
NS_IMETHOD GetLoadInfo(nsIWorkerChannelLoadInfo **aLoadInfo) override; \
NS_IMETHOD SetLoadInfo(nsIWorkerChannelLoadInfo *aLoadInfo) override; \
[[nodiscard]] NS_IMETHOD GetChannelId(uint64_t *aChannelId) 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_NSIWORKERCHANNELINFO \
nsresult GetLoadInfo(nsIWorkerChannelLoadInfo **aLoadInfo); \
nsresult SetLoadInfo(nsIWorkerChannelLoadInfo *aLoadInfo); \
[[nodiscard]] nsresult GetChannelId(uint64_t *aChannelId);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIWORKERCHANNELINFO(_to) \
NS_IMETHOD GetLoadInfo(nsIWorkerChannelLoadInfo **aLoadInfo) override { return _to GetLoadInfo(aLoadInfo); } \
NS_IMETHOD SetLoadInfo(nsIWorkerChannelLoadInfo *aLoadInfo) override { return _to SetLoadInfo(aLoadInfo); } \
[[nodiscard]] NS_IMETHOD GetChannelId(uint64_t *aChannelId) override { return _to GetChannelId(aChannelId); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIWORKERCHANNELINFO(_to) \
NS_IMETHOD GetLoadInfo(nsIWorkerChannelLoadInfo **aLoadInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadInfo(aLoadInfo); } \
NS_IMETHOD SetLoadInfo(nsIWorkerChannelLoadInfo *aLoadInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoadInfo(aLoadInfo); } \
[[nodiscard]] NS_IMETHOD GetChannelId(uint64_t *aChannelId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChannelId(aChannelId); }
#endif /* __gen_nsIWorkerChannelInfo_h__ */