static struct sticker_info sticker_data;
static struct sync_request pending_sync_request;
+enum {
+ SYNC_START_RSP_SUCCESS = 1000,
+ SYNC_START_RSP_NO_STICKER = 1001,
+ SYNC_START_RSP_EXIST_STICKER = 1002
+};
+
gboolean file_on_progress = 0;
static string incoming_file_name;
static int t_id = 0;
string result = string(json_result ? json_result : "");
int result_code = json_object_get_int_member(root_obj, "resultCode");
LOGD("result : %s, resultCode : %d", result.c_str(), result_code);
+
+ string response_to_app;
+ switch (result_code) {
+ case SYNC_START_RSP_SUCCESS:
+ case SYNC_START_RSP_EXIST_STICKER:
+ response_to_app = "success";
+ break;
+ case SYNC_START_RSP_NO_STICKER:
+ response_to_app = "no_sticker";
+ break;
+ default:
+ response_to_app = "unknown_error";
+ break;
+ }
+
+ send_message("sync_start_response", response_to_app.c_str());
} else if (msg_id == STICKER_SEND_START_REQ) {
LOGD("msg : %s", msg_id.c_str());
total_file_count = 0;
if (_send_json_data(j_object) == FALSE)
LOGE("Failed to send message");
+ send_message("sync_stop_result", reason.c_str());
+
json_object_unref(j_object);
} else
LOGW("unknown msg id : %s", msg_id.c_str());
int ret;
bool found = false;
+ LOGD("command: %s, data: %s", cmd, data);
+
message_port_check_remote_port(REMOTE_APP_ID, MESSAGE_PORT_REMOTE_NAME, &found);
if (!found) {
LOGW("Can't find remote port");
}
else
{
- LOGI("send message done");
+ LOGI("Succeed to send message.");
result = true;
}