diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-16 14:03:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-16 14:03:24 +0000 |
commit | 8bd2456f654ef5eea44fcf4ad6ce5f7107f7d829 (patch) | |
tree | 8ae03049734c96a5feba398f5c142d9a4213d640 /include | |
parent | c3908b9c6d53a6aef5e25975d3b336974e6dd610 (diff) |
IsStatusConnecting() - useful macro
git-svn-id: http://svn.miranda-ng.org/main/trunk@12860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/statusmodes.h | 9 |
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
|