1/*
2 * Copyright 2019-2024, Andrew Lindesay <apl@lindesay.co.nz>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5#ifndef CREATE_USER_DETAIL_H
6#define CREATE_USER_DETAIL_H
7
8
9#include <Archivable.h>
10#include <String.h>
11
12/*!	The operator may choose to create a User.  In this case, he or she is
13	required to supply some details such as the nickname, password, email...
14	and those details are then collated and provided to the application server
15	(HDS) in order that the User is created in the application server.  This
16	model carries all of those details in an object so that they might be
17	easily conveyed between methods.
18*/
19
20class CreateUserDetail : public BArchivable {
21public:
22								CreateUserDetail(BMessage* from);
23								CreateUserDetail();
24	virtual						~CreateUserDetail();
25
26	const	BString&			Nickname() const;
27	const	BString&			PasswordClear() const;
28			bool				IsPasswordRepeated() const;
29	const	BString&			Email() const;
30	const	BString&			CaptchaToken() const;
31	const	BString&			CaptchaResponse() const;
32	const	BString&			LanguageId() const;
33	const	BString&			AgreedToUserUsageConditionsCode() const;
34
35			void				SetNickname(const BString& value);
36			void				SetPasswordClear(const BString& value);
37			void				SetIsPasswordRepeated(bool value);
38			void				SetEmail(const BString& value);
39			void				SetCaptchaToken(const BString& value);
40			void				SetCaptchaResponse(const BString& value);
41			void				SetLanguageId(const BString& value);
42			void				SetAgreedToUserUsageConditionsCode(
43									const BString& value);
44
45			status_t			Archive(BMessage* into, bool deep = true) const;
46private:
47			BString				fNickname;
48			BString				fPasswordClear;
49			bool				fIsPasswordRepeated;
50			BString				fEmail;
51			BString				fCaptchaToken;
52			BString				fCaptchaResponse;
53			BString				fLanguageId;
54			BString				fAgreedUserUsageConditionsCode;
55};
56
57
58#endif // CREATE_USER_DETAIL_H
59