/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/uriloader/exthandler/nsIExternalProtocolService.idl */ #ifndef __gen_nsIExternalProtocolService_h__ #define __gen_nsIExternalProtocolService_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 nsIURI; /* forward declaration */ class nsIFile; /* forward declaration */ class nsIPrincipal; /* forward declaration */ class nsIInterfaceRequestor; /* forward declaration */ class nsIHandlerInfo; /* forward declaration */ namespace mozilla { namespace dom { class BrowsingContext; /* webidl BrowsingContext */ } // namespace dom } // namespace mozilla /* starting interface: nsIExternalProtocolService */ #define NS_IEXTERNALPROTOCOLSERVICE_IID_STR "70f93b7a-3ec6-4bcb-b093-92d9984c9f83" #define NS_IEXTERNALPROTOCOLSERVICE_IID \ {0x70f93b7a, 0x3ec6, 0x4bcb, \ { 0xb0, 0x93, 0x92, 0xd9, 0x98, 0x4c, 0x9f, 0x83 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIExternalProtocolService) nsIExternalProtocolService : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IEXTERNALPROTOCOLSERVICE_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIExternalProtocolService; /* boolean externalProtocolHandlerExists (in string aProtocolScheme); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_externalProtocolHandlerExists) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ExternalProtocolHandlerExists(const char * aProtocolScheme, bool *_retval) = 0; /* boolean isExposedProtocol (in string aProtocolScheme); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_isExposedProtocol) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsExposedProtocol(const char * aProtocolScheme, bool *_retval) = 0; /* nsIHandlerInfo getProtocolHandlerInfo (in ACString aProtocolScheme); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_getProtocolHandlerInfo) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetProtocolHandlerInfo(const nsACString& aProtocolScheme, nsIHandlerInfo **_retval) = 0; /* nsIHandlerInfo getProtocolHandlerInfoFromOS (in ACString aProtocolScheme, out boolean aFound); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_getProtocolHandlerInfoFromOS) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString& aProtocolScheme, bool *aFound, nsIHandlerInfo **_retval) = 0; /* void setProtocolHandlerDefaults (in nsIHandlerInfo aHandlerInfo, in boolean aOSHandlerExists); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_setProtocolHandlerDefaults) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetProtocolHandlerDefaults(nsIHandlerInfo *aHandlerInfo, bool aOSHandlerExists) = 0; /* void loadURI (in nsIURI aURI, [optional] in nsIPrincipal aTriggeringPrincipal, [optional] in nsIPrincipal aRedirectPrincipal, [optional] in BrowsingContext aBrowsingContext, [optional] in boolean aWasTriggeredExternally, [optional] in boolean aHasValidUserGestureActivation, [optional] in boolean aNewWindowTarget); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_loadURI) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD LoadURI(nsIURI *aURI, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aRedirectPrincipal, mozilla::dom::BrowsingContext *aBrowsingContext, bool aWasTriggeredExternally, bool aHasValidUserGestureActivation, bool aNewWindowTarget) = 0; /* AString getApplicationDescription (in AUTF8String aScheme); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_getApplicationDescription) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) = 0; /* boolean isCurrentAppOSDefaultForProtocol (in AUTF8String aScheme); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_isCurrentAppOSDefaultForProtocol) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsCurrentAppOSDefaultForProtocol(const nsACString& aScheme, bool *_retval) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIEXTERNALPROTOCOLSERVICE \ NS_IMETHOD ExternalProtocolHandlerExists(const char * aProtocolScheme, bool *_retval) override; \ NS_IMETHOD IsExposedProtocol(const char * aProtocolScheme, bool *_retval) override; \ NS_IMETHOD GetProtocolHandlerInfo(const nsACString& aProtocolScheme, nsIHandlerInfo **_retval) override; \ NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString& aProtocolScheme, bool *aFound, nsIHandlerInfo **_retval) override; \ NS_IMETHOD SetProtocolHandlerDefaults(nsIHandlerInfo *aHandlerInfo, bool aOSHandlerExists) override; \ NS_IMETHOD LoadURI(nsIURI *aURI, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aRedirectPrincipal, mozilla::dom::BrowsingContext *aBrowsingContext, bool aWasTriggeredExternally, bool aHasValidUserGestureActivation, bool aNewWindowTarget) override; \ NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) override; \ NS_IMETHOD IsCurrentAppOSDefaultForProtocol(const nsACString& aScheme, bool *_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_NSIEXTERNALPROTOCOLSERVICE \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_externalProtocolHandlerExists)\ nsresult ExternalProtocolHandlerExists(const char * aProtocolScheme, bool *_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_isExposedProtocol)\ nsresult IsExposedProtocol(const char * aProtocolScheme, bool *_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_getProtocolHandlerInfo)\ nsresult GetProtocolHandlerInfo(const nsACString& aProtocolScheme, nsIHandlerInfo **_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_getProtocolHandlerInfoFromOS)\ nsresult GetProtocolHandlerInfoFromOS(const nsACString& aProtocolScheme, bool *aFound, nsIHandlerInfo **_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_setProtocolHandlerDefaults)\ nsresult SetProtocolHandlerDefaults(nsIHandlerInfo *aHandlerInfo, bool aOSHandlerExists); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_loadURI)\ nsresult LoadURI(nsIURI *aURI, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aRedirectPrincipal, mozilla::dom::BrowsingContext *aBrowsingContext, bool aWasTriggeredExternally, bool aHasValidUserGestureActivation, bool aNewWindowTarget); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_getApplicationDescription)\ nsresult GetApplicationDescription(const nsACString& aScheme, nsAString& _retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIExternalProtocolService_isCurrentAppOSDefaultForProtocol)\ nsresult IsCurrentAppOSDefaultForProtocol(const nsACString& aScheme, bool *_retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIEXTERNALPROTOCOLSERVICE(_to) \ NS_IMETHOD ExternalProtocolHandlerExists(const char * aProtocolScheme, bool *_retval) override { return _to ExternalProtocolHandlerExists(aProtocolScheme, _retval); } \ NS_IMETHOD IsExposedProtocol(const char * aProtocolScheme, bool *_retval) override { return _to IsExposedProtocol(aProtocolScheme, _retval); } \ NS_IMETHOD GetProtocolHandlerInfo(const nsACString& aProtocolScheme, nsIHandlerInfo **_retval) override { return _to GetProtocolHandlerInfo(aProtocolScheme, _retval); } \ NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString& aProtocolScheme, bool *aFound, nsIHandlerInfo **_retval) override { return _to GetProtocolHandlerInfoFromOS(aProtocolScheme, aFound, _retval); } \ NS_IMETHOD SetProtocolHandlerDefaults(nsIHandlerInfo *aHandlerInfo, bool aOSHandlerExists) override { return _to SetProtocolHandlerDefaults(aHandlerInfo, aOSHandlerExists); } \ NS_IMETHOD LoadURI(nsIURI *aURI, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aRedirectPrincipal, mozilla::dom::BrowsingContext *aBrowsingContext, bool aWasTriggeredExternally, bool aHasValidUserGestureActivation, bool aNewWindowTarget) override { return _to LoadURI(aURI, aTriggeringPrincipal, aRedirectPrincipal, aBrowsingContext, aWasTriggeredExternally, aHasValidUserGestureActivation, aNewWindowTarget); } \ NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) override { return _to GetApplicationDescription(aScheme, _retval); } \ NS_IMETHOD IsCurrentAppOSDefaultForProtocol(const nsACString& aScheme, bool *_retval) override { return _to IsCurrentAppOSDefaultForProtocol(aScheme, _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_NSIEXTERNALPROTOCOLSERVICE(_to) \ NS_IMETHOD ExternalProtocolHandlerExists(const char * aProtocolScheme, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExternalProtocolHandlerExists(aProtocolScheme, _retval); } \ NS_IMETHOD IsExposedProtocol(const char * aProtocolScheme, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsExposedProtocol(aProtocolScheme, _retval); } \ NS_IMETHOD GetProtocolHandlerInfo(const nsACString& aProtocolScheme, nsIHandlerInfo **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocolHandlerInfo(aProtocolScheme, _retval); } \ NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString& aProtocolScheme, bool *aFound, nsIHandlerInfo **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocolHandlerInfoFromOS(aProtocolScheme, aFound, _retval); } \ NS_IMETHOD SetProtocolHandlerDefaults(nsIHandlerInfo *aHandlerInfo, bool aOSHandlerExists) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProtocolHandlerDefaults(aHandlerInfo, aOSHandlerExists); } \ NS_IMETHOD LoadURI(nsIURI *aURI, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aRedirectPrincipal, mozilla::dom::BrowsingContext *aBrowsingContext, bool aWasTriggeredExternally, bool aHasValidUserGestureActivation, bool aNewWindowTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURI(aURI, aTriggeringPrincipal, aRedirectPrincipal, aBrowsingContext, aWasTriggeredExternally, aHasValidUserGestureActivation, aNewWindowTarget); } \ NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApplicationDescription(aScheme, _retval); } \ NS_IMETHOD IsCurrentAppOSDefaultForProtocol(const nsACString& aScheme, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCurrentAppOSDefaultForProtocol(aScheme, _retval); } #endif /* __gen_nsIExternalProtocolService_h__ */