MIKAI
Library to modify content of a Mykey
src
mikai-error.h
Go to the documentation of this file.
1
/*
2
* @author Lilz <https://telegram.me/Lilz73>
3
* @copyright 2020-2021 Lilz <https://telegram.me/Lilz73>
4
* @license MIKAI LICENSE
5
*
6
* This file is part of MIKAI.
7
*
8
* MIKAI is free software: you can redistribute it and/or modify
9
* it under the terms of the MIKAI License, as published by
10
* Lilz along with this program and available on "MIKAI Download" Telegram channel
11
* <https://telegram.me/mikaidownload>.
12
*
13
* MIKAI is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY.
15
*
16
* You should have received a copy of the MIKAI License along
17
* with MIKAI.
18
* If not, see <https://telegram.me/mikaidownload>.
19
*/
20
21
#ifndef MIKAI_UTILS_H
22
#define MIKAI_UTILS_H
23
24
#include <stdint.h>
25
30
typedef
enum
{
31
MIKAI_SUCCESS
,
32
MIKAI_NFC_ERROR
= INT8_MIN,
33
MIKAI_SRIX_ERROR
,
34
MIKAI_MYKEY_ERROR
35
}
MikaiErrorCode
;
36
40
typedef
struct
MikaiError
{
41
MikaiErrorCode
errorType
;
42
char
const
*
message
;
43
}
MikaiError
;
44
45
#define MIKAI_NO_ERROR (MikaiError) {.errorType = MIKAI_SUCCESS}
46
#define MIKAI_ERROR(type, errorMessage) (MikaiError) {.errorType = (type), .message = (errorMessage)}
47
#define MIKAI_IS_ERROR(isError) ((isError).errorType != MIKAI_SUCCESS)
48
49
#endif
/* MIKAI_LOG_H */
MikaiError::errorType
MikaiErrorCode errorType
Definition:
mikai-error.h:41
MIKAI_NFC_ERROR
@ MIKAI_NFC_ERROR
Definition:
mikai-error.h:32
MIKAI_SUCCESS
@ MIKAI_SUCCESS
Definition:
mikai-error.h:31
MikaiError
Error structure that contains a description message.
Definition:
mikai-error.h:40
MIKAI_SRIX_ERROR
@ MIKAI_SRIX_ERROR
Definition:
mikai-error.h:33
MikaiError::message
const char * message
Definition:
mikai-error.h:42
MIKAI_MYKEY_ERROR
@ MIKAI_MYKEY_ERROR
Definition:
mikai-error.h:34
MikaiErrorCode
MikaiErrorCode
Error codes enum.
Definition:
mikai-error.h:30
MikaiError
struct MikaiError MikaiError
Error structure that contains a description message.
Generated by
1.8.17