The Pedigree Project
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
modules
system
users
User.h
1
/*
2
* Copyright (c) 2008-2014, Pedigree Developers
3
*
4
* Please see the CONTRIB file in the root of the source tree for a full
5
* list of contributors.
6
*
7
* Permission to use, copy, modify, and distribute this software for any
8
* purpose with or without fee is hereby granted, provided that the above
9
* copyright notice and this permission notice appear in all copies.
10
*
11
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
*/
19
20
#ifndef USER_H
21
#define USER_H
22
23
#include "pedigree/kernel/compiler.h"
24
#include "pedigree/kernel/processor/types.h"
25
#include "pedigree/kernel/utilities/List.h"
26
#include "pedigree/kernel/utilities/String.h"
27
#include "pedigree/kernel/utilities/new"
28
29
class
Group
;
30
32
class
EXPORTED_PUBLIC
User
33
{
34
public
:
44
User
(
45
size_t
uid,
String
username,
String
fullName,
Group
*pGroup,
46
String
home,
String
shell,
String
password);
47
49
virtual
~
User
();
50
52
void
join(
Group
*pGroup);
53
55
void
leave(
Group
*pGroup);
56
58
bool
isMember(
Group
*pGroup);
59
63
bool
login(
String
password);
64
66
size_t
getId
()
67
{
68
return
m_Uid;
69
}
71
String
getUsername
()
72
{
73
return
m_Username;
74
}
76
String
getFullName
()
77
{
78
return
m_FullName;
79
}
81
Group
*
getDefaultGroup
()
82
{
83
return
m_pDefaultGroup;
84
}
86
String
getHome
()
87
{
88
return
m_Home;
89
}
91
String
getShell
()
92
{
93
return
m_Shell;
94
}
95
96
private
:
99
User
();
100
User
(
const
User
&);
101
User
&operator=(
const
User
&);
102
104
size_t
m_Uid
;
106
String
m_Username
;
108
String
m_FullName
;
110
Group
*
m_pDefaultGroup
;
112
String
m_Home
;
114
String
m_Shell
;
116
String
m_Password
;
117
119
List<Group *>
m_Groups
;
120
};
121
122
#endif
User::m_Groups
List< Group * > m_Groups
Definition:
User.h:119
User::getUsername
String getUsername()
Definition:
User.h:71
User::getId
size_t getId()
Definition:
User.h:66
EXPORTED_PUBLIC
#define EXPORTED_PUBLIC
Definition:
system/include/pedigree/kernel/compiler.h:78
User::m_Uid
size_t m_Uid
Definition:
User.h:104
User::m_Shell
String m_Shell
Definition:
User.h:114
String
Definition:
String.h:49
User::m_Password
String m_Password
Definition:
User.h:116
User::m_FullName
String m_FullName
Definition:
User.h:108
User
Definition:
User.h:32
User::getShell
String getShell()
Definition:
User.h:91
User::getHome
String getHome()
Definition:
User.h:86
User::m_pDefaultGroup
Group * m_pDefaultGroup
Definition:
User.h:110
User::getFullName
String getFullName()
Definition:
User.h:76
List< Group * >
User::getDefaultGroup
Group * getDefaultGroup()
Definition:
User.h:81
User::m_Username
String m_Username
Definition:
User.h:106
User::m_Home
String m_Home
Definition:
User.h:112
Group
Definition:
Group.h:32
Generated on Fri Jan 24 2020 06:49:08 for The Pedigree Project by
1.8.11