mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Replaced some defines with enums.
This commit is contained in:
parent
eb0bb66a20
commit
a71361d890
|
@ -48,23 +48,28 @@ extern "C" {
|
||||||
#define PACKET_ID_MESSAGE 64
|
#define PACKET_ID_MESSAGE 64
|
||||||
#define PACKET_ID_ACTION 63
|
#define PACKET_ID_ACTION 63
|
||||||
|
|
||||||
|
|
||||||
/* status definitions */
|
/* status definitions */
|
||||||
#define FRIEND_ONLINE 4
|
enum {
|
||||||
#define FRIEND_CONFIRMED 3
|
NOFRIEND,
|
||||||
#define FRIEND_REQUESTED 2
|
FRIEND_ADDED,
|
||||||
#define FRIEND_ADDED 1
|
FRIEND_REQUESTED,
|
||||||
#define NOFRIEND 0
|
FRIEND_CONFIRMED,
|
||||||
|
FRIEND_ONLINE,
|
||||||
|
};
|
||||||
|
|
||||||
/* errors for m_addfriend
|
/* errors for m_addfriend
|
||||||
* FAERR - Friend Add Error */
|
* FAERR - Friend Add Error */
|
||||||
#define FAERR_TOOLONG -1
|
enum {
|
||||||
#define FAERR_NOMESSAGE -2
|
FAERR_TOOLONG = -1,
|
||||||
#define FAERR_OWNKEY -3
|
FAERR_NOMESSAGE = -2,
|
||||||
#define FAERR_ALREADYSENT -4
|
FAERR_OWNKEY = -3,
|
||||||
#define FAERR_UNKNOWN -5
|
FAERR_ALREADYSENT = -4,
|
||||||
#define FAERR_BADCHECKSUM -6
|
FAERR_UNKNOWN = -5,
|
||||||
#define FAERR_SETNEWNOSPAM -7
|
FAERR_BADCHECKSUM = -6,
|
||||||
#define FAERR_NOMEM -8
|
FAERR_SETNEWNOSPAM = -7,
|
||||||
|
FAERR_NOMEM = -8
|
||||||
|
};
|
||||||
|
|
||||||
/* don't assume MAX_STATUSMESSAGE_LENGTH will stay at 128, it may be increased
|
/* don't assume MAX_STATUSMESSAGE_LENGTH will stay at 128, it may be increased
|
||||||
to an absurdly large number later */
|
to an absurdly large number later */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user