// sync-agent should fix it's deinitialization
}
-PlatformResult DataSyncManager::Item(ds_profile_h* profile_h, const picojson::object& args) {
+PlatformResult DataSyncManager::Item(ds_profile_h* profile_h,
+ const picojson::object& args) {
sync_agent_ds_error_e ret;
std::string profile_name = FromJson<std::string>(args, "profileName").c_str();
- ret = sync_agent_ds_set_profile_name(profile_h, const_cast<char*>(profile_name.c_str()));
+ ret = sync_agent_ds_set_profile_name(profile_h,
+ const_cast<char*>(profile_name.c_str()));
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while settting a profile name");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while settting a profile name");
}
- const picojson::object& sync_info = FromJson<picojson::object>(args, "syncInfo");
+ const picojson::object& sync_info =
+ FromJson<picojson::object>(args, "syncInfo");
std::string url = FromJson<std::string>(sync_info, "url").c_str();
std::string id = FromJson<std::string>(sync_info, "id").c_str();
std::string password = FromJson<std::string>(sync_info, "password").c_str();
const_cast<char*>(id.c_str()),
const_cast<char*>(password.c_str()));
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while settting a server info");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while settting a server info");
}
int sync_mode;
&sync_interval);
if (status.IsError()) return status;
- LoggerD("syncMode: %d, syncType: %d, syncInterval: %d", sync_mode, sync_type, sync_interval);
+ LoggerD("syncMode: %d, syncType: %d, syncInterval: %d", sync_mode, sync_type,
+ sync_interval);
- ret = sync_agent_ds_set_sync_info(profile_h, static_cast<sync_agent_ds_sync_mode_e>(sync_mode),
- static_cast<sync_agent_ds_sync_type_e>(sync_type),
- static_cast<sync_agent_ds_sync_interval_e>(sync_interval));
+ ret = sync_agent_ds_set_sync_info(
+ profile_h, static_cast<sync_agent_ds_sync_mode_e>(sync_mode),
+ static_cast<sync_agent_ds_sync_type_e>(sync_type),
+ static_cast<sync_agent_ds_sync_interval_e>(sync_interval));
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while settting a sync info");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while settting a sync info");
}
// Set the sync categories.
if (IsNull(args, "serviceInfo")) return PlatformResult(ErrorCode::NO_ERROR);
- const picojson::array& service_info = FromJson<picojson::array>(args, "serviceInfo");
+ const picojson::array& service_info =
+ FromJson<picojson::array>(args, "serviceInfo");
for (auto& item : service_info) {
const picojson::object& obj = JsonCast<picojson::object>(item);
if (!IsNull(obj, "id")) id = FromJson<std::string>(obj, "id");
std::string password = "";
- if (!IsNull(obj, "password")) password = FromJson<std::string>(obj, "password");
+ if (!IsNull(obj, "password"))
+ password = FromJson<std::string>(obj, "password");
- LoggerI("serviceType: %d, tgtURI: %s, enable: %d", service_type, tgt_uri.c_str(), enable);
+ LoggerI("serviceType: %d, tgtURI: %s, enable: %d", service_type,
+ tgt_uri.c_str(), enable);
ret = sync_agent_ds_set_sync_service_info(
- profile_h, static_cast<sync_agent_ds_service_type_e>(service_type), enable,
- static_cast<sync_agent_ds_src_uri_e>(src_uri), const_cast<char*>(tgt_uri.c_str()),
+ profile_h, static_cast<sync_agent_ds_service_type_e>(service_type),
+ enable, static_cast<sync_agent_ds_src_uri_e>(src_uri),
+ const_cast<char*>(tgt_uri.c_str()),
0 == id.size() ? nullptr : const_cast<char*>(id.c_str()),
0 == password.size() ? nullptr : const_cast<char*>(password.c_str()));
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while settting a sync service info");
+ return PlatformResult(
+ ErrorCode::UNKNOWN_ERR,
+ "Platform error while settting a sync service info");
}
}
return PlatformResult(ErrorCode::NO_ERROR);
}
-PlatformResult DataSyncManager::Item(const std::string& id, ds_profile_h* profile_h, picojson::object& out) {
+PlatformResult DataSyncManager::Item(const std::string& id,
+ ds_profile_h* profile_h,
+ picojson::object& out) {
out["profileId"] = picojson::value(id);
char* profile_name = nullptr;
- sync_agent_ds_error_e ret = sync_agent_ds_get_profile_name(profile_h, &profile_name);
+ sync_agent_ds_error_e ret =
+ sync_agent_ds_get_profile_name(profile_h, &profile_name);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while gettting a profile name");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while gettting a profile name");
}
out["profileName"] = picojson::value(profile_name);
sync_agent_ds_server_info server_info = {nullptr};
ret = sync_agent_ds_get_server_info(profile_h, &server_info);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while gettting a server info");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while gettting a server info");
}
picojson::value sync_info_val = picojson::value(picojson::object());
picojson::object& sync_info_obj = sync_info_val.get<picojson::object>();
sync_agent_ds_sync_info sync_info;
ret = sync_agent_ds_get_sync_info(profile_h, &sync_info);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while gettting a sync info");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while gettting a sync info");
}
std::string mode;
- PlatformResult status = PlatformEnumToStr(kSyncMode, sync_info.sync_mode, &mode);
+ PlatformResult status =
+ PlatformEnumToStr(kSyncMode, sync_info.sync_mode, &mode);
if (status.IsError()) return status;
sync_info_obj["mode"] = picojson::value(mode);
out["syncInfo"] = sync_info_val;
- LoggerD("Sync mode: %d, type: %d, interval: %d", sync_info.sync_mode, sync_info.sync_type,
- sync_info.interval);
+ LoggerD("Sync mode: %d, type: %d, interval: %d", sync_info.sync_mode,
+ sync_info.sync_type, sync_info.interval);
GList* category_list = nullptr;
ret = sync_agent_ds_get_sync_service_info(profile_h, &category_list);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while gettting sync categories");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while gettting sync categories");
}
int category_count = g_list_length(category_list);
LoggerD("category_count: %d", category_count);
sync_agent_ds_service_info* category_info = nullptr;
while (category_count--) {
- category_info =
- static_cast<sync_agent_ds_service_info*>(g_list_nth_data(category_list, category_count));
+ category_info = static_cast<sync_agent_ds_service_info*>(
+ g_list_nth_data(category_list, category_count));
if (SYNC_AGENT_CALENDAR < category_info->service_type) {
- LoggerD("Skip unsupported sync service type: %d", category_info->service_type);
+ LoggerD("Skip unsupported sync service type: %d",
+ category_info->service_type);
continue;
}
picojson::value item = picojson::value(picojson::object());
picojson::object& item_obj = item.get<picojson::object>();
- item_obj["enable"] = picojson::value(static_cast<bool>(category_info->enabled));
+ item_obj["enable"] =
+ picojson::value(static_cast<bool>(category_info->enabled));
if (category_info->id) {
item_obj["id"] = picojson::value(category_info->id);
}
return PlatformResult(ErrorCode::NO_ERROR);
}
-PlatformResult DataSyncManager::Add(const picojson::object& args, int *profile_id) {
+PlatformResult DataSyncManager::Add(const picojson::object& args,
+ int* profile_id) {
assert(profile_id);
ds_profile_h profile_h = nullptr;
LoggerD("numProfiles: %d", num_profiles);
if (MAX_PROFILES_NUM == num_profiles) {
- return PlatformResult(ErrorCode::QUOTA_EXCEEDED_ERR, "There are already maximum number of profiles!");
+ return PlatformResult(ErrorCode::QUOTA_EXCEEDED_ERR,
+ "There are already maximum number of profiles!");
}
sync_agent_ds_error_e ret = sync_agent_ds_create_profile_info(&profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while creating a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while creating a profile");
}
status = Item(&profile_h, args);
ret = sync_agent_ds_add_profile(profile_h, profile_id);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while adding a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while adding a profile");
}
LoggerD("profileId from platform: %d", *profile_id);
sync_agent_ds_error_e ret = sync_agent_ds_get_profile(profile_id, &profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::NOT_FOUND_ERR, "Platform error while getting a profile");
+ return PlatformResult(ErrorCode::NOT_FOUND_ERR,
+ "Platform error while getting a profile");
}
PlatformResult status = Item(&profile_h, args);
ret = sync_agent_ds_update_profile(profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret && SYNC_AGENT_DS_SYNCHRONISING != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while updating a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while updating a profile");
}
return PlatformResult(ErrorCode::NO_ERROR);
sync_agent_ds_error_e ret = sync_agent_ds_get_profile(profile_id, &profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while getting a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while getting a profile");
}
ret = sync_agent_ds_delete_profile(profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret && SYNC_AGENT_DS_SYNCHRONISING != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while deleting a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while deleting a profile");
}
return PlatformResult(ErrorCode::NO_ERROR);
sync_agent_ds_error_e ret = sync_agent_ds_get_all_profile(&profile_list);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while getting all profiles");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while getting all profiles");
}
ds_profile_h profile_h = nullptr;
ret = sync_agent_ds_get_profile_id(profile_h, &profile_id);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while gettting a profile id");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while gettting a profile id");
}
picojson::value profile = picojson::value(picojson::object());
sync_agent_event_error_e err = sync_agent_set_noti_callback(
SYNC_AGENT_DS_SYNC_SESSION,
- [](sync_agent_event_data_s* d,
- void* ud) { return static_cast<DataSyncManager*>(ud)->StateChangedCallback(d); },
+ [](sync_agent_event_data_s* d, void* ud) {
+ return static_cast<DataSyncManager*>(ud)->StateChangedCallback(d);
+ },
static_cast<void*>(this));
if (err != SYNC_AGENT_EVENT_SUCCESS) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while setting state changed cb");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while setting state changed cb");
}
- err = sync_agent_set_noti_callback(
- SYNC_AGENT_DS_SYNC_PROCESS, [](sync_agent_event_data_s* d, void* ud) {
- return static_cast<DataSyncManager*>(ud)->ProgressCallback(d);
- },
- static_cast<void*>(this));
+ err = sync_agent_set_noti_callback(SYNC_AGENT_DS_SYNC_PROCESS,
+ [](sync_agent_event_data_s* d, void* ud) {
+ return static_cast<DataSyncManager*>(ud)
+ ->ProgressCallback(d);
+ },
+ static_cast<void*>(this));
if (err != SYNC_AGENT_EVENT_SUCCESS) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while setting progress cb");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while setting progress cb");
}
sync_agent_ds_error_e ret = sync_agent_ds_start_sync(profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret && SYNC_AGENT_DS_SYNCHRONISING != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while starting a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while starting a profile");
}
callbacks_[id] = listener_id;
sync_agent_ds_error_e ret = sync_agent_ds_get_profile(profile_id, &profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while getting a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while getting a profile");
}
ret = sync_agent_ds_stop_sync(profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while stopping a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while stopping a profile");
}
callbacks_.erase(id);
return manager;
}
-PlatformResult DataSyncManager::GetLastSyncStatistics(const std::string& id, picojson::array& out) {
+PlatformResult DataSyncManager::GetLastSyncStatistics(const std::string& id,
+ picojson::array& out) {
ds_profile_h profile_h = nullptr;
GList* statistics_list = nullptr;
sync_agent_ds_error_e ret = sync_agent_ds_get_profile(profile_id, &profile_h);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while getting a profile");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while getting a profile");
}
ret = sync_agent_ds_get_sync_statistics(profile_h, &statistics_list);
if (SYNC_AGENT_DS_SUCCESS != ret) {
- return PlatformResult(ErrorCode::UNKNOWN_ERR, "Platform error while gettting sync statistics");
+ return PlatformResult(ErrorCode::UNKNOWN_ERR,
+ "Platform error while gettting sync statistics");
}
int statistics_count = g_list_length(statistics_list);
sync_agent_ds_statistics_info* statistics = nullptr;
for (int i = 0; i < statistics_count; i++) {
- statistics = static_cast<sync_agent_ds_statistics_info*>(g_list_nth_data(statistics_list, i));
+ statistics = static_cast<sync_agent_ds_statistics_info*>(
+ g_list_nth_data(statistics_list, i));
picojson::value item = picojson::value(picojson::object());
picojson::object& item_obj = item.get<picojson::object>();
if (0 == i) {
LoggerD("Statistics for contact.");
- PlatformResult status = PlatformEnumToStr(kSyncServiceType, SYNC_AGENT_CONTACT,
- &service_type);
+ PlatformResult status = PlatformEnumToStr(
+ kSyncServiceType, SYNC_AGENT_CONTACT, &service_type);
if (status.IsError()) return status;
item_obj["serviceType"] = picojson::value(service_type);
} else if (1 == i) {
LoggerD("Statistics for event.");
- PlatformResult status = PlatformEnumToStr(kSyncServiceType, SYNC_AGENT_CALENDAR,
- &service_type);
+ PlatformResult status = PlatformEnumToStr(
+ kSyncServiceType, SYNC_AGENT_CALENDAR, &service_type);
if (status.IsError()) return status;
item_obj["serviceType"] = picojson::value(service_type);
} else {
if (!statistics->dbsynced) continue;
std::string db_synced = statistics->dbsynced;
- std::transform(db_synced.begin(), db_synced.end(), db_synced.begin(), ::toupper);
+ std::transform(db_synced.begin(), db_synced.end(), db_synced.begin(),
+ ::toupper);
item_obj["syncStatus"] = picojson::value(db_synced);
item_obj["clientToServerTotal"] =
picojson::value(static_cast<double>(statistics->client2server_total));
item_obj["clientToServerAdded"] =
picojson::value(static_cast<double>(statistics->client2server_nrofadd));
- item_obj["clientToServerUpdated"] =
- picojson::value(static_cast<double>(statistics->client2server_nrofreplace));
- item_obj["clientToServerRemoved"] =
- picojson::value(static_cast<double>(statistics->client2server_nrofdelete));
+ item_obj["clientToServerUpdated"] = picojson::value(
+ static_cast<double>(statistics->client2server_nrofreplace));
+ item_obj["clientToServerRemoved"] = picojson::value(
+ static_cast<double>(statistics->client2server_nrofdelete));
item_obj["serverToClientTotal"] =
picojson::value(static_cast<double>(statistics->server2client_total));
item_obj["serverToClientAdded"] =
picojson::value(static_cast<double>(statistics->server2client_nrofadd));
- item_obj["serverToClientUpdated"] =
- picojson::value(static_cast<double>(statistics->server2client_nrofreplace));
- item_obj["serverToClientRemoved"] =
- picojson::value(static_cast<double>(statistics->server2client_nrofdelete));
- item_obj["lastSyncTime"] = picojson::value(static_cast<double>(statistics->last_session_time));
+ item_obj["serverToClientUpdated"] = picojson::value(
+ static_cast<double>(statistics->server2client_nrofreplace));
+ item_obj["serverToClientRemoved"] = picojson::value(
+ static_cast<double>(statistics->server2client_nrofdelete));
+ item_obj["lastSyncTime"] =
+ picojson::value(static_cast<double>(statistics->last_session_time));
- LoggerD("ClientToServerTotal: %d, ServerToClientTotal: %d", statistics->client2server_total,
- statistics->server2client_total);
+ LoggerD("ClientToServerTotal: %d, ServerToClientTotal: %d",
+ statistics->client2server_total, statistics->server2client_total);
}
return PlatformResult(ErrorCode::NO_ERROR);
}
-PlatformResult DataSyncManager::GetProfileId(sync_agent_event_data_s* request, std::string& profile_id) {
+PlatformResult DataSyncManager::GetProfileId(sync_agent_event_data_s* request,
+ std::string& profile_id) {
char* profile_dir_name = nullptr;
sync_agent_get_event_data_param(request, &profile_dir_name);
return PlatformResult(ErrorCode::NO_ERROR);
}
-void DataSyncManager::Failed(picojson::object& response_obj, picojson::object& answer_obj,
+void DataSyncManager::Failed(picojson::object& response_obj,
+ picojson::object& answer_obj,
const common::ErrorCode& code,
- const std::string& name, const std::string& message) {
+ const std::string& name,
+ const std::string& message) {
LoggerE("%s", message.c_str());
response_obj["callback_name"] = picojson::value("onfailed");
answer_obj["error"] = error;
}
-void DataSyncManager::PrepareResponseObj(const std::string& profile_id, picojson::value& response,
- picojson::object& response_obj, picojson::value& answer,
+void DataSyncManager::PrepareResponseObj(const std::string& profile_id,
+ picojson::value& response,
+ picojson::object& response_obj,
+ picojson::value& answer,
picojson::object& answer_obj) {
response = picojson::value(picojson::object());
response_obj = response.get<picojson::object>();
callbacks_.erase(it);
if (!progress) {
- Failed(response_obj, answer_obj, ErrorCode::UNKNOWN_ERR, "Exception", "nullptr status");
+ Failed(response_obj, answer_obj, ErrorCode::UNKNOWN_ERR, "Exception",
+ "nullptr status");
} else if (0 == strncmp(progress, "DONE", 4)) {
response_obj["callback_name"] = picojson::value("oncompleted");
} else if (0 == strncmp(progress, "CANCEL", 6)) {
response_obj["callback_name"] = picojson::value("onstopped");
} else if (0 == strncmp(progress, "ERROR", 5)) {
- Failed(response_obj, answer_obj, ErrorCode::UNKNOWN_ERR, "Exception", "Datasync failed");
+ Failed(response_obj, answer_obj, ErrorCode::UNKNOWN_ERR, "Exception",
+ "Datasync failed");
} else {
- Failed(response_obj, answer_obj, ErrorCode::UNKNOWN_ERR, "Exception", "Undefined status");
+ Failed(response_obj, answer_obj, ErrorCode::UNKNOWN_ERR, "Exception",
+ "Undefined status");
}
}
LoggerD("DataSync progress called.");
int uri;
- int is_from_server, total_per_operation, synced_per_operation, total_per_db, synced_per_db;
+ int is_from_server, total_per_operation, synced_per_operation, total_per_db,
+ synced_per_db;
std::string profile_id;
LoggerD("Get progress info.");
sync_agent_get_event_data_param(request, &uri);
-
PlatformResult status = GetProfileId(request, profile_id);
if (status.IsError()) return static_cast<int>(status.error_code());
sync_agent_get_event_data_param(request, &synced_per_db);
LoggerI(
- "isFromServer: %d, totalPerOperation: %d, syncedPerOperation: %d, totalPerDb: %d, "
+ "isFromServer: %d, totalPerOperation: %d, syncedPerOperation: %d, "
+ "totalPerDb: %d, "
"syncedPerDb %d",
- is_from_server, total_per_operation, synced_per_operation, total_per_db, synced_per_db);
+ is_from_server, total_per_operation, synced_per_operation, total_per_db,
+ synced_per_db);
// prepare response object
picojson::value response;
auto it = callbacks_.find(profile_id);
if (it != callbacks_.end()) {
-
- if (SYNC_AGENT_SRC_URI_CONTACT == uri || SYNC_AGENT_SRC_URI_CALENDAR == uri) {
+ if (SYNC_AGENT_SRC_URI_CONTACT == uri ||
+ SYNC_AGENT_SRC_URI_CALENDAR == uri) {
response_obj["callback_name"] = picojson::value("onprogress");
std::string service_type;
- PlatformResult status = PlatformEnumToStr(kSyncServiceTypeToSrcUri, uri, &service_type);
+ PlatformResult status =
+ PlatformEnumToStr(kSyncServiceTypeToSrcUri, uri, &service_type);
if (status.IsError()) return static_cast<int>(status.error_code());
answer_obj["serviceType"] = picojson::value(service_type);
- answer_obj["isFromServer"] = picojson::value(static_cast<double>(is_from_server));
- answer_obj["totalPerService"] = picojson::value(static_cast<double>(total_per_db));
- answer_obj["syncedPerService"] = picojson::value(static_cast<double>(synced_per_db));
+ answer_obj["isFromServer"] =
+ picojson::value(static_cast<double>(is_from_server));
+ answer_obj["totalPerService"] =
+ picojson::value(static_cast<double>(total_per_db));
+ answer_obj["syncedPerService"] =
+ picojson::value(static_cast<double>(synced_per_db));
} else {
- Failed(response_obj, answer_obj, ErrorCode::UNKNOWN_ERR, "Exception", "Wrong service type");
+ Failed(response_obj, answer_obj, ErrorCode::UNKNOWN_ERR, "Exception",
+ "Wrong service type");
}
}