diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-13 11:54:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-13 11:54:13 +0000 |
commit | d04a944cedf1e405ffa8879ea6ae139f675b8616 (patch) | |
tree | 01dfc58c103c27301cb836d434b66d6063d11302 /protocols/VKontakte/src/vk_proto.h | |
parent | 27c56000557f31b16358107754515e409b68a71b (diff) |
VK: quick-n-dirty cookie parser
git-svn-id: http://svn.miranda-ng.org/main/trunk@6488 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.h')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index fe499ee558..e6d309424b 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -128,11 +128,25 @@ private: };
LIST<AsyncHttpRequest> m_arRequestsQueue;
CRITICAL_SECTION m_csRequestsQueue;
- CMStringA m_prevUrl, m_savedCookie;
+ CMStringA m_prevUrl;
HANDLE m_evRequestsQueue;
HANDLE m_hWorkerThread;
bool m_bTerminated;
+ struct Cookie
+ {
+ Cookie(const CMStringA& name, const CMStringA& value, const CMStringA& domain) :
+ m_name(name),
+ m_value(value),
+ m_domain(domain)
+ {}
+
+ CMStringA m_name, m_value, m_domain;
+ };
+ OBJLIST<Cookie> m_cookies;
+ void GrabCookies(NETLIBHTTPREQUEST *nhr);
+ void ApplyCookies(AsyncHttpRequest*);
+
void InitQueue();
void UninitQueue();
void ExecuteRequest(AsyncHttpRequest*);
@@ -142,8 +156,8 @@ private: CMStringA RunCaptchaForm(LPCSTR szUrl);
CMStringA AutoFillForm(char*, CMStringA&);
-
- void ConnectionFailed(int iReason);
+
+ void ConnectionFailed(int iReason);
bool CheckJsonResult(JSONNODE*);
void OnLoggedIn();
void OnLoggedOut();
@@ -167,6 +181,7 @@ private: ptrA m_pollingServer, m_pollingKey, m_pollingTs;
HANDLE m_pollingConn, m_hPollingThread;
ULONG m_msgId;
+ bool m_prevError;
LIST<void> m_sendIds;
bool CheckMid(int msgid);
|