1/*
2 * Copyright 2013, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _PACKAGE__USER_H_
6#define _PACKAGE__USER_H_
7
8
9#include <String.h>
10#include <StringList.h>
11
12
13namespace BPackageKit {
14
15
16namespace BHPKG {
17	struct BUserData;
18}
19
20
21class BUser {
22public:
23								BUser();
24								BUser(const BHPKG::BUserData& userData);
25								BUser(const BString& name,
26									const BString& realName,
27									const BString& home, const BString& shell,
28									const BStringList& groups);
29								~BUser();
30
31			status_t			InitCheck() const;
32
33			const BString&		Name() const;
34			const BString&		RealName() const;
35			const BString&		Home() const;
36			const BString&		Shell() const;
37			const BStringList&	Groups() const;
38
39			status_t			SetTo(const BString& name,
40									const BString& realName,
41									const BString& home, const BString& shell,
42									const BStringList& groups);
43
44	static	bool				IsValidUserName(const char* name);
45
46private:
47			BString				fName;
48			BString				fRealName;
49			BString				fHome;
50			BString				fShell;
51			BStringList			fGroups;
52};
53
54
55}	// namespace BPackageKit
56
57
58#endif	// _PACKAGE__USER_H_
59