summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.h
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-09-10 04:27:14 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-09-10 04:27:14 +0000
commited4d2e70f154be0badfcc44afa04c0d8e984f03d (patch)
tree8debabb11e2080690ff5f4ba18c55b6d16ad8b98 /protocols/VKontakte/src/vk_proto.h
parent18a97b56e7042d69af69f0f5bf4c13436675ebc4 (diff)
VKontakte: redesign PARAM structure attempt 2, redesign AsyncHttpRequest structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@10415 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.h')
-rw-r--r--protocols/VKontakte/src/vk_proto.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index c789a24138..d1ff3aa750 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -32,25 +32,23 @@ struct AsyncHttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject
void Redirect(NETLIBHTTPREQUEST*);
CMStringA m_szUrl;
- bool bNeedsRestart, bIsMainConn, m_bHasGParams, m_bHasPParams;
+ CMStringA m_szParam;
+ bool bNeedsRestart, bIsMainConn;
VK_REQUEST_HANDLER m_pFunc;
void *pUserInfo;
};
-enum ReqType {reqGET, reqPOST};
-
struct PARAM
{
LPCSTR szName;
- ReqType rtType;
- __forceinline PARAM(LPCSTR _name, ReqType _type = reqGET) : szName(_name), rtType(_type) {}
+ __forceinline PARAM(LPCSTR _name) : szName(_name) {}
};
struct INT_PARAM : public PARAM
{
int iValue;
- __forceinline INT_PARAM(LPCSTR _name, int _value, ReqType _type = reqGET) :
- PARAM(_name, _type), iValue(_value)
+ __forceinline INT_PARAM(LPCSTR _name, int _value) :
+ PARAM(_name), iValue(_value)
{
}
};
@@ -59,8 +57,8 @@ AsyncHttpRequest* operator<<(AsyncHttpRequest*, const INT_PARAM&);
struct CHAR_PARAM : public PARAM
{
LPCSTR szValue;
- __forceinline CHAR_PARAM(LPCSTR _name, LPCSTR _value, ReqType _type = reqGET) :
- PARAM(_name, _type), szValue(_value)
+ __forceinline CHAR_PARAM(LPCSTR _name, LPCSTR _value) :
+ PARAM(_name), szValue(_value)
{
}
};
@@ -69,8 +67,8 @@ AsyncHttpRequest* operator<<(AsyncHttpRequest*, const CHAR_PARAM&);
struct TCHAR_PARAM : public PARAM
{
LPCTSTR tszValue;
- __forceinline TCHAR_PARAM(LPCSTR _name, LPCTSTR _value, ReqType _type = reqGET) :
- PARAM(_name, _type), tszValue(_value)
+ __forceinline TCHAR_PARAM(LPCSTR _name, LPCTSTR _value) :
+ PARAM(_name), tszValue(_value)
{
}
};