summaryrefslogtreecommitdiff
path: root/include/m_system_cpp.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-12-11 12:04:28 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-12-11 12:04:28 +0300
commit322fece4cdb97f834c3c13b7bb3157ba6e4fa449 (patch)
treeab02c0681f9c9bb1adc1038b251f502dcdb49638 /include/m_system_cpp.h
parent4abcb6d6a611b10f32d803270b7f2480fbb6865e (diff)
parameters unification between JSON & HTTP
Diffstat (limited to 'include/m_system_cpp.h')
-rw-r--r--include/m_system_cpp.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h
index be7c6ff84f..e26ef5a3de 100644
--- a/include/m_system_cpp.h
+++ b/include/m_system_cpp.h
@@ -319,6 +319,56 @@ public:
void remove(size_t sz);
};
+///////////////////////////////////////////////////////////////////////////////
+// parameter classes for XML, JSON & HTTP requests
+
+struct PARAM
+{
+ const char *szName;
+ __forceinline PARAM(const char *_name) : szName(_name)
+ {}
+};
+
+struct BOOL_PARAM : public PARAM
+{
+ bool bValue;
+ __forceinline BOOL_PARAM(const char *_name, bool _value) :
+ PARAM(_name), bValue(_value)
+ {}
+};
+
+struct INT_PARAM : public PARAM
+{
+ int32_t iValue;
+ __forceinline INT_PARAM(const char *_name, int32_t _value) :
+ PARAM(_name), iValue(_value)
+ {}
+};
+
+struct INT64_PARAM : public PARAM
+{
+ int64_t iValue;
+ __forceinline INT64_PARAM(const char *_name, int64_t _value) :
+ PARAM(_name), iValue(_value)
+ {}
+};
+
+struct CHAR_PARAM : public PARAM
+{
+ const char *szValue;
+ __forceinline CHAR_PARAM(const char *_name, const char *_value) :
+ PARAM(_name), szValue(_value)
+ {}
+};
+
+struct WCHAR_PARAM : public PARAM
+{
+ const wchar_t *wszValue;
+ __forceinline WCHAR_PARAM(const char *_name, const wchar_t *_value) :
+ PARAM(_name), wszValue(_value)
+ {}
+};
+
#endif
#endif // M_SYSTEM_CPP_H