diff options
author | Alexander Tkachev | 2016-07-22 20:02:36 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | f3959e140106334b33cf74832fc5b20d27407d0a (patch) | |
tree | 420bfa32f00fa24723176bd85dbc4b25cbda45df /backends/networking/curl/curljsonrequest.h | |
parent | f95073f0084b3fae3e2cbf14fd98135c37eabbdf (diff) | |
download | scummvm-rg350-f3959e140106334b33cf74832fc5b20d27407d0a.tar.gz scummvm-rg350-f3959e140106334b33cf74832fc5b20d27407d0a.tar.bz2 scummvm-rg350-f3959e140106334b33cf74832fc5b20d27407d0a.zip |
CLOUD: Upload ListDirectory Requests
Lots of checks to avoid JSON-related segfaults added.
Diffstat (limited to 'backends/networking/curl/curljsonrequest.h')
-rw-r--r-- | backends/networking/curl/curljsonrequest.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/backends/networking/curl/curljsonrequest.h b/backends/networking/curl/curljsonrequest.h index 1d1409efc8..cab75bf4bc 100644 --- a/backends/networking/curl/curljsonrequest.h +++ b/backends/networking/curl/curljsonrequest.h @@ -54,8 +54,11 @@ public: virtual void restart(); static bool jsonIsObject(Common::JSONValue *item, const char *warningPrefix); - static bool jsonContainsString(Common::JSONObject &item, const char *key, const char *warningPrefix); - static bool jsonContainsIntegerNumber(Common::JSONObject &item, const char *key, const char *warningPrefix); + static bool jsonContainsString(Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional = false); + static bool jsonContainsIntegerNumber(Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional = false); + static bool jsonContainsArray(Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional = false); + static bool jsonContainsStringOrIntegerNumber(Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional = false); + static bool jsonContainsAttribute(Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional = false); }; } // End of namespace Networking |