From a71361d8905f10d0dc8325f060134d135b486f60 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 23 Aug 2013 15:33:38 -0400 Subject: Replaced some defines with enums. --- core/Messenger.h | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'core/Messenger.h') diff --git a/core/Messenger.h b/core/Messenger.h index 581c4ba9..e808529f 100644 --- a/core/Messenger.h +++ b/core/Messenger.h @@ -48,23 +48,28 @@ extern "C" { #define PACKET_ID_MESSAGE 64 #define PACKET_ID_ACTION 63 + /* status definitions */ -#define FRIEND_ONLINE 4 -#define FRIEND_CONFIRMED 3 -#define FRIEND_REQUESTED 2 -#define FRIEND_ADDED 1 -#define NOFRIEND 0 +enum { + NOFRIEND, + FRIEND_ADDED, + FRIEND_REQUESTED, + FRIEND_CONFIRMED, + FRIEND_ONLINE, +}; /* errors for m_addfriend * FAERR - Friend Add Error */ -#define FAERR_TOOLONG -1 -#define FAERR_NOMESSAGE -2 -#define FAERR_OWNKEY -3 -#define FAERR_ALREADYSENT -4 -#define FAERR_UNKNOWN -5 -#define FAERR_BADCHECKSUM -6 -#define FAERR_SETNEWNOSPAM -7 -#define FAERR_NOMEM -8 +enum { + FAERR_TOOLONG = -1, + FAERR_NOMESSAGE = -2, + FAERR_OWNKEY = -3, + FAERR_ALREADYSENT = -4, + FAERR_UNKNOWN = -5, + FAERR_BADCHECKSUM = -6, + FAERR_SETNEWNOSPAM = -7, + FAERR_NOMEM = -8 +}; /* don't assume MAX_STATUSMESSAGE_LENGTH will stay at 128, it may be increased to an absurdly large number later */ -- cgit v1.2.3