2023-12-27 20:59:22 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-12-21 18:03:44 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
namespace Codes {
|
|
|
|
enum class Register {
|
|
|
|
success,
|
|
|
|
noLogin,
|
|
|
|
emptyLogin,
|
|
|
|
loginExists,
|
|
|
|
loginPolicyViolation,
|
|
|
|
noPassword,
|
|
|
|
emptyPassword,
|
|
|
|
passwordPolicyViolation,
|
|
|
|
unknownError
|
|
|
|
};
|
|
|
|
|
2023-12-25 20:07:51 +00:00
|
|
|
enum class Login {
|
|
|
|
success,
|
|
|
|
noLogin,
|
|
|
|
emptyLogin,
|
|
|
|
noPassword,
|
|
|
|
emptyPassword,
|
|
|
|
wrongCredentials,
|
|
|
|
unknownError
|
|
|
|
};
|
|
|
|
|
2024-01-10 19:27:03 +00:00
|
|
|
enum class Poll {
|
|
|
|
success,
|
|
|
|
tokenProblem,
|
|
|
|
replace,
|
|
|
|
timeout,
|
|
|
|
unknownError
|
|
|
|
};
|
|
|
|
|
2023-12-21 18:03:44 +00:00
|
|
|
Register convertRegister (int source);
|
2023-12-25 20:07:51 +00:00
|
|
|
Login convertLogin (int source);
|
2024-01-10 19:27:03 +00:00
|
|
|
Poll convertPoll (int source);
|
2023-12-21 18:03:44 +00:00
|
|
|
|
|
|
|
QString description (Register code);
|
2023-12-25 20:07:51 +00:00
|
|
|
QString description (Login code);
|
2024-01-10 19:27:03 +00:00
|
|
|
QString description (Poll code);
|
2023-12-21 18:03:44 +00:00
|
|
|
|
|
|
|
}
|