Bug 1472338: part 2) Change `clipboard.readText()` to read from the clipboard asynchr...
[gecko.git] / dom / payments / PaymentAddress.h
blobe2ca531628f4261530a92756884ec68087e9d8ea
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_PaymentAddress_h
8 #define mozilla_dom_PaymentAddress_h
10 #include "nsPIDOMWindow.h"
11 #include "nsWrapperCache.h"
13 namespace mozilla {
14 namespace dom {
16 class PaymentAddress final : public nsISupports, public nsWrapperCache {
17 public:
18 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
19 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PaymentAddress)
21 PaymentAddress(nsPIDOMWindowInner* aWindow, const nsAString& aCountry,
22 const nsTArray<nsString>& aAddressLine,
23 const nsAString& aRegion, const nsAString& aRegionCode,
24 const nsAString& aCity, const nsAString& aDependentLocality,
25 const nsAString& aPostalCode, const nsAString& aSortingCode,
26 const nsAString& aOrganization, const nsAString& aRecipient,
27 const nsAString& aPhone);
29 nsPIDOMWindowInner* GetParentObject() const { return mOwner; }
31 virtual JSObject* WrapObject(JSContext* aCx,
32 JS::Handle<JSObject*> aGivenProto) override;
34 // Getter functions
35 void GetCountry(nsAString& aRetVal) const;
37 void GetAddressLine(nsTArray<nsString>& aRetVal) const;
39 void GetRegion(nsAString& aRetVal) const;
41 void GetRegionCode(nsAString& aRetVal) const;
43 void GetCity(nsAString& aRetVal) const;
45 void GetDependentLocality(nsAString& aRetVal) const;
47 void GetPostalCode(nsAString& aRetVal) const;
49 void GetSortingCode(nsAString& aRetVal) const;
51 void GetOrganization(nsAString& aRetVal) const;
53 void GetRecipient(nsAString& aRetVal) const;
55 void GetPhone(nsAString& aRetVal) const;
57 private:
58 ~PaymentAddress();
60 nsString mCountry;
61 nsTArray<nsString> mAddressLine;
62 nsString mRegion;
63 nsString mRegionCode;
64 nsString mCity;
65 nsString mDependentLocality;
66 nsString mPostalCode;
67 nsString mSortingCode;
68 nsString mOrganization;
69 nsString mRecipient;
70 nsString mPhone;
72 nsCOMPtr<nsPIDOMWindowInner> mOwner;
75 } // namespace dom
76 } // namespace mozilla
78 #endif // mozilla_dom_PaymentAddress_h