summaryrefslogtreecommitdiffstats
blob: 8f6a9f10e35954fdf705ff9c5b345cea70a2aebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/*
 * Copyright (c) 2010 Remko Tronçon
 * Licensed under the GNU General Public License v3.
 * See Documentation/Licenses/GPLv3.txt for more information.
 */

#pragma once

#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>
#include <string>

#include <Swiften/Elements/Payload.h>
#include <Swiften/Elements/Form.h>

namespace Swift {
	class InBandRegistrationPayload : public Payload {
		public:
			typedef boost::shared_ptr<InBandRegistrationPayload> ref;

			InBandRegistrationPayload() : registered(false), remove(false) {}

			Form::ref getForm() const { return form; }
			void setForm(Form::ref f) { form = f; }

			bool isRegistered() const {
				return registered;
			}

			void setRegistered(bool b) {
				registered = b;
			}

			bool isRemove() const {
				return remove;
			}

			void setRemove(bool b) {
				remove = b;
			}

			const boost::optional<std::string>& getInstructions() const {
				return instructions;
			}

			const boost::optional<std::string>& getUsername() const {
				return username;
			}

			const boost::optional<std::string>& getNick() const {
				return nick;
			}

			const boost::optional<std::string>& getPassword() const {
				return password;
			}

			const boost::optional<std::string>& getName() const {
				return name;
			}

			const boost::optional<std::string>& getFirst() const {
				return first;
			}

			const boost::optional<std::string>& getLast() const {
				return last;
			}

			const boost::optional<std::string>& getEMail() const {
				return email;
			}

			const boost::optional<std::string>& getAddress() const {
				return address;
			}

			const boost::optional<std::string>& getCity() const {
				return city;
			}

			const boost::optional<std::string>& getState() const {
				return state;
			}

			const boost::optional<std::string>& getZip() const {
				return zip;
			}

			const boost::optional<std::string>& getPhone() const {
				return phone;
			}

			const boost::optional<std::string>& getURL() const {
				return url;
			}

			const boost::optional<std::string>& getDate() const {
				return date;
			}

			const boost::optional<std::string>& getMisc() const {
				return misc;
			}

			const boost::optional<std::string>& getText() const {
				return text;
			}

			const boost::optional<std::string>& getKey() const {
				return key;
			}

			void setInstructions(const std::string& v) {
				this->instructions = v;
			}

			void setUsername(const std::string& v) {
				this->username = v;
			}

			void setNick(const std::string& v) {
				this->nick = v;
			}

			void setPassword(const std::string& v) {
				this->password = v;
			}

			void setName(const std::string& v) {
				this->name = v;
			}

			void setFirst(const std::string& v) {
				this->first = v;
			}

			void setLast(const std::string& v) {
				this->last = v;
			}

			void setEMail(const std::string& v) {
				this->email = v;
			}

			void setAddress(const std::string& v) {
				this->address = v;
			}

			void setCity(const std::string& v) {
				this->city = v;
			}

			void setState(const std::string& v) {
				this->state = v;
			}

			void setZip(const std::string& v) {
				this->zip = v;
			}

			void setPhone(const std::string& v) {
				this->phone = v;
			}

			void setURL(const std::string& v) {
				this->url = v;
			}

			void setDate(const std::string& v) {
				this->date = v;
			}

			void setMisc(const std::string& v) {
				this->misc = v;
			}

			void setText(const std::string& v) {
				this->text = v;
			}

			void setKey(const std::string& v) {
				this->key = v;
			}

		private:
			Form::ref form;
			bool registered;
			bool remove;
			boost::optional<std::string> instructions;
			boost::optional<std::string> username;
			boost::optional<std::string> nick;
			boost::optional<std::string> password;
			boost::optional<std::string> name;
			boost::optional<std::string> first;
			boost::optional<std::string> last;
			boost::optional<std::string> email;
			boost::optional<std::string> address;
			boost::optional<std::string> city;
			boost::optional<std::string> state;
			boost::optional<std::string> zip;
			boost::optional<std::string> phone;
			boost::optional<std::string> url;
			boost::optional<std::string> date;
			boost::optional<std::string> misc;
			boost::optional<std::string> text;
			boost::optional<std::string> key;
	};
}