DtkSystemSettings
dtk library for systemsettings.
载入中...
搜索中...
未找到
daccountstypes.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2022 Uniontech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#pragma once
6
7#include "dtkaccounts_global.h"
8
9#include <QString>
10
11DACCOUNTS_BEGIN_NAMESPACE
12
13// Common Custom Type
14
15enum class AccountTypes : qint32 { Default = 0, Admin, Udcp, Unknown };
16
18
20
22{
23 qint32 lastChange;
24 qint32 min;
25 qint32 max;
26 qint32 warn;
27 qint32 inactive;
28 qint32 expired;
29 friend bool operator==(const ShadowInfo &lhs, const ShadowInfo &rhs)
30 {
31 return lhs.lastChange == rhs.lastChange && lhs.min == rhs.min && lhs.max == rhs.max
32 && lhs.warn == rhs.warn && lhs.inactive == rhs.inactive && lhs.expired == rhs.expired;
33 }
34};
35
37{
38 QByteArray inittabID;
39 QByteArray line;
40 QByteArray host;
41 QByteArray address;
42 QByteArray time;
43 friend bool operator==(const LoginUtmpx &lhs, const LoginUtmpx &rhs)
44 {
45 return lhs.inittabID == rhs.inittabID && lhs.line == rhs.line && lhs.host == rhs.host
46 && lhs.address == rhs.address && lhs.time == rhs.time;
47 }
48};
49
51{
52 QByteArray userName;
57 friend bool operator==(const ReminderInfo &lhs, const ReminderInfo &rhs)
58 {
59 return lhs.userName == rhs.userName && lhs.spent == rhs.spent
60 && lhs.currentLogin == rhs.currentLogin && lhs.lastLogin == rhs.lastLogin
62 }
63};
64
66{
67 bool valid;
68 qint32 code;
69 QString msg;
70 friend bool operator==(const ValidMsg &lhs, const ValidMsg &rhs)
71 {
72 return lhs.valid == rhs.valid && lhs.code == rhs.code && lhs.msg == rhs.msg;
73 }
74};
75
76DACCOUNTS_END_NAMESPACE
PasswdExpirInfo
密码过期信息
Definition daccountstypes.h:19
PasswdStatus
密码状态
Definition daccountstypes.h:17
AccountTypes
账户类型
Definition daccountstypes.h:15
其他系统相关的登录信息
Definition daccountstypes.h:37
QByteArray host
Definition daccountstypes.h:40
QByteArray time
Definition daccountstypes.h:42
QByteArray line
Definition daccountstypes.h:39
QByteArray inittabID
Definition daccountstypes.h:38
QByteArray address
Definition daccountstypes.h:41
当前用户的一些登录信息
Definition daccountstypes.h:51
QByteArray userName
Definition daccountstypes.h:52
qint32 failCountSinceLastLogin
Definition daccountstypes.h:56
ShadowInfo spent
Definition daccountstypes.h:53
LoginUtmpx currentLogin
Definition daccountstypes.h:54
LoginUtmpx lastLogin
Definition daccountstypes.h:55
存储/etc/shadow文件中的一些信息
Definition daccountstypes.h:22
qint32 inactive
Definition daccountstypes.h:27
qint32 expired
Definition daccountstypes.h:28
qint32 warn
Definition daccountstypes.h:26
qint32 max
Definition daccountstypes.h:25
qint32 min
Definition daccountstypes.h:24
qint32 lastChange
Definition daccountstypes.h:23
表示验证项是否非法
Definition daccountstypes.h:66
qint32 code
Definition daccountstypes.h:68
QString msg
Definition daccountstypes.h:69
bool valid
Definition daccountstypes.h:67