48 lines
798 B
C++
48 lines
798 B
C++
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QString>
|
|
|
|
namespace Codes {
|
|
enum class Register {
|
|
success,
|
|
noLogin,
|
|
emptyLogin,
|
|
loginExists,
|
|
loginPolicyViolation,
|
|
noPassword,
|
|
emptyPassword,
|
|
passwordPolicyViolation,
|
|
unknownError
|
|
};
|
|
|
|
enum class Login {
|
|
success,
|
|
noLogin,
|
|
emptyLogin,
|
|
noPassword,
|
|
emptyPassword,
|
|
wrongCredentials,
|
|
unknownError
|
|
};
|
|
|
|
enum class Poll {
|
|
success,
|
|
tokenProblem,
|
|
replace,
|
|
timeout,
|
|
unknownError
|
|
};
|
|
|
|
Register convertRegister (int source);
|
|
Login convertLogin (int source);
|
|
Poll convertPoll (int source);
|
|
|
|
QString description (Register code);
|
|
QString description (Login code);
|
|
QString description (Poll code);
|
|
|
|
}
|