From 8234832e06e873df035270f162d7d151fbf6e7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 4 Sep 2016 14:04:49 +0000 Subject: Facebook: Massive rewrite of all communication requests Note it doesn't use persistent connection yet. git-svn-id: http://svn.miranda-ng.org/main/trunk@17246 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/client.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'protocols/FacebookRM/src/client.h') diff --git a/protocols/FacebookRM/src/client.h b/protocols/FacebookRM/src/client.h index 22297ebf26..14af119921 100644 --- a/protocols/FacebookRM/src/client.h +++ b/protocols/FacebookRM/src/client.h @@ -146,18 +146,18 @@ public: // Helpers for data - std::string __inline __dyn() { + __inline const char *__dyn() { return ""; // FIXME: What's this value and where it come from? Looks like it is the same through all requests. } - std::string __inline __req() { + __inline const char *__req() { // Increment request number and convert it to string with radix 36 (whole numbers + whole alphabet) char buffer[10]; itoa(InterlockedIncrement(&this->chat_req_), buffer, 36); - return std::string(buffer); + return ptrA(mir_strdup(buffer)); } - std::string __inline __rev() { + __inline const char *__rev() { return "2509236"; // FIXME: Some version of communication protocol? This version is from 17.8.2016 } @@ -208,15 +208,9 @@ public: // HTTP communication - http::response flap(RequestType request_type, std::string *post_data = NULL, std::string *get_data = NULL); + http::response sendRequest(HttpRequest *request); bool save_url(const std::string &url,const std::wstring &filename, HANDLE &nlc); - bool notify_errors(RequestType); - std::string choose_server(RequestType); - std::string choose_action(RequestType, std::string *get_data = NULL); - - NETLIBHTTPHEADER *get_request_headers(int request_type, int *headers_count); - //////////////////////////////////////////////////////////// // Netlib handle -- cgit v1.2.3