From 04363ca342914ba75e693edb876cbe535839fa79 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 13 Feb 2009 00:00:05 +0100 Subject: Einfache Abfrage der Benutzerdatenbank implementiert --- src/Common/UserInfo.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/Common/UserInfo.h (limited to 'src/Common/UserInfo.h') 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 + * + * 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 . + */ + +#ifndef MAD_COMMON_USERINFO_H_ +#define MAD_COMMON_USERINFO_H_ + +#include + +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_ */ -- cgit v1.2.3