diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-02-13 00:00:05 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-02-13 00:00:05 +0100 |
commit | 04363ca342914ba75e693edb876cbe535839fa79 (patch) | |
tree | d1309d7b0f6288a8250e972e5cab2546f2a77609 /src/Common/UserInfo.h | |
parent | 2ab1fbd763ad8692ea3ca29705a4fe821ccb1309 (diff) | |
download | mad-04363ca342914ba75e693edb876cbe535839fa79.tar mad-04363ca342914ba75e693edb876cbe535839fa79.zip |
Einfache Abfrage der Benutzerdatenbank implementiert
Diffstat (limited to 'src/Common/UserInfo.h')
-rw-r--r-- | src/Common/UserInfo.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/Common/UserInfo.h b/src/Common/UserInfo.h new file mode 100644 index 0000000..94c0c60 --- /dev/null +++ b/src/Common/UserInfo.h @@ -0,0 +1,55 @@ +/* + * UserInfo.h + * + * Copyright (C) 2009 Matthias Schiffer <matthias@gamezock.de> + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef MAD_COMMON_USERINFO_H_ +#define MAD_COMMON_USERINFO_H_ + +#include <string> + +namespace Mad { +namespace Common { + +class UserInfo { + private: + unsigned long uid; + unsigned long gid; + + std::string username; + std::string fullName; + + public: + UserInfo(unsigned long uid0 = 0, const std::string& username0 = std::string()) : uid(uid0), gid(0), username(username0) {} + + void setUid(unsigned long newUid) {uid = newUid;} + unsigned long getUid() const {return uid;} + + void setGid(unsigned long newUid) {uid = newUid;} + unsigned long getGid() const {return uid;} + + void setUsername(const std::string& newUsername) {username = newUsername;} + const std::string& getUsername() const {return username;} + + void setFullName(const std::string& newFullName) {fullName = newFullName;} + const std::string& getFullName() const {return fullName;} +}; + +} +} + +#endif /* MAD_COMMON_USERINFO_H_ */ |