summaryrefslogtreecommitdiff
path: root/include/statusmodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/statusmodes.h')
-rw-r--r--include/statusmodes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/statusmodes.h b/include/statusmodes.h
index 432292959f..f34892d1f7 100644
--- a/include/statusmodes.h
+++ b/include/statusmodes.h
@@ -34,6 +34,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//and/or should do.
#define MAX_CONNECT_RETRIES 10000
+#if defined __cplusplus
+__forceinline bool IsStatusConnecting(int iStatus)
+{
+ return iStatus >= ID_STATUS_CONNECTING && iStatus < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES;
+}
+#else
+ #define IsStatusConnecting(X) (X >= ID_STATUS_CONNECTING && X < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)
+#endif
+
#define ID_STATUS_OFFLINE 40071
#define ID_STATUS_ONLINE 40072
#define ID_STATUS_AWAY 40073