xref: /haiku/src/apps/haikudepot/model/CreateUserDetail.h (revision bf866d5ef7dead2119e2a229ea580e33c67f27a7)
1835e7239SAndrew Lindesay /*
2*bf866d5eSAndrew Lindesay  * Copyright 2019-2024, Andrew Lindesay <apl@lindesay.co.nz>.
3835e7239SAndrew Lindesay  * All rights reserved. Distributed under the terms of the MIT License.
4835e7239SAndrew Lindesay  */
5835e7239SAndrew Lindesay #ifndef CREATE_USER_DETAIL_H
6835e7239SAndrew Lindesay #define CREATE_USER_DETAIL_H
7835e7239SAndrew Lindesay 
8835e7239SAndrew Lindesay 
9835e7239SAndrew Lindesay #include <Archivable.h>
10835e7239SAndrew Lindesay #include <String.h>
11835e7239SAndrew Lindesay 
12835e7239SAndrew Lindesay /*!	The operator may choose to create a User.  In this case, he or she is
13835e7239SAndrew Lindesay 	required to supply some details such as the nickname, password, email...
14835e7239SAndrew Lindesay 	and those details are then collated and provided to the application server
15835e7239SAndrew Lindesay 	(HDS) in order that the User is created in the application server.  This
16835e7239SAndrew Lindesay 	model carries all of those details in an object so that they might be
17835e7239SAndrew Lindesay 	easily conveyed between methods.
18835e7239SAndrew Lindesay */
19835e7239SAndrew Lindesay 
20835e7239SAndrew Lindesay class CreateUserDetail : public BArchivable {
21835e7239SAndrew Lindesay public:
22835e7239SAndrew Lindesay 								CreateUserDetail(BMessage* from);
23835e7239SAndrew Lindesay 								CreateUserDetail();
24835e7239SAndrew Lindesay 	virtual						~CreateUserDetail();
25835e7239SAndrew Lindesay 
26835e7239SAndrew Lindesay 	const	BString&			Nickname() const;
27835e7239SAndrew Lindesay 	const	BString&			PasswordClear() const;
28835e7239SAndrew Lindesay 			bool				IsPasswordRepeated() const;
29835e7239SAndrew Lindesay 	const	BString&			Email() const;
30835e7239SAndrew Lindesay 	const	BString&			CaptchaToken() const;
31835e7239SAndrew Lindesay 	const	BString&			CaptchaResponse() const;
32*bf866d5eSAndrew Lindesay 	const	BString&			LanguageId() const;
33835e7239SAndrew Lindesay 	const	BString&			AgreedToUserUsageConditionsCode() const;
34835e7239SAndrew Lindesay 
35835e7239SAndrew Lindesay 			void				SetNickname(const BString& value);
36835e7239SAndrew Lindesay 			void				SetPasswordClear(const BString& value);
37835e7239SAndrew Lindesay 			void				SetIsPasswordRepeated(bool value);
38835e7239SAndrew Lindesay 			void				SetEmail(const BString& value);
39835e7239SAndrew Lindesay 			void				SetCaptchaToken(const BString& value);
40835e7239SAndrew Lindesay 			void				SetCaptchaResponse(const BString& value);
41*bf866d5eSAndrew Lindesay 			void				SetLanguageId(const BString& value);
42835e7239SAndrew Lindesay 			void				SetAgreedToUserUsageConditionsCode(
43835e7239SAndrew Lindesay 									const BString& value);
44835e7239SAndrew Lindesay 
45835e7239SAndrew Lindesay 			status_t			Archive(BMessage* into, bool deep = true) const;
46835e7239SAndrew Lindesay private:
47835e7239SAndrew Lindesay 			BString				fNickname;
48835e7239SAndrew Lindesay 			BString				fPasswordClear;
49835e7239SAndrew Lindesay 			bool				fIsPasswordRepeated;
50835e7239SAndrew Lindesay 			BString				fEmail;
51835e7239SAndrew Lindesay 			BString				fCaptchaToken;
52835e7239SAndrew Lindesay 			BString				fCaptchaResponse;
53*bf866d5eSAndrew Lindesay 			BString				fLanguageId;
54835e7239SAndrew Lindesay 			BString				fAgreedUserUsageConditionsCode;
55835e7239SAndrew Lindesay };
56835e7239SAndrew Lindesay 
57835e7239SAndrew Lindesay 
58835e7239SAndrew Lindesay #endif // CREATE_USER_DETAIL_H
59