From 3b55ee911e8e2186c2d72e03874307d3aec91b8c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 12 Jan 2017 19:44:03 +0300 Subject: - stronger types, part II; - don't call hNetlibUser hConnection --- protocols/FacebookRM/src/client.h | 15 ++++++--------- protocols/FacebookRM/src/http_request.h | 6 +++--- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'protocols/FacebookRM') diff --git a/protocols/FacebookRM/src/client.h b/protocols/FacebookRM/src/client.h index 6625c6919b..f36635c979 100644 --- a/protocols/FacebookRM/src/client.h +++ b/protocols/FacebookRM/src/client.h @@ -32,7 +32,6 @@ class facebook_client public: //////////////////////////////////////////////////////////// - // Client definition facebook_client() @@ -198,11 +197,11 @@ public: std::map messages_timestamp; bool loading_history; - HANDLE loading_history_lock_; + HANDLE loading_history_lock_; - bool channel(); - bool activity_ping(); - int send_message(int seqid, MCONTACT, const std::string &message_text, std::string *error_text, const std::string &captchaPersistData = "", const std::string &captcha = ""); + bool channel(); + bool activity_ping(); + int send_message(int seqid, MCONTACT, const std::string &message_text, std::string *error_text, const std::string &captchaPersistData = "", const std::string &captcha = ""); //////////////////////////////////////////////////////////// @@ -218,12 +217,10 @@ public: bool save_url(const std::string &url,const std::wstring &filename, HANDLE &nlc); //////////////////////////////////////////////////////////// - // Netlib handle - HANDLE handle_; - - void set_handle(HANDLE h) + HNETLIBUSER handle_; + void set_handle(HNETLIBUSER h) { handle_ = h; } diff --git a/protocols/FacebookRM/src/http_request.h b/protocols/FacebookRM/src/http_request.h index 53423cb58c..64750eef39 100644 --- a/protocols/FacebookRM/src/http_request.h +++ b/protocols/FacebookRM/src/http_request.h @@ -276,7 +276,7 @@ public: mir_free(headers); } - virtual NETLIBHTTPREQUEST* Send(HANDLE hConnection) + virtual NETLIBHTTPREQUEST* Send(HNETLIBUSER nlu) { if (url.Find("://") == -1) url.Insert(0, ((flags & NLHRF_SSL) ? "https://" : "http://")); @@ -287,9 +287,9 @@ public: dataLength = (int)mir_strlen(pData); } - Netlib_Logf(Netlib_GetConnNlu(hConnection), "Send request to %s", szUrl); + Netlib_Logf(nlu, "Send request to %s", szUrl); - return (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hConnection, (LPARAM)(NETLIBHTTPREQUEST*)this); + return (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)nlu, (LPARAM)(NETLIBHTTPREQUEST*)this); } }; -- cgit v1.2.3