diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-11 12:04:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-11 12:04:28 +0300 |
commit | 322fece4cdb97f834c3c13b7bb3157ba6e4fa449 (patch) | |
tree | ab02c0681f9c9bb1adc1038b251f502dcdb49638 /protocols/Discord/src/proto.h | |
parent | 4abcb6d6a611b10f32d803270b7f2480fbb6865e (diff) |
parameters unification between JSON & HTTP
Diffstat (limited to 'protocols/Discord/src/proto.h')
-rw-r--r-- | protocols/Discord/src/proto.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h index 56c04ef157..5970ce26d3 100644 --- a/protocols/Discord/src/proto.h +++ b/protocols/Discord/src/proto.h @@ -26,64 +26,11 @@ struct AsyncHttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject void *pUserInfo; }; -struct PARAM -{ - LPCSTR szName; - __forceinline PARAM(LPCSTR _name) : szName(_name) - {} -}; - -struct BOOL_PARAM : public PARAM -{ - bool bValue; - __forceinline BOOL_PARAM(LPCSTR _name, bool _value) : - PARAM(_name), bValue(_value) - {} -}; -AsyncHttpRequest* operator<<(AsyncHttpRequest*, const BOOL_PARAM&); - -struct INT_PARAM : public PARAM -{ - int iValue; - __forceinline INT_PARAM(LPCSTR _name, int _value) : - PARAM(_name), iValue(_value) - {} -}; AsyncHttpRequest* operator<<(AsyncHttpRequest*, const INT_PARAM&); - -struct INT64_PARAM : public PARAM -{ - SnowFlake iValue; - __forceinline INT64_PARAM(LPCSTR _name, SnowFlake _value) : - PARAM(_name), iValue(_value) - {} -}; AsyncHttpRequest* operator<<(AsyncHttpRequest*, const INT64_PARAM&); - -struct CHAR_PARAM : public PARAM -{ - LPCSTR szValue; - __forceinline CHAR_PARAM(LPCSTR _name, LPCSTR _value) : - PARAM(_name), szValue(_value) - {} -}; AsyncHttpRequest* operator<<(AsyncHttpRequest*, const CHAR_PARAM&); - -struct WCHAR_PARAM : public PARAM -{ - LPCWSTR wszValue; - __forceinline WCHAR_PARAM(LPCSTR _name, LPCWSTR _value) : - PARAM(_name), wszValue(_value) - {} -}; AsyncHttpRequest* operator<<(AsyncHttpRequest*, const WCHAR_PARAM&); -JSONNode& operator<<(JSONNode &json, const INT_PARAM ¶m); -JSONNode& operator<<(JSONNode &json, const INT64_PARAM ¶m); -JSONNode& operator<<(JSONNode &json, const BOOL_PARAM ¶m); -JSONNode& operator<<(JSONNode &json, const CHAR_PARAM ¶m); -JSONNode& operator<<(JSONNode &json, const WCHAR_PARAM ¶m); - ///////////////////////////////////////////////////////////////////////////////////////// struct CDiscordRole : public MZeroedObject |