/src/mozilla-central/dom/payments/PaymentAddress.cpp
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 | | #include "mozilla/dom/PaymentAddress.h" |
8 | | #include "mozilla/dom/PaymentAddressBinding.h" |
9 | | |
10 | | namespace mozilla { |
11 | | namespace dom { |
12 | | |
13 | | NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(PaymentAddress, mOwner) |
14 | | |
15 | | NS_IMPL_CYCLE_COLLECTING_ADDREF(PaymentAddress) |
16 | | NS_IMPL_CYCLE_COLLECTING_RELEASE(PaymentAddress) |
17 | | |
18 | 0 | NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PaymentAddress) |
19 | 0 | NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY |
20 | 0 | NS_INTERFACE_MAP_ENTRY(nsISupports) |
21 | 0 | NS_INTERFACE_MAP_END |
22 | | |
23 | | PaymentAddress::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 | | : mCountry(aCountry) |
35 | | , mAddressLine(aAddressLine) |
36 | | , mRegion(aRegion) |
37 | | , mCity(aCity) |
38 | | , mDependentLocality(aDependentLocality) |
39 | | , mPostalCode(aPostalCode) |
40 | | , mSortingCode(aSortingCode) |
41 | | , mOrganization(aOrganization) |
42 | | , mRecipient(aRecipient) |
43 | | , mPhone(aPhone) |
44 | | , mOwner(aWindow) |
45 | 0 | { |
46 | 0 | } |
47 | | |
48 | | void |
49 | | PaymentAddress::GetCountry(nsAString& aRetVal) const |
50 | 0 | { |
51 | 0 | aRetVal = mCountry; |
52 | 0 | } |
53 | | |
54 | | void |
55 | | PaymentAddress::GetAddressLine(nsTArray<nsString>& aRetVal) const |
56 | 0 | { |
57 | 0 | aRetVal = mAddressLine; |
58 | 0 | } |
59 | | |
60 | | void |
61 | | PaymentAddress::GetRegion(nsAString& aRetVal) const |
62 | 0 | { |
63 | 0 | aRetVal = mRegion; |
64 | 0 | } |
65 | | |
66 | | void |
67 | | PaymentAddress::GetCity(nsAString& aRetVal) const |
68 | 0 | { |
69 | 0 | aRetVal = mCity; |
70 | 0 | } |
71 | | |
72 | | void |
73 | | PaymentAddress::GetDependentLocality(nsAString& aRetVal) const |
74 | 0 | { |
75 | 0 | aRetVal = mDependentLocality; |
76 | 0 | } |
77 | | |
78 | | void |
79 | | PaymentAddress::GetPostalCode(nsAString& aRetVal) const |
80 | 0 | { |
81 | 0 | aRetVal = mPostalCode; |
82 | 0 | } |
83 | | |
84 | | void |
85 | | PaymentAddress::GetSortingCode(nsAString& aRetVal) const |
86 | 0 | { |
87 | 0 | aRetVal = mSortingCode; |
88 | 0 | } |
89 | | |
90 | | void |
91 | | PaymentAddress::GetOrganization(nsAString& aRetVal) const |
92 | 0 | { |
93 | 0 | aRetVal = mOrganization; |
94 | 0 | } |
95 | | |
96 | | void |
97 | | PaymentAddress::GetRecipient(nsAString& aRetVal) const |
98 | 0 | { |
99 | 0 | aRetVal = mRecipient; |
100 | 0 | } |
101 | | |
102 | | void |
103 | | PaymentAddress::GetPhone(nsAString& aRetVal) const |
104 | 0 | { |
105 | 0 | aRetVal = mPhone; |
106 | 0 | } |
107 | | |
108 | | PaymentAddress::~PaymentAddress() |
109 | 0 | { |
110 | 0 | } |
111 | | |
112 | | JSObject* |
113 | | PaymentAddress::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
114 | 0 | { |
115 | 0 | return PaymentAddress_Binding::Wrap(aCx, this, aGivenProto); |
116 | 0 | } |
117 | | |
118 | | |
119 | | } // namespace dom |
120 | | } // namespace mozilla |