From: Sangkoo Kim Date: Mon, 6 Apr 2015 13:28:18 +0000 (+0900) Subject: 3.0 migration X-Git-Tag: submit/tizen_mobile/20150406.133152^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b36005c74c6950787283ff531c22af2400a867dc;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git 3.0 migration Change-Id: I062afeca56ac25ca31de6653ede0c4464198f2b9 Signed-off-by: Sangkoo Kim --- diff --git a/framework/storage-handler/MsgStorageManager.cpp b/framework/storage-handler/MsgStorageManager.cpp index 7856c2c..5abbfaa 100755 --- a/framework/storage-handler/MsgStorageManager.cpp +++ b/framework/storage-handler/MsgStorageManager.cpp @@ -616,7 +616,7 @@ msg_error_t MsgStoUpdateMms(MSG_MESSAGE_INFO_S *pMsg) dbHandle->bindText(pMsg->thumbPath, 1); - if (pMsg->msgText[0] != '\0' && g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == true) { + if (pMsg->msgText[0] != '\0' && g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == true) { dbHandle->bindText(pFileData, 2); } diff --git a/framework/storage-handler/MsgStorageMessage.cpp b/framework/storage-handler/MsgStorageMessage.cpp index aec844c..086d278 100755 --- a/framework/storage-handler/MsgStorageMessage.cpp +++ b/framework/storage-handler/MsgStorageMessage.cpp @@ -129,7 +129,7 @@ msg_error_t MsgStoAddMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S *pS snprintf(sqlQuery, sizeof(sqlQuery), "INSERT INTO %s VALUES (%d, %d, %d, %d, %d, %d, %u, %d, %d, %d, %d, %d, %d, %d, %d, ?, '', '', ?, 0, %d, '%s');", MSGFW_MESSAGE_TABLE_NAME, rowId, convId, pMsg->folderId, pMsg->storageId, pMsg->msgType.mainType, pMsg->msgType.subType, (unsigned int)pMsg->displayTime, pMsg->dataSize, pMsg->networkStatus, pMsg->bRead, pMsg->bProtected, pMsg->priority, pMsg->direction, - 0, pMsg->bBackup, pMsg->sim_idx, imsi); + 0, pMsg->bBackup, (int)pMsg->sim_idx, imsi); MSG_DEBUG("QUERY : %s", sqlQuery); @@ -412,7 +412,7 @@ msg_error_t MsgStoUpdateMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S BACKUP = %d, SUBJECT = ?, MSG_TEXT = ? \ WHERE MSG_ID = %d;", MSGFW_MESSAGE_TABLE_NAME, convId, pMsg->folderId, pMsg->storageId, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->displayTime, pMsg->dataSize, - pMsg->networkStatus, pMsg->bRead, pMsg->bProtected, pMsg->priority, pMsg->direction, pMsg->bBackup, pMsg->msgId); + pMsg->networkStatus, pMsg->bRead, pMsg->bProtected, pMsg->priority, pMsg->direction, pMsg->bBackup, (int)pMsg->msgId); if (dbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) { dbHandle->endTrans(false); @@ -2832,7 +2832,7 @@ msg_error_t MsgStoRestoreMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S snprintf(sqlQuery, sizeof(sqlQuery), "INSERT INTO %s VALUES (%d, %d, %d, %d, %d, %d, %ld, %d, %d, %d, %d, %d, %d, 0, %d, ?, '', '', ?, 0, %d, '%s');", MSGFW_MESSAGE_TABLE_NAME, rowId, pMsg->threadId, pMsg->folderId, pMsg->storageId, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->displayTime, pMsg->dataSize, pMsg->networkStatus, pMsg->bRead, pMsg->bProtected, pMsg->priority, pMsg->direction, - pMsg->bBackup, pMsg->sim_idx, imsi); + pMsg->bBackup, (int)pMsg->sim_idx, imsi); MSG_DEBUG("QUERY : %s", sqlQuery); diff --git a/framework/storage-handler/MsgStorageMms.cpp b/framework/storage-handler/MsgStorageMms.cpp index 237766f..f11cb7c 100755 --- a/framework/storage-handler/MsgStorageMms.cpp +++ b/framework/storage-handler/MsgStorageMms.cpp @@ -85,7 +85,7 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg) if( pMsg->networkStatus == MSG_NETWORK_RETRIEVE_SUCCESS ) { snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET MAIN_TYPE = %d, SUB_TYPE = %d, FOLDER_ID = %d, DISPLAY_TIME = %lu, SUBJECT = ?, NETWORK_STATUS = %d, MSG_TEXT = ?, THUMB_PATH = '%s', DATA_SIZE = %d WHERE MSG_ID = %d;", - MSGFW_MESSAGE_TABLE_NAME, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->folderId, pMsg->displayTime, pMsg->networkStatus, pMsg->thumbPath, pMsg->dataSize, pMsg->msgId); + MSGFW_MESSAGE_TABLE_NAME, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->folderId, pMsg->displayTime, pMsg->networkStatus, pMsg->thumbPath, pMsg->dataSize, (int)pMsg->msgId); if (dbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) { return MSG_ERR_DB_PREPARE; @@ -93,7 +93,7 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg) dbHandle->bindText(pMsg->subject, 1); - if (pMsg->msgText[0] != '\0' && g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == true) { + if (pMsg->msgText[0] != '\0' && g_file_get_contents((const gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == true) { dbHandle->bindText(pFileData, 2); } else { dbHandle->bindText("", 2); @@ -109,13 +109,13 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg) } // if (MsgOpenAndReadFile(pMsg->msgText, &pFileData, &fileSize) == false) { - if (g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == false) { + if (g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == false) { return MSG_ERR_STORAGE_ERROR; } dbHandle->bindText(pMsg->subject, 1); - if (pMsg->msgText[0] != '\0' && g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == true) { + if (pMsg->msgText[0] != '\0' && g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == true) { dbHandle->bindText(pFileData, 2); } else { dbHandle->bindText("", 2); @@ -124,13 +124,13 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg) } else if (pMsg->msgType.subType == MSG_SENDREQ_MMS || pMsg->msgType.subType == MSG_RETRIEVE_MMS) { snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET MSG_TEXT = ?, THUMB_PATH = '%s', DATA_SIZE = %d WHERE MSG_ID = %d;", - MSGFW_MESSAGE_TABLE_NAME, pMsg->thumbPath, pMsg->dataSize, pMsg->msgId); + MSGFW_MESSAGE_TABLE_NAME, pMsg->thumbPath, pMsg->dataSize, (int)pMsg->msgId); if (dbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) { return MSG_ERR_DB_PREPARE; } - if (pMsg->msgText[0] != '\0' && g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == true) { + if (pMsg->msgText[0] != '\0' && g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == true) { dbHandle->bindText(pFileData, 1); } else { dbHandle->bindText("", 1); diff --git a/plugin/mms_plugin/MmsPluginHttp.cpp b/plugin/mms_plugin/MmsPluginHttp.cpp index 3028e1c..b2a7dab 100755 --- a/plugin/mms_plugin/MmsPluginHttp.cpp +++ b/plugin/mms_plugin/MmsPluginHttp.cpp @@ -726,7 +726,7 @@ MMS_HTTP_ERROR_E MmsPluginHttpAgent::httpRequest(http_request_info_s &request_in fclose(respfile); respfile = NULL; - if (g_file_get_contents(conf_filename, &request_info.response_data, &request_info.response_data_len, NULL) == false) { + if (g_file_get_contents(conf_filename, &request_info.response_data, (gsize*)&request_info.response_data_len, NULL) == false) { MSG_WARN("Fail to g_file_get_contents"); } } diff --git a/plugin/sms_plugin/SmsPluginCallback.cpp b/plugin/sms_plugin/SmsPluginCallback.cpp index 202c8be..e0fa5c6 100755 --- a/plugin/sms_plugin/SmsPluginCallback.cpp +++ b/plugin/sms_plugin/SmsPluginCallback.cpp @@ -1253,7 +1253,7 @@ void TapiEventNetworkStatusChange(TapiHandle *handle, const char *noti_id, void TelNetworkServiceType_t *type = (TelNetworkServiceType_t *)data; - MSG_INFO("network status type [%d], simIndex [%d]", *type, (int)user_data); + MSG_INFO("network status type [%d]", *type); if (*type > TAPI_NETWORK_SERVICE_TYPE_SEARCH) { SmsPluginEventHandler::instance()->handleResendMessage(); // Call Event Handler @@ -1322,7 +1322,7 @@ void SmsPluginCallback::registerEvent() MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_NOTI_SAT_MO_SM_CONTROL_RESULT); if (tel_register_noti_event(pTapiHandle, TAPI_NOTI_SIM_STATUS, TapiEventSimStatusChange, NULL) != TAPI_API_SUCCESS) MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_NOTI_SIM_STATUS); - if (tel_register_noti_event(pTapiHandle, TAPI_PROP_NETWORK_SERVICE_TYPE, TapiEventNetworkStatusChange, (void*)simIndex) != TAPI_API_SUCCESS) + if (tel_register_noti_event(pTapiHandle, TAPI_PROP_NETWORK_SERVICE_TYPE, TapiEventNetworkStatusChange, NULL) != TAPI_API_SUCCESS) MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_PROP_NETWORK_SERVICE_TYPE); if (tel_register_noti_event(pTapiHandle, TAPI_NOTI_SIM_REFRESHED, TapiEventSimRefreshed, NULL) != TAPI_API_SUCCESS) MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_NOTI_SIM_REFRESHED); diff --git a/plugin/sms_plugin/SmsPluginStorage.cpp b/plugin/sms_plugin/SmsPluginStorage.cpp index 0977ea4..33eafa4 100755 --- a/plugin/sms_plugin/SmsPluginStorage.cpp +++ b/plugin/sms_plugin/SmsPluginStorage.cpp @@ -768,7 +768,7 @@ void* SmsPluginStorage::class2_thread(void *data) } MSG_END(); - return (void *)err; + return NULL; } diff --git a/plugin/sms_plugin/SmsPluginWapPushHandler.cpp b/plugin/sms_plugin/SmsPluginWapPushHandler.cpp index e568313..5e47956 100755 --- a/plugin/sms_plugin/SmsPluginWapPushHandler.cpp +++ b/plugin/sms_plugin/SmsPluginWapPushHandler.cpp @@ -3401,11 +3401,11 @@ void SmsPluginWapPushHandler::wspHeaderDecodeAuth(unsigned long fieldValueLen, u /* skip 'basic' code */ iField++; memset(authStr, 0x00, sizeof(authStr)); - snprintf(authStr, sizeof(authStr), "%%%ds", sizeof(userId)); + snprintf(authStr, sizeof(authStr), "%%%lus", sizeof(userId)); sscanf((char*)(fieldValue + iField), authStr, userId ); iField = iField + AcStrlen( (char*)userId ) + 1; memset(authStr, 0x00, sizeof(authStr)); - snprintf(authStr, sizeof(authStr), "%%%ds", sizeof(passWd)); + snprintf(authStr, sizeof(authStr), "%%%lus", sizeof(passWd)); sscanf( (char*)(fieldValue + iField), authStr, passWd ); iField = iField + AcStrlen( (char*)userId ) + 1; snprintf( (char*)*pDecodedString, (sizeof(char)*WSP_STANDARD_STR_LEN_MAX*2), "basic %s/%s", userId, passWd ); @@ -3430,7 +3430,7 @@ void SmsPluginWapPushHandler::wspHeaderDecodeChallenge(unsigned long fieldValueL /* skip 'basic' code */ iField++; memset(authStr, 0x00, sizeof(authStr)); - snprintf(authStr, sizeof(authStr), "%%%ds", sizeof(userId)); + snprintf(authStr, sizeof(authStr), "%%%lus", sizeof(userId)); sscanf( (char*)(fieldValue + iField), authStr, userId ); iField = iField + AcStrlen( (char*)userId ) + 1;