File indexing completed on 2024-11-24 04:44:30

0001 /*
0002     This file is part of oxaccess.
0003 
0004     SPDX-FileCopyrightText: 2009 Tobias Koenig <tokoe@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #pragma once
0010 
0011 #include <QList>
0012 #include <QString>
0013 
0014 namespace OXA
0015 {
0016 class User
0017 {
0018 public:
0019     using List = QList<User>;
0020 
0021     User();
0022 
0023     [[nodiscard]] bool isValid() const;
0024 
0025     void setUid(qlonglong uid);
0026     [[nodiscard]] qlonglong uid() const;
0027 
0028     void setEmail(const QString &email);
0029     [[nodiscard]] QString email() const;
0030 
0031     void setName(const QString &name);
0032     [[nodiscard]] QString name() const;
0033 
0034 private:
0035     qlonglong mUid = -1;
0036     QString mEmail;
0037     QString mName;
0038 };
0039 }
0040 
0041 Q_DECLARE_TYPEINFO(OXA::User, Q_RELOCATABLE_TYPE);