#define ACCESSORY_SERVICE_CHANNEL_ID 107
#define SYNC_INTERVAL 12*60*60
+#define MAX_WAIT_TIME 48*60*60
#define REMOTE_APP_ID "com.samsung.w-input-selector"
#define MESSAGE_PORT_REMOTE_NAME REMOTE_APP_ID"_msg_port_rcv"
bool request_sticker_data(const char *mode, const char *category, const char *type);
void request_sticker_feature();
void send_disconnect_message();
+void request_show_sync_notification();
bool get_job_progress();
#define STICKER_SYNC_FEATURE_REQ "sticker-sync-feature-req"
#define STICKER_SYNC_FEATURE_RSP "sticker-sync-feature-rsp"
#define STICKER_REQUEST_SYNC_REQ "sticker-request-sync-req"
+#define STICKER_REQUEST_NOTI_REQ "sticker-request-noti-req"
#define STICKER_SYNC_START_REQ "sticker-sync-start-req"
#define STICKER_SYNC_START_RSP "sticker-sync-start-rsp"
#define STICKER_SEND_START_REQ "sticker-send-start-req"
json_object_unref(j_object);
}
+void request_show_sync_notification()
+{
+ JsonObject *j_object = NULL;
+ j_object = json_object_new();
+ if (j_object == NULL) {
+ LOGE("json object create error");
+ return;
+ }
+
+ json_object_set_string_member(j_object, "msgId", STICKER_REQUEST_NOTI_REQ);
+ json_object_set_int_member(j_object, "tID", ++t_id);
+
+ if (_send_json_data(j_object) == FALSE) {
+ LOGE("Failed to send STICKER_REQUEST_NOTI_REQ");
+ }
+
+ json_object_unref(j_object);
+}
+
void reject_file()
{
int ret = sap_file_transfer_reject(priv_data.file_socket);
// compare time
LOGD("current time : %f, last_sync_time : %f", ecore_time_get(), last_sync_time);
- if (ecore_time_get() - last_sync_time > SYNC_INTERVAL)
- result = true;
- else
+
+ if (ecore_time_get() - last_sync_time > MAX_WAIT_TIME) {
+ request_show_sync_notification();
result = false;
+ } else {
+ if (ecore_time_get() - last_sync_time > SYNC_INTERVAL)
+ result = true;
+ else
+ result = false;
+ }
}
else
{