magpie/API/codes.h

48 lines
798 B
C
Raw Normal View History

// 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
};
2023-12-25 20:07:51 +00:00
enum class Login {
success,
noLogin,
emptyLogin,
noPassword,
emptyPassword,
wrongCredentials,
unknownError
};
enum class Poll {
success,
tokenProblem,
replace,
timeout,
unknownError
};
Register convertRegister (int source);
2023-12-25 20:07:51 +00:00
Login convertLogin (int source);
Poll convertPoll (int source);
QString description (Register code);
2023-12-25 20:07:51 +00:00
QString description (Login code);
QString description (Poll code);
}