1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "notification/notification_parameters.h"
7 #include "common/picojson.h"
9 NotificationParameters ReadNotificationParameters(const picojson::value& v) {
10 NotificationParameters params;
11 params.status_type = v.get("statusType").to_str();
13 params.title = v.get("title").to_str();
14 params.content = v.get("content").to_str();
16 if (params.status_type == "PROGRESS") {
17 params.progress_type = v.get("progressType").to_str();
18 params.progress_value = v.get("progressValue").get<double>();