aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/curl/connectionmanager.h
diff options
context:
space:
mode:
authorAlexander Tkachev2016-05-26 17:12:40 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commiteda575a660543884b1a4addd21b676a67d2c2a31 (patch)
tree0964f46167ff44daefba64cf429ea69da5512aeb /backends/networking/curl/connectionmanager.h
parent17fc40a94436f970af75d6717c7a63c70eafcb12 (diff)
downloadscummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.tar.gz
scummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.tar.bz2
scummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.zip
CLOUD: Add Requests id
(Upgrading ConnectionManager step by step.)
Diffstat (limited to 'backends/networking/curl/connectionmanager.h')
-rw-r--r--backends/networking/curl/connectionmanager.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/backends/networking/curl/connectionmanager.h b/backends/networking/curl/connectionmanager.h
index ed726441c4..9651a0166a 100644
--- a/backends/networking/curl/connectionmanager.h
+++ b/backends/networking/curl/connectionmanager.h
@@ -26,7 +26,7 @@
#include "backends/networking/curl/request.h"
#include "common/str.h"
#include "common/singleton.h"
-#include "common/array.h"
+#include "common/hashmap.h"
typedef void CURL;
typedef void CURLM;
@@ -41,7 +41,8 @@ class ConnectionManager : public Common::Singleton<ConnectionManager> {
CURLM *_multi;
bool _timerStarted;
- Common::Array<Request *> _requests;
+ Common::HashMap<int32, Request *> _requests;
+ int32 _nextId;
void startTimer(int interval = 1000000); //1 second is the default interval
void stopTimer();
@@ -66,8 +67,10 @@ public:
* Requests until they return true.
*
* @note This method starts the timer if it's not started yet.
+ *
+ * @return generated Request's id, which might be used to get its status
*/
- void addRequest(Request *request);
+ int32 addRequest(Request *request);
};
/** Shortcut for accessing the connection manager. */