diff options
author | Fishbone <fishbone@miranda-ng.org> | 2013-06-02 16:19:21 +0000 |
---|---|---|
committer | Fishbone <fishbone@miranda-ng.org> | 2013-06-02 16:19:21 +0000 |
commit | ab7e0b08fa8c31cf1d468ab4b3c660e2b1836811 (patch) | |
tree | 52977603ea0f431adff16573d3d5b46a95843c7f /protocols/WhatsApp/src/definitions.h | |
parent | 8320783f99419db1e40346fdb292c19ee008948b (diff) |
Added WhatsApp-protocol
git-svn-id: http://svn.miranda-ng.org/main/trunk@4861 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/definitions.h')
-rw-r--r-- | protocols/WhatsApp/src/definitions.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/definitions.h b/protocols/WhatsApp/src/definitions.h new file mode 100644 index 0000000000..4e24139d67 --- /dev/null +++ b/protocols/WhatsApp/src/definitions.h @@ -0,0 +1,18 @@ +#if !defined(DEFINITIONS_H)
+#define DEFINITIONS_H
+
+#define FLAG_CONTAINS(x,y) ( ( x & y ) == y )
+#define REMOVE_FLAG(x,y) ( x = ( x & ~y ))
+
+#define LOG(fmt, ...) Log(__FUNCTION__, fmt, ##__VA_ARGS__)
+#define CODE_BLOCK_TRY try {
+#define CODE_BLOCK_CATCH(ex) } catch (ex& e) { LOG("Exception: %s", e.what());
+#define CODE_BLOCK_CATCH_UNKNOWN } catch (...) { LOG("Unknown exception");
+#define CODE_BLOCK_CATCH_ALL } catch (WAException& e) { LOG("Exception: %s", e.what()); \
+ } catch (exception& e) { LOG("Exception: %s", e.what()); \
+ } catch (...) { LOG("Unknown exception"); }
+#define CODE_BLOCK_END }
+
+#define NIIF_INTERN_TCHAR NIIF_INTERN_UNICODE
+
+#endif
\ No newline at end of file |