diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-02-14 10:52:33 -0500 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2019-02-22 15:37:33 +0100 |
commit | 8410ce037ab27a38b0449c7666f1676374803496 (patch) | |
tree | a11d31e2c2987b1f0eb182af25146e1405a9c40b /desktop/inc | |
parent | 17a477c35cc43f37946dcea2b7c27f0f6571e118 (diff) |
LOK: Cache JSON payloads
Change-Id: I81f74027363d4b2959c053057851cf01fc94af8b
Reviewed-on: https://gerrit.libreoffice.org/67892
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'desktop/inc')
-rw-r--r-- | desktop/inc/lib/init.hxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx index 66696757292a..f2f6f5399649 100644 --- a/desktop/inc/lib/init.hxx +++ b/desktop/inc/lib/init.hxx @@ -104,10 +104,16 @@ namespace desktop { RectangleAndPart& setRectangleAndPart(const std::string& payload); /// Return the parsed RectangleAndPart instance. const RectangleAndPart& getRectangleAndPart() const; + /// Parse and set the JSON object and return it. Clobbers PayloadString. + boost::property_tree::ptree& setJson(const std::string& payload); + /// Set a Json object and update PayloadString. + void setJson(const boost::property_tree::ptree& rTree); + /// Return the parsed JSON instance. + const boost::property_tree::ptree& getJson() const; int Type; std::string PayloadString; - boost::variant<boost::blank, RectangleAndPart> PayloadObject; + boost::variant<boost::blank, RectangleAndPart, boost::property_tree::ptree> PayloadObject; }; typedef std::vector<CallbackData> queue_type; |