+wrt-plugins-tizen (0.2.75) unstable; urgency=low
+
+ * Bug fix on Messaging, Download, Systeminfo and Contact
+ * Git : slp/pkgs/w/wrt-plugins-tizen
+ * Tag : wrt-plugins-tizen_0.2.74
+
+ -- Kisub Song <kisubs.song@samsung.com> Sat, 01 Sep 2012 00:10:05 +0900
+
wrt-plugins-tizen (0.2.74) unstable; urgency=low
* Bug fix on Messaging
Name: wrt-plugins-tizen
Summary: JavaScript plugins for WebRuntime
-Version: 0.2.74
+Version: 0.2.75
Release: 0
Group: TO_BE_FILLED
License: TO_BE_FILLED
eventPtr->setDownloadState(TIZEN_ENUM_DOWNLOAD_STATE_QUEUED);
eventPtr->setResult(true);
- thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ if (thisDownloadManager->m_changeEmitters[download]) {
+ thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ }
}
Catch (Exception)
{
eventPtr->setDownloadState(TIZEN_ENUM_DOWNLOAD_STATE_PAUSED);
eventPtr->setResult(true);
- thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ if (thisDownloadManager->m_changeEmitters[download]) {
+ thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ }
}
Catch (Exception)
{
eventPtr->setDownloadState(TIZEN_ENUM_DOWNLOAD_STATE_COMPLETED);
eventPtr->setResult(true);
- thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ if (thisDownloadManager->m_changeEmitters[download]) {
+ thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ }
thisDownloadManager->m_changeEmitters.erase(download);
ret = url_download_destroy(download);
eventPtr->setExceptionCode(ExceptionCodes::UnknownException);
}
- thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ if (thisDownloadManager->m_changeEmitters[download]) {
+ thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ }
thisDownloadManager->m_changeEmitters.erase(download);
ret = url_download_destroy(download);
eventPtr->setTotalSize(total);
eventPtr->setResult(true);
- thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ if (thisDownloadManager->m_changeEmitters[download]) {
+ thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+ }
}
Catch (Exception)
{
}
}
- if(event->getEmitter()) {
- ret = url_download_set_started_cb(download, on_url_download_started, this);
- if (ret != URL_DOWNLOAD_ERROR_NONE) {
- ThrowMsg(PlatformException, "Platform error while setting started cb: "<<ret);
- }
- ret = url_download_set_paused_cb(download, on_url_download_paused, this);
- if (ret != URL_DOWNLOAD_ERROR_NONE) {
- ThrowMsg(PlatformException, "Platform error while setting paused cb: "<<ret);
- }
- ret = url_download_set_stopped_cb(download, on_url_download_stopped, this);
- if (ret != URL_DOWNLOAD_ERROR_NONE) {
- ThrowMsg(PlatformException, "Platform error while setting stopped cb: "<<ret);
- }
- ret = url_download_set_completed_cb(download, on_url_download_completed, this);
- if (ret != URL_DOWNLOAD_ERROR_NONE) {
- ThrowMsg(PlatformException, "Platform error while setting completed cb: "<<ret);
- }
- ret = url_download_set_progress_cb(download, on_url_download_progress, this);
- if (ret != URL_DOWNLOAD_ERROR_NONE) {
- ThrowMsg(PlatformException, "Platform error while setting progress cb: "<<ret);
- }
+ ret = url_download_set_started_cb(download, on_url_download_started, this);
+ if (ret != URL_DOWNLOAD_ERROR_NONE) {
+ ThrowMsg(PlatformException, "Platform error while setting started cb: "<<ret);
+ }
+ ret = url_download_set_paused_cb(download, on_url_download_paused, this);
+ if (ret != URL_DOWNLOAD_ERROR_NONE) {
+ ThrowMsg(PlatformException, "Platform error while setting paused cb: "<<ret);
+ }
+ ret = url_download_set_stopped_cb(download, on_url_download_stopped, this);
+ if (ret != URL_DOWNLOAD_ERROR_NONE) {
+ ThrowMsg(PlatformException, "Platform error while setting stopped cb: "<<ret);
+ }
+ ret = url_download_set_completed_cb(download, on_url_download_completed, this);
+ if (ret != URL_DOWNLOAD_ERROR_NONE) {
+ ThrowMsg(PlatformException, "Platform error while setting completed cb: "<<ret);
+ }
+ ret = url_download_set_progress_cb(download, on_url_download_progress, this);
+ if (ret != URL_DOWNLOAD_ERROR_NONE) {
+ ThrowMsg(PlatformException, "Platform error while setting progress cb: "<<ret);
}
ret = url_download_start(download, &id);
LogError("Wrong priority");
Throw(WrtDeviceApis::Commons::PlatformException);
}
+ LogInfo("priority : " << priority);
+
if (MSG_SUCCESS !=
-// msg_set_priority_info(m_messageData, MSG_MESSAGE_PRIORITY_LOW)) {
msg_set_int_value(m_messageData, MSG_MESSAGE_PRIORITY_INT, priority)){
LogError("Error during setting priority");
}
LogDebug("adding to[" << i << "]=" << to[i]);
+ msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+
if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT,
MSG_RECIPIENTS_TYPE_TO) != MSG_SUCCESS)
{
}
LogDebug("adding cc[" << i << "]=" << cc[i]);
+ msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+
if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT,
MSG_RECIPIENTS_TYPE_CC) != MSG_SUCCESS)
{
}
LogDebug("adding bcc[" << i << "]=" << bcc[i]);
+ msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+
if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT,
MSG_RECIPIENTS_TYPE_BCC) != MSG_SUCCESS)
{
// msg_get_int_value(request_data, MSG_REQUEST_REQUESTID_INT, &tempInt);
int status = MSG_NETWORK_SEND_FAIL;
msg_get_int_value(sent_status, MSG_SENT_STATUS_NETWORK_STATUS_INT, &status);
+
+ LogDebug("status : " << status);
+
if (MSG_NETWORK_SEND_SUCCESS == status) {
- LogDebug("sending ok");
- setSendingStatusOk();
- setMessageStatus(MESSAGE_STATUS_SENT);
- } else {
- LogError("sending failed: " <<
- static_cast<unsigned int>(status));
- setSendingStatusFailed();
- setMessageStatus(MESSAGE_STATUS_FAILED);
- }
+ LogDebug("sending ok");
+ setSendingStatusOk();
+ setMessageStatus(MESSAGE_STATUS_SENT);
+ } else {
+ LogError("sending failed: " << static_cast<unsigned int>(status));
+ setSendingStatusFailed();
+ setMessageStatus(MESSAGE_STATUS_FAILED);
+ }
}
void Mms::sendCancel(int handle)
else
{
ReqReceiverMessage *requestReceiver = getRequestReceiver();
+ EventMessagingServicePtr event = getMessagingServiceEvent();
if (requestReceiver)
{
LogError("calling JS error callback");
- EventSendMessagePtr event = getSendMessageEvent();
event->setExceptionCode(WrtDeviceApis::Commons::ExceptionCodes::UnknownException);
-
msg_get_list_handle(m_messageData, MSG_MESSAGE_ADDR_LIST_STRUCT, (void **)&addr_list);
-
nToCnt = addr_list->nCount;
-
+
+ LogDebug("nToCnt : " << nToCnt);
+
for ( int index=0; index < nToCnt; index++)
{
msg_get_str_value(addr_list->msg_struct_info[index], MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, strNumber, MAX_ADDRESS_VAL_LEN);
event->m_failRecipients.push_back(strNumber);
}
}
+ requestReceiver->WrtDeviceApis::Commons::EventRequestReceiver< EventMessagingService >::ManualAnswer(event);
}
}
void Sms::updateTo()
{
// check if abstraction recipient value has been changed
- if (getToRecipients().isValid()) {
- return;
- }
+ if (getToRecipients().isValid()) {
+ return;
+ }
LogInfo("SMS updating platform recipients");
- // reset addresses in platform structure
-// msg_reset_address(m_messageData);
msg_struct_list_s *addr_list = NULL;
msg_get_list_handle(m_messageData, MSG_MESSAGE_ADDR_LIST_STRUCT, (void **)&addr_list);
int nToCnt = addr_list->nCount;
LogInfo("nToCnt size " << nToCnt);
-
- if (nToCnt > 0)
- {
- for (int i = 0; i < nToCnt; i++) {
+
+ if (nToCnt > 0)
+ {
+ for (int i = 0; i < nToCnt; i++) {
msg_set_str_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, "", 0);
msg_set_str_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_DISPLAYNAME_STR, "", 0);
msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
addr_list->nCount = nToCnt;
}
- vector<string> to = getToRecipients().getRecipients();
+ vector<string> to = getToRecipients().getRecipients();
// update addresses in platform structure
- if (to.size())
+ if (to.size())
{
- LogInfo("updating to");
- for (size_t i = 0; i < to.size(); i++)
+ LogInfo("updating to");
+ for (size_t i = 0; i < to.size(); i++)
{
string tmpAddr = to[i];
if(validatePhoneNumber(tmpAddr))
{
- if (i >= MAX_TO_ADDRESS_CNT)
+ if (i >= MAX_TO_ADDRESS_CNT)
{
- LogError("max number of recipient exceeded");
- break;
- }
- LogDebug("adding to[" << i << "]=" << to[i]);
-
- if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT,
- MSG_RECIPIENTS_TYPE_TO) != MSG_SUCCESS)
+ LogError("max number of recipient exceeded");
+ break;
+ }
+ LogDebug("adding to[" << i << "]=" << to[i]);
+
+ msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+
+ if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT,
+ MSG_RECIPIENTS_TYPE_TO) != MSG_SUCCESS)
{
LogError("problem with adding to address");
ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Problem with adding to address");
}
- if(msg_set_str_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_VALUE_STR,
- const_cast<char*>(to[i].c_str()), to[i].size()) != MSG_SUCCESS)
+ if(msg_set_str_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_VALUE_STR,
+ const_cast<char*>(to[i].c_str()), to[i].size()) != MSG_SUCCESS)
{
LogError("problem with adding to address");
ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Problem with adding to address");
addr_list->nCount ++;
LogDebug("addr_list->nCount =" << addr_list->nCount);
- }
+ }
else
{
- LogError("wrong phone number format");
+ LogError("wrong phone number format");
}
- }
- }
+ }
+ }
+
+ setToValidity(true);
- setToValidity(true);
-
}
void Sms::updateFrom()
std::ifstream file("/usr/etc/info.ini");
std::string line;
std::string result = "";
- std::string result2 = "";
if(!file) {
LogDebug("version info file not found");
} else {
while ((std::getline(file, line).rdstate() & (std::ifstream::failbit | std::ifstream::eofbit)) == 0) {
- if (pcrecpp::RE("Build=(\\w+)-(\\w+)").PartialMatch(line, &result, &result2)) {
- device->version = result + "-" + result2;
+ if (pcrecpp::RE("Build=(\\w+)").PartialMatch(line, &result)) {
+ device->version = result;
LogDebug("version : " << device->version);
break;
}