if (m_watchers.size() > 0) {
for (;it < CallHistory::m_watchers.end();) {
- //ret = contacts_db_remove_changed_cb(_contacts_phone_log._uri, callhistoryListenerCB, it->Get());
ret = contacts_db_remove_changed_cb_with_info(_contacts_phone_log._uri, callhistoryListenerCB, it->Get());
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory remove listener error [" << ret << "]");
+ LoggerD("Failed removing listener");
}
it = CallHistory::m_watchers.erase(it);
}
- LoggerD("CallHistory Watcher is removed. (" << CallHistory::m_watchers.size() << ")");
}
EventCallHistoryPtr event(new EventCallHistory());
for (;it < CallHistory::m_watchers.end();) {
- LoggerD("removeListener : id ["<<id<<"]");
- LoggerD("removeListener : handle() ["<<(*it)->getHandle()<<"]");
-
if (id == (*it)->getHandle()) {
flag = true;
ret = contacts_db_remove_changed_cb_with_info(_contacts_phone_log._uri, callhistoryListenerCB, it->Get());
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory remove listener error [" << ret << "]");
+ LoggerD("Failed removing listener");
}
it = CallHistory::m_watchers.erase(it);
}
if (!flag) {
- ThrowMsg(Commons::InvalidArgumentException, "Invalid values error : handle");
+ ThrowMsg(Commons::InvalidArgumentException, "Invalid values");
}
}
if (record == NULL) {
ret = contacts_list_next(*recordList);
if (ret != CONTACTS_ERROR_NONE && ret != CONTACTS_ERROR_NO_DATA) {
- LoggerD("callhistory parse error [" << ret << "]");
+ LoggerD("Failed callhistory parser");
return false;
} else {
continue;
ret = contacts_list_next(*recordList);
if (ret != CONTACTS_ERROR_NONE && ret != CONTACTS_ERROR_NO_DATA) {
- LoggerD("callhistory parse error [" << ret << "]");
+ LoggerD("Failed callhistory parser");
return false;
}
}
}
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory query error [" << ret << "]");
+ LoggerD("callhistory invalid query statement");
}
ret = contacts_db_get_records_with_query(query, offset, limit, &recordList);
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory query error [" << ret << "]");
+ LoggerD("Invalid query statement");
}
if (parseRecord(&recordList, callHistoryListPtr)) {
m_removeBatchEvent.push_back(eventData);
event->switchToManualAnswer();
} else {
- LoggerD("callhistory remove Batch error [" << ret << "]");
+ LoggerD("Failed callhistory remove Batch [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
} else {
ret = contacts_db_delete_records(_contacts_phone_log._uri, list, entryIds.size());
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory remove Batch error [" << ret << "]");
+ LoggerD("Failed callhistory remove Batch [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
}
contacts_list_get_count(record_list, &total);
list = new int[total];
- LoggerD("total [" << total << "]");
for (unsigned int i = 0; i < total; i++) {
ret = contacts_list_get_current_record_p(record_list, &record);
if (record == NULL) {
ret = contacts_list_next(record_list);
if ( !(ret==CONTACTS_ERROR_NONE || ret==CONTACTS_ERROR_NO_DATA) ){
- LoggerD("callhistory remove All error [" << ret << "]");
+ LoggerD("Failed callhistory remove all [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
continue;
value = 0;
ret = contacts_list_next(record_list);
if ( !(ret==CONTACTS_ERROR_NONE || ret==CONTACTS_ERROR_NO_DATA) ){
- LoggerD("callhistory remove All error [" << ret << "]");
+ LoggerD("Failed callhistory remove all [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
}
- LoggerD("cnt [" << cnt << "]");
-
if (cnt > 0) {
EventRemoveAllDataPtr eventData( new EventCallHistoryPtrs<EventRemoveAll>(event, this));
m_removeAllEvent.push_back(eventData);
event->switchToManualAnswer();
} else {
- LoggerD("callhistory remove All error [" << ret << "]");
+ LoggerD("Failed callhistory remove all [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
} else {
ret = contacts_db_delete_records(_contacts_phone_log._uri, list, cnt);
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory remove All error [" << ret << "]");
+ LoggerD("Failed callhistory remove all [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
}
for (it = m_removeBatchEvent.begin(); it != m_removeBatchEvent.end(); ++it) {
if ((*it)->getEventPtrs() == event) {
m_removeBatchEvent.erase(it);
- LoggerD("event is removed. (" << m_removeBatchEvent.size() << ")");
break;
}
}
for (it = m_removeAllEvent.begin(); it != m_removeAllEvent.end(); ++it) {
if ((*it)->getEventPtrs() == event) {
m_removeAllEvent.erase(it);
- LoggerD("event is removed. (" << m_removeAllEvent.size() << ")");
break;
}
}
while( tokenType != NULL )
{
tokenId = strtok( NULL, seps );
- LoggerD("[ %s / %s ]", tokenType , tokenId );
changeType = atoi((const char*)tokenType);
changeId = atoi((const char*)tokenId);
ret = contacts_query_set_sort(query, _contacts_phone_log.id, false);
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory query error [" << ret << "]");
+ LoggerD("Invalid callhistory query [" << ret << "]");
}
ret = contacts_db_get_records_with_query(query, 0, 1, &recordList);
contacts_list_destroy(recordList, true);
contacts_query_destroy(query);
contacts_filter_destroy(filter);
- LoggerD("callhistory query error [" << ret << "]");
+ LoggerD("Invalid callhistory query [" << ret << "]");
return;
}