summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.h
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-09-09 10:45:10 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-09-09 10:45:10 +0000
commit24a161c41edfebcc4850bd58480649ff2ddf8d7f (patch)
tree6793c7a8dc85b8c9bb8cc7c5ce8cc4683d6c1709 /protocols/VKontakte/src/vk_proto.h
parent199bf2fee8e9f3844744288a8dde5d2dbc5ff55f (diff)
VKontakte: fix for 'To many MarkAsRead', redesign PARAM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@10410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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)
{
}
};