From: Jihoon Kim Date: Fri, 6 Mar 2020 04:03:43 +0000 (+0900) Subject: Set sync completion flags X-Git-Tag: accepted/tizen/5.5/unified/20200309.013454~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F226849%2F1;p=platform%2Fcore%2Fuifw%2Fcapi-ui-sticker.git Set sync completion flags Change-Id: I8029dd4516aaa849428e7d3ec3591704b6754253 Signed-off-by: Jihoon Kim --- diff --git a/packaging/capi-ui-sticker.spec b/packaging/capi-ui-sticker.spec index 0f75508..daabef7 100644 --- a/packaging/capi-ui-sticker.spec +++ b/packaging/capi-ui-sticker.spec @@ -29,6 +29,7 @@ BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(capi-appfw-service-application) BuildRequires: pkgconfig(capi-message-port) BuildRequires: pkgconfig(sap-client-stub-api) +BuildRequires: pkgconfig(vconf) BuildRequires: hash-signer Requires(post): signing-client diff --git a/receiver/CMakeLists.txt b/receiver/CMakeLists.txt index 7838d26..9cd44fb 100644 --- a/receiver/CMakeLists.txt +++ b/receiver/CMakeLists.txt @@ -16,6 +16,7 @@ pkg_check_modules(pkgs_test REQUIRED capi-message-port sap-client-stub-api json-glib-1.0 + vconf ) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/receiver/inc) diff --git a/receiver/src/ft.cpp b/receiver/src/ft.cpp index 7e22b1c..d1c960f 100644 --- a/receiver/src/ft.cpp +++ b/receiver/src/ft.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include "ft.h" #include "log.h" @@ -477,8 +478,27 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in if (reason == "complete" && rec_file_cnt != file_len) json_object_set_string_member(j_object, "result", "failure"); - else + else { + int complete_flags = 0; + if (vconf_get_int(VCONFKEY_STICKER_SYNC_COMPLETE, &complete_flags) == 0) { + if (sticker_data.group == string("arsticker")) + complete_flags |= 0x1; + else if (sticker_data.group == string("bitmoji")) + complete_flags |= 0x2; + + LOGD("sync complete flag : %x", complete_flags); + + if (vconf_set_int(VCONFKEY_STICKER_SYNC_COMPLETE, complete_flags) == 0) + LOGD("Succeed to set sync complete"); + else + LOGW("Fail to set sync complete"); + } + else { + LOGW("Failed to get sticker sync flags"); + } + json_object_set_string_member(j_object, "result", "success"); + } if (_send_json_data(j_object) == FALSE) LOGE("Failed to send message");