CLOUD: Refactor Request
Added ErrorResponse and ErrorCallback. Each Request now has an ErrorCallback, which should be called instead of usual callback in case of failure.
This commit is contained in:
parent
001b417f33
commit
eb63b50b7f
29 changed files with 652 additions and 507 deletions
|
@ -48,7 +48,7 @@ protected:
|
|||
virtual NetworkReadStream *makeStream();
|
||||
|
||||
public:
|
||||
CurlRequest(DataCallback cb, Common::String url);
|
||||
CurlRequest(DataCallback cb, ErrorCallback ecb, Common::String url);
|
||||
virtual ~CurlRequest();
|
||||
|
||||
virtual void handle();
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
virtual NetworkReadStreamResponse execute();
|
||||
|
||||
/** Returns Request's NetworkReadStream. */
|
||||
const NetworkReadStream *getNetworkReadStream() const { return _stream; }
|
||||
const NetworkReadStream *getNetworkReadStream() const;
|
||||
};
|
||||
|
||||
} // End of namespace Networking
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue