/work/obj-fuzz/dist/include/mozilla/dom/PaymentAddress.h
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #ifndef mozilla_dom_PaymentAddress_h |
8 | | #define mozilla_dom_PaymentAddress_h |
9 | | |
10 | | #include "nsPIDOMWindow.h" |
11 | | #include "nsWrapperCache.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace dom { |
15 | | |
16 | | class PaymentAddress final : public nsISupports, |
17 | | public nsWrapperCache |
18 | | { |
19 | | public: |
20 | | NS_DECL_CYCLE_COLLECTING_ISUPPORTS |
21 | | NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PaymentAddress) |
22 | | |
23 | | PaymentAddress(nsPIDOMWindowInner* aWindow, |
24 | | const nsAString& aCountry, |
25 | | const nsTArray<nsString>& aAddressLine, |
26 | | const nsAString& aRegion, |
27 | | const nsAString& aCity, |
28 | | const nsAString& aDependentLocality, |
29 | | const nsAString& aPostalCode, |
30 | | const nsAString& aSortingCode, |
31 | | const nsAString& aOrganization, |
32 | | const nsAString& aRecipient, |
33 | | const nsAString& aPhone); |
34 | | |
35 | | nsPIDOMWindowInner* GetParentObject() const |
36 | 0 | { |
37 | 0 | return mOwner; |
38 | 0 | } |
39 | | |
40 | | virtual JSObject* WrapObject(JSContext* aCx, |
41 | | JS::Handle<JSObject*> aGivenProto) override; |
42 | | |
43 | | // Getter functions |
44 | | void GetCountry(nsAString& aRetVal) const; |
45 | | |
46 | | void GetAddressLine(nsTArray<nsString>& aRetVal) const; |
47 | | |
48 | | void GetRegion(nsAString& aRetVal) const; |
49 | | |
50 | | void GetCity(nsAString& aRetVal) const; |
51 | | |
52 | | void GetDependentLocality(nsAString& aRetVal) const; |
53 | | |
54 | | void GetPostalCode(nsAString& aRetVal) const; |
55 | | |
56 | | void GetSortingCode(nsAString& aRetVal) const; |
57 | | |
58 | | void GetOrganization(nsAString& aRetVal) const; |
59 | | |
60 | | void GetRecipient(nsAString& aRetVal) const; |
61 | | |
62 | | void GetPhone(nsAString& aRetVal) const; |
63 | | |
64 | | private: |
65 | | ~PaymentAddress(); |
66 | | |
67 | | nsString mCountry; |
68 | | nsTArray<nsString> mAddressLine; |
69 | | nsString mRegion; |
70 | | nsString mCity; |
71 | | nsString mDependentLocality; |
72 | | nsString mPostalCode; |
73 | | nsString mSortingCode; |
74 | | nsString mOrganization; |
75 | | nsString mRecipient; |
76 | | nsString mPhone; |
77 | | |
78 | | nsCOMPtr<nsPIDOMWindowInner> mOwner; |
79 | | }; |
80 | | |
81 | | } // namespace dom |
82 | | } // namespace mozilla |
83 | | |
84 | | #endif // mozilla_dom_PaymentAddress_h |