summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.h')
-rw-r--r--protocols/VKontakte/src/vk_proto.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index 734ffc813c..c789a24138 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -32,22 +32,25 @@ struct AsyncHttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject
void Redirect(NETLIBHTTPREQUEST*);
CMStringA m_szUrl;
- bool bNeedsRestart, bIsMainConn, m_bHasParams;
+ bool bNeedsRestart, bIsMainConn, m_bHasGParams, m_bHasPParams;
VK_REQUEST_HANDLER m_pFunc;
void *pUserInfo;
};
+enum ReqType {reqGET, reqPOST};
+
struct PARAM
{
LPCSTR szName;
- __forceinline PARAM(LPCSTR _name) : szName(_name) {}
+ ReqType rtType;
+ __forceinline PARAM(LPCSTR _name, ReqType _type = reqGET) : szName(_name), rtType(_type) {}
};
struct INT_PARAM : public PARAM
{
int iValue;
- __forceinline INT_PARAM(LPCSTR _name, int _value) :
- PARAM(_name), iValue(_value)
+ __forceinline INT_PARAM(LPCSTR _name, int _value, ReqType _type = reqGET) :
+ PARAM(_name, _type), iValue(_value)
{
}
};
@@ -56,8 +59,8 @@ AsyncHttpRequest* operator<<(AsyncHttpRequest*, const INT_PARAM&);
struct CHAR_PARAM : public PARAM
{
LPCSTR szValue;
- __forceinline CHAR_PARAM(LPCSTR _name, LPCSTR _value) :
- PARAM(_name), szValue(_value)
+ __forceinline CHAR_PARAM(LPCSTR _name, LPCSTR _value, ReqType _type = reqGET) :
+ PARAM(_name, _type), szValue(_value)
{
}
};
@@ -66,8 +69,8 @@ AsyncHttpRequest* operator<<(AsyncHttpRequest*, const CHAR_PARAM&);
struct TCHAR_PARAM : public PARAM
{
LPCTSTR tszValue;
- __forceinline TCHAR_PARAM(LPCSTR _name, LPCTSTR _value) :
- PARAM(_name), tszValue(_value)
+ __forceinline TCHAR_PARAM(LPCSTR _name, LPCTSTR _value, ReqType _type = reqGET) :
+ PARAM(_name, _type), tszValue(_value)
{
}
};