/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/dom/interfaces/payments/nsIPaymentUIService.idl */ #ifndef __gen_nsIPaymentUIService_h__ #define __gen_nsIPaymentUIService_h__ #include "nsISupports.h" #include "nsIPaymentActionResponse.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 /* starting interface: nsIPaymentUIService */ #define NS_IPAYMENTUISERVICE_IID_STR "01f8bd55-9017-438b-85ec-7c15d2b35cdc" #define NS_IPAYMENTUISERVICE_IID \ {0x01f8bd55, 0x9017, 0x438b, \ { 0x85, 0xec, 0x7c, 0x15, 0xd2, 0xb3, 0x5c, 0xdc }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIPaymentUIService) nsIPaymentUIService : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IPAYMENTUISERVICE_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIPaymentUIService; /* void showPayment (in AString requestId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_showPayment) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ShowPayment(const nsAString& requestId) = 0; /* void abortPayment (in AString requestId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_abortPayment) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AbortPayment(const nsAString& requestId) = 0; /* void completePayment (in AString requestId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_completePayment) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CompletePayment(const nsAString& requestId) = 0; /* void updatePayment (in AString requestId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_updatePayment) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UpdatePayment(const nsAString& requestId) = 0; /* void closePayment (in AString requestId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_closePayment) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClosePayment(const nsAString& requestId) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIPAYMENTUISERVICE \ NS_IMETHOD ShowPayment(const nsAString& requestId) override; \ NS_IMETHOD AbortPayment(const nsAString& requestId) override; \ NS_IMETHOD CompletePayment(const nsAString& requestId) override; \ NS_IMETHOD UpdatePayment(const nsAString& requestId) override; \ NS_IMETHOD ClosePayment(const nsAString& requestId) 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_NSIPAYMENTUISERVICE \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_showPayment)\ nsresult ShowPayment(const nsAString& requestId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_abortPayment)\ nsresult AbortPayment(const nsAString& requestId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_completePayment)\ nsresult CompletePayment(const nsAString& requestId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_updatePayment)\ nsresult UpdatePayment(const nsAString& requestId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIPaymentUIService_closePayment)\ nsresult ClosePayment(const nsAString& requestId); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIPAYMENTUISERVICE(_to) \ NS_IMETHOD ShowPayment(const nsAString& requestId) override { return _to ShowPayment(requestId); } \ NS_IMETHOD AbortPayment(const nsAString& requestId) override { return _to AbortPayment(requestId); } \ NS_IMETHOD CompletePayment(const nsAString& requestId) override { return _to CompletePayment(requestId); } \ NS_IMETHOD UpdatePayment(const nsAString& requestId) override { return _to UpdatePayment(requestId); } \ NS_IMETHOD ClosePayment(const nsAString& requestId) override { return _to ClosePayment(requestId); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIPAYMENTUISERVICE(_to) \ NS_IMETHOD ShowPayment(const nsAString& requestId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowPayment(requestId); } \ NS_IMETHOD AbortPayment(const nsAString& requestId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AbortPayment(requestId); } \ NS_IMETHOD CompletePayment(const nsAString& requestId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CompletePayment(requestId); } \ NS_IMETHOD UpdatePayment(const nsAString& requestId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdatePayment(requestId); } \ NS_IMETHOD ClosePayment(const nsAString& requestId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClosePayment(requestId); } // %{C++:80-81 #define NS_PAYMENT_UI_SERVICE_CONTRACT_ID \ "@mozilla.org/dom/payments/payment-ui-service;1" // %} #endif /* __gen_nsIPaymentUIService_h__ */