CLOUD: Add complex callbacks

Originally, I intended to add Storage API, StorageFile and StorageInfo
stubs. When I tried to implement a simple info() call, I ended up fixing
Request to contain some pointer field and all callbacks to have Request*
parameter. And, now I have to place callback pointer into Request. which
calls another callback.

And, eventually, these "simple" callbacks would again require another
pointer (to some caller class).
This commit is contained in:
Alexander Tkachev 2016-05-21 00:44:09 +06:00
parent f913675c43
commit 17eb5f9143
8 changed files with 149 additions and 33 deletions

View file

@ -75,7 +75,7 @@ bool CurlJsonRequest::handle() {
if (_callback) {
char *contents = getPreparedContents();
Common::JSONValue *json = Common::JSON::parse(contents);
_callback(json); //potential memory leak, free it in your callbacks!
_callback(this, json); //potential memory leak, free it in your callbacks!
}
return true;
}