*/
se_error_type_e cancel_sync_request();
+/**
+ * @par Description: API to set profile_id during sync session
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+se_error_type_e set_sync_profile_id(int profile_id);
+
+/**
+ * @par Description: API to get profile_id during sync session
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ *
+ * @return integer type profile_id
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+se_error_type_e get_sync_profile_id(int *profile_id);
+
#endif /* SYNCENGINE_H_ */
{
_EXTERN_FUNC_ENTER;
- bool success = false;
+ se_error_type_e err = SE_INTERNAL_OK;
+ bool success = true;
+/*
request_msg_info_t *pMsg_info = NULL;
GList *iter = NULL;
if (pMsg_info->sync_type == SYNC_MODE_MANUAL || pMsg_info->sync_type == SYNC_MODE_PERIODIC || pMsg_info->sync_type == SYNC_MODE_SAN) {
success = true;
+ _DEBUG_INFO("profile_id : [%d]", pMsg_info->profile_id);
*pProfile_id = pMsg_info->profile_id;
sync_request_id_list = g_list_first(sync_request_id_list);
}
}
+*/
+ err = get_sync_profile_id(pProfile_id);
+ if (err != SE_INTERNAL_OK) {
+ _DEBUG_ERROR("get_sync_profile_id failed!!");
+ }
+
_EXTERN_FUNC_EXIT;
return success;
}
static se_error_type_e _open_services();
static se_error_type_e _close_services();
+static int sync_profile_id = 0;
+
static inline long myclock()
{
struct timeval tv;
alert_type_e server_sync_type = ALERT_UNKNOWN;
int only_from_client = 0;
+ err = set_sync_profile_id(account_id);
+ if (err != SE_INTERNAL_OK) {
+ _DEBUG_ERROR("set_sync_profile_id failed!!");
+ }
+
int session_time = sync_agent_convert_seconds_to_utc(time(NULL)); /*lastSessionTime for resultView; */
_DEBUG_INFO("session_time = %d", session_time);
_off_synchronising_account(account_id);
+ err = set_sync_profile_id(0);
+ if (err != SE_INTERNAL_OK) {
+ _DEBUG_ERROR("set_sync_profile_id failed!!");
+ }
+
_session_process(account_id, server_sync_type, process, error);
_DEBUG_INFO("server_sync_type = %d", server_sync_type);
_DEBUG_INFO("process = %d", process);
{
_EXTERN_FUNC_ENTER;
- if (account_id < 1) {\r
+ if (account_id < 1) {
_DEBUG_ERROR("account_id is invalid!!");
return false;
} else {
return err;
}
+
+se_error_type_e set_sync_profile_id(int profile_id)
+{
+ _EXTERN_FUNC_ENTER;
+
+ se_error_type_e err = SE_INTERNAL_OK;
+
+ _DEBUG_INFO("profile_id : [%d]", profile_id);
+ sync_profile_id = profile_id;
+
+ _EXTERN_FUNC_EXIT;
+
+ return err;
+}
+
+se_error_type_e get_sync_profile_id(int *profile_id)
+{
+ _EXTERN_FUNC_ENTER;
+
+ se_error_type_e err = SE_INTERNAL_OK;
+
+ _DEBUG_INFO("sync_profile_id : [%d]", sync_profile_id);
+ *profile_id = sync_profile_id;
+
+ _EXTERN_FUNC_EXIT;
+
+ return err;
+}
\ No newline at end of file