*/
#include "ContactObjectP2AConverter.h"
-
#include <vector>
#include <pcrecpp.h>
-#include <dpl/log/log.h>
#include <Commons/Exception.h>
#include <Commons/Regex.h>
#include "AddressBook.h"
#include "Contact.h"
#include "ContactUtility.h"
+#include <Logger.h>
namespace DeviceAPI {
namespace Contact {
ContactPtr ContactObjectP2AConverter::getAbstractContact()
{
- //LogDebug("enter");
+ //LoggerD("enter");
if(m_platformContact == NULL)
{
- LogError("Platform contact object did not set");
+ LoggerE("Platform contact object did not set");
ThrowMsg(InvalidArgumentException, "Platform contact object did not set");
}
if(m_abstractContact == NULL)
{
- //LogDebug("Abstract contact object did not set, so a new object has been created");
+ //LoggerD("Abstract contact object did not set, so a new object has been created");
m_abstractContact = ContactPtr(new Contact());
}
- //LogDebug("for scratch : " << m_forScratch);
+ //LoggerD("for scratch : " << m_forScratch);
Try
{
}
Catch(Exception)
{
- LogError("Error while converting - " << _rethrown_exception.GetMessage());
+ LoggerE("Error while converting - " << _rethrown_exception.GetMessage());
ThrowMsg(PlatformException, "Fail to convert platform object to abstract object.");
}
bool isFavorite = false;
errorCode = contacts_record_get_bool(m_platformContact, _contacts_contact.is_favorite, &isFavorite);
if(errorCode != CONTACTS_ERROR_NONE)
- LogError("contacts_record_get_bool returned " << errorCode);
+ LoggerE("contacts_record_get_bool returned " << errorCode);
m_abstractContact->setIsFavorite(isFavorite);
}
if(child_record == NULL || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have name value");
+ //LoggerD("Platform contact don't have name value");
ContactNamePtr contactName = m_abstractContact->getName();
if(contactName != NULL)
{
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have company list");
+ //LoggerD("Platform contact don't have company list");
return;
}
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have note list");
+ //LoggerD("Platform contact don't have note list");
return;
}
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have number list");
+ //LoggerD("Platform contact don't have number list");
return;
}
}
else
{
- //LogDebug("Platform contact have a empty phone number");
+ //LoggerD("Platform contact have a empty phone number");
continue;
}
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have email list");
+ //LoggerD("Platform contact don't have email list");
return;
}
}
else
{
- //LogDebug("Platform contact have a empty email address");
+ //LoggerD("Platform contact have a empty email address");
continue;
}
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have group list");
+ //LoggerD("Platform contact don't have group list");
return;
}
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have group list");
+ //LoggerD("Platform contact don't have group list");
return;
}
Try {
tmDate = ContactUtility::toDateTmFromDateDbInt(intValueDate);
} Catch(Exception) {
- LogError("date has wrong value");
+ LoggerE("date has wrong value");
}
contacts_record_get_int(child_record, _contacts_event.type, &intValueType);
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have address list");
+ //LoggerD("Platform contact don't have address list");
return;
}
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have address list");
+ //LoggerD("Platform contact don't have address list");
return;
}
if(child_count == 0 || errorCode == CONTACTS_ERROR_NO_DATA)
{
- //LogDebug("Platform contact don't have nickname list");
+ //LoggerD("Platform contact don't have nickname list");
return;
}