Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIPaymentRequestService.idl
3 : */
4 :
5 : #ifndef __gen_nsIPaymentRequestService_h__
6 : #define __gen_nsIPaymentRequestService_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #ifndef __gen_nsIVariant_h__
14 : #include "nsIVariant.h"
15 : #endif
16 :
17 : #ifndef __gen_nsIPaymentRequest_h__
18 : #include "nsIPaymentRequest.h"
19 : #endif
20 :
21 : #ifndef __gen_nsIPaymentActionRequest_h__
22 : #include "nsIPaymentActionRequest.h"
23 : #endif
24 :
25 : #ifndef __gen_nsIPaymentActionResponse_h__
26 : #include "nsIPaymentActionResponse.h"
27 : #endif
28 :
29 : #ifndef __gen_nsIPaymentAddress_h__
30 : #include "nsIPaymentAddress.h"
31 : #endif
32 :
33 : #ifndef __gen_nsISimpleEnumerator_h__
34 : #include "nsISimpleEnumerator.h"
35 : #endif
36 :
37 : #ifndef __gen_nsIPaymentUIService_h__
38 : #include "nsIPaymentUIService.h"
39 : #endif
40 :
41 : /* For IDL files that don't want to include root IDL files. */
42 : #ifndef NS_NO_VTABLE
43 : #define NS_NO_VTABLE
44 : #endif
45 :
46 : /* starting interface: nsIPaymentRequestService */
47 : #define NS_IPAYMENTREQUESTSERVICE_IID_STR "cccd665f-edf3-41fc-ab9b-fc55b37340aa"
48 :
49 : #define NS_IPAYMENTREQUESTSERVICE_IID \
50 : {0xcccd665f, 0xedf3, 0x41fc, \
51 : { 0xab, 0x9b, 0xfc, 0x55, 0xb3, 0x73, 0x40, 0xaa }}
52 :
53 0 : class NS_NO_VTABLE nsIPaymentRequestService : public nsISupports {
54 : public:
55 :
56 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPAYMENTREQUESTSERVICE_IID)
57 :
58 : /* nsIPaymentRequest getPaymentRequestById (in AString aRequestId); */
59 : NS_IMETHOD GetPaymentRequestById(const nsAString & aRequestId, nsIPaymentRequest * *_retval) = 0;
60 :
61 : /* nsISimpleEnumerator enumerate (); */
62 : NS_IMETHOD Enumerate(nsISimpleEnumerator * *_retval) = 0;
63 :
64 : /* void cleanup (); */
65 : NS_IMETHOD Cleanup(void) = 0;
66 :
67 : /* void setTestingUIService (in nsIPaymentUIService aUIService); */
68 : NS_IMETHOD SetTestingUIService(nsIPaymentUIService *aUIService) = 0;
69 :
70 : /* void removeActionCallback (in nsIPaymentActionCallback aCallback); */
71 : NS_IMETHOD RemoveActionCallback(nsIPaymentActionCallback *aCallback) = 0;
72 :
73 : /* void requestPayment (in nsIPaymentActionRequest aRequest); */
74 : NS_IMETHOD RequestPayment(nsIPaymentActionRequest *aRequest) = 0;
75 :
76 : /* void respondPayment (in nsIPaymentActionResponse aResponse); */
77 : NS_IMETHOD RespondPayment(nsIPaymentActionResponse *aResponse) = 0;
78 :
79 : /* void changeShippingAddress (in AString requestId, in nsIPaymentAddress aAddress); */
80 : NS_IMETHOD ChangeShippingAddress(const nsAString & requestId, nsIPaymentAddress *aAddress) = 0;
81 :
82 : /* void changeShippingOption (in AString requestId, in AString option); */
83 : NS_IMETHOD ChangeShippingOption(const nsAString & requestId, const nsAString & option) = 0;
84 :
85 : };
86 :
87 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIPaymentRequestService, NS_IPAYMENTREQUESTSERVICE_IID)
88 :
89 : /* Use this macro when declaring classes that implement this interface. */
90 : #define NS_DECL_NSIPAYMENTREQUESTSERVICE \
91 : NS_IMETHOD GetPaymentRequestById(const nsAString & aRequestId, nsIPaymentRequest * *_retval) override; \
92 : NS_IMETHOD Enumerate(nsISimpleEnumerator * *_retval) override; \
93 : NS_IMETHOD Cleanup(void) override; \
94 : NS_IMETHOD SetTestingUIService(nsIPaymentUIService *aUIService) override; \
95 : NS_IMETHOD RemoveActionCallback(nsIPaymentActionCallback *aCallback) override; \
96 : NS_IMETHOD RequestPayment(nsIPaymentActionRequest *aRequest) override; \
97 : NS_IMETHOD RespondPayment(nsIPaymentActionResponse *aResponse) override; \
98 : NS_IMETHOD ChangeShippingAddress(const nsAString & requestId, nsIPaymentAddress *aAddress) override; \
99 : NS_IMETHOD ChangeShippingOption(const nsAString & requestId, const nsAString & option) override;
100 :
101 : /* Use this macro when declaring the members of this interface when the
102 : class doesn't implement the interface. This is useful for forwarding. */
103 : #define NS_DECL_NON_VIRTUAL_NSIPAYMENTREQUESTSERVICE \
104 : nsresult GetPaymentRequestById(const nsAString & aRequestId, nsIPaymentRequest * *_retval); \
105 : nsresult Enumerate(nsISimpleEnumerator * *_retval); \
106 : nsresult Cleanup(void); \
107 : nsresult SetTestingUIService(nsIPaymentUIService *aUIService); \
108 : nsresult RemoveActionCallback(nsIPaymentActionCallback *aCallback); \
109 : nsresult RequestPayment(nsIPaymentActionRequest *aRequest); \
110 : nsresult RespondPayment(nsIPaymentActionResponse *aResponse); \
111 : nsresult ChangeShippingAddress(const nsAString & requestId, nsIPaymentAddress *aAddress); \
112 : nsresult ChangeShippingOption(const nsAString & requestId, const nsAString & option);
113 :
114 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
115 : #define NS_FORWARD_NSIPAYMENTREQUESTSERVICE(_to) \
116 : NS_IMETHOD GetPaymentRequestById(const nsAString & aRequestId, nsIPaymentRequest * *_retval) override { return _to GetPaymentRequestById(aRequestId, _retval); } \
117 : NS_IMETHOD Enumerate(nsISimpleEnumerator * *_retval) override { return _to Enumerate(_retval); } \
118 : NS_IMETHOD Cleanup(void) override { return _to Cleanup(); } \
119 : NS_IMETHOD SetTestingUIService(nsIPaymentUIService *aUIService) override { return _to SetTestingUIService(aUIService); } \
120 : NS_IMETHOD RemoveActionCallback(nsIPaymentActionCallback *aCallback) override { return _to RemoveActionCallback(aCallback); } \
121 : NS_IMETHOD RequestPayment(nsIPaymentActionRequest *aRequest) override { return _to RequestPayment(aRequest); } \
122 : NS_IMETHOD RespondPayment(nsIPaymentActionResponse *aResponse) override { return _to RespondPayment(aResponse); } \
123 : NS_IMETHOD ChangeShippingAddress(const nsAString & requestId, nsIPaymentAddress *aAddress) override { return _to ChangeShippingAddress(requestId, aAddress); } \
124 : NS_IMETHOD ChangeShippingOption(const nsAString & requestId, const nsAString & option) override { return _to ChangeShippingOption(requestId, option); }
125 :
126 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
127 : #define NS_FORWARD_SAFE_NSIPAYMENTREQUESTSERVICE(_to) \
128 : NS_IMETHOD GetPaymentRequestById(const nsAString & aRequestId, nsIPaymentRequest * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPaymentRequestById(aRequestId, _retval); } \
129 : NS_IMETHOD Enumerate(nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Enumerate(_retval); } \
130 : NS_IMETHOD Cleanup(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Cleanup(); } \
131 : NS_IMETHOD SetTestingUIService(nsIPaymentUIService *aUIService) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTestingUIService(aUIService); } \
132 : NS_IMETHOD RemoveActionCallback(nsIPaymentActionCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveActionCallback(aCallback); } \
133 : NS_IMETHOD RequestPayment(nsIPaymentActionRequest *aRequest) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RequestPayment(aRequest); } \
134 : NS_IMETHOD RespondPayment(nsIPaymentActionResponse *aResponse) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RespondPayment(aResponse); } \
135 : NS_IMETHOD ChangeShippingAddress(const nsAString & requestId, nsIPaymentAddress *aAddress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ChangeShippingAddress(requestId, aAddress); } \
136 : NS_IMETHOD ChangeShippingOption(const nsAString & requestId, const nsAString & option) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ChangeShippingOption(requestId, option); }
137 :
138 : #if 0
139 : /* Use the code below as a template for the implementation class for this interface. */
140 :
141 : /* Header file */
142 : class nsPaymentRequestService : public nsIPaymentRequestService
143 : {
144 : public:
145 : NS_DECL_ISUPPORTS
146 : NS_DECL_NSIPAYMENTREQUESTSERVICE
147 :
148 : nsPaymentRequestService();
149 :
150 : private:
151 : ~nsPaymentRequestService();
152 :
153 : protected:
154 : /* additional members */
155 : };
156 :
157 : /* Implementation file */
158 : NS_IMPL_ISUPPORTS(nsPaymentRequestService, nsIPaymentRequestService)
159 :
160 : nsPaymentRequestService::nsPaymentRequestService()
161 : {
162 : /* member initializers and constructor code */
163 : }
164 :
165 : nsPaymentRequestService::~nsPaymentRequestService()
166 : {
167 : /* destructor code */
168 : }
169 :
170 : /* nsIPaymentRequest getPaymentRequestById (in AString aRequestId); */
171 : NS_IMETHODIMP nsPaymentRequestService::GetPaymentRequestById(const nsAString & aRequestId, nsIPaymentRequest * *_retval)
172 : {
173 : return NS_ERROR_NOT_IMPLEMENTED;
174 : }
175 :
176 : /* nsISimpleEnumerator enumerate (); */
177 : NS_IMETHODIMP nsPaymentRequestService::Enumerate(nsISimpleEnumerator * *_retval)
178 : {
179 : return NS_ERROR_NOT_IMPLEMENTED;
180 : }
181 :
182 : /* void cleanup (); */
183 : NS_IMETHODIMP nsPaymentRequestService::Cleanup()
184 : {
185 : return NS_ERROR_NOT_IMPLEMENTED;
186 : }
187 :
188 : /* void setTestingUIService (in nsIPaymentUIService aUIService); */
189 : NS_IMETHODIMP nsPaymentRequestService::SetTestingUIService(nsIPaymentUIService *aUIService)
190 : {
191 : return NS_ERROR_NOT_IMPLEMENTED;
192 : }
193 :
194 : /* void removeActionCallback (in nsIPaymentActionCallback aCallback); */
195 : NS_IMETHODIMP nsPaymentRequestService::RemoveActionCallback(nsIPaymentActionCallback *aCallback)
196 : {
197 : return NS_ERROR_NOT_IMPLEMENTED;
198 : }
199 :
200 : /* void requestPayment (in nsIPaymentActionRequest aRequest); */
201 : NS_IMETHODIMP nsPaymentRequestService::RequestPayment(nsIPaymentActionRequest *aRequest)
202 : {
203 : return NS_ERROR_NOT_IMPLEMENTED;
204 : }
205 :
206 : /* void respondPayment (in nsIPaymentActionResponse aResponse); */
207 : NS_IMETHODIMP nsPaymentRequestService::RespondPayment(nsIPaymentActionResponse *aResponse)
208 : {
209 : return NS_ERROR_NOT_IMPLEMENTED;
210 : }
211 :
212 : /* void changeShippingAddress (in AString requestId, in nsIPaymentAddress aAddress); */
213 : NS_IMETHODIMP nsPaymentRequestService::ChangeShippingAddress(const nsAString & requestId, nsIPaymentAddress *aAddress)
214 : {
215 : return NS_ERROR_NOT_IMPLEMENTED;
216 : }
217 :
218 : /* void changeShippingOption (in AString requestId, in AString option); */
219 : NS_IMETHODIMP nsPaymentRequestService::ChangeShippingOption(const nsAString & requestId, const nsAString & option)
220 : {
221 : return NS_ERROR_NOT_IMPLEMENTED;
222 : }
223 :
224 : /* End of implementation class template. */
225 : #endif
226 :
227 : #define NS_PAYMENT_REQUEST_SERVICE_CID \
228 : { 0xcccd665f, 0xedf3, 0x41fc, { 0xab, 0x9b, 0xfc, 0x55, 0xb3, 0x73, 0x40, 0xaa } }
229 : #define NS_PAYMENT_REQUEST_SERVICE_CONTRACT_ID \
230 : "@mozilla.org/dom/payments/payment-request-service;1"
231 :
232 : #endif /* __gen_nsIPaymentRequestService_h__ */
|