wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Contact / ContactObjectP2AConverter.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 04c1c6b..c587be3
  */
 
 #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 {
@@ -64,21 +63,21 @@ ContactObjectP2AConverter::~ContactObjectP2AConverter()
 
 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
        {
@@ -87,7 +86,7 @@ ContactPtr ContactObjectP2AConverter::getAbstractContact()
        }
        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.");
        }
 
@@ -138,7 +137,7 @@ void ContactObjectP2AConverter::exportBaseInfoValue()
                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);
        }
 
@@ -191,7 +190,7 @@ void ContactObjectP2AConverter::exportNameValue()
 
        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)
                {
@@ -306,7 +305,7 @@ void ContactObjectP2AConverter::exportCompanyList()
 
        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;
        }
 
@@ -387,7 +386,7 @@ void ContactObjectP2AConverter::exportNoteList()
 
        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;
        }
 
@@ -423,7 +422,7 @@ void ContactObjectP2AConverter::exportNumberList()
 
        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;
        }
 
@@ -451,7 +450,7 @@ void ContactObjectP2AConverter::exportNumberList()
                }
                else
                {
-                       //LogDebug("Platform contact have a empty phone number");
+                       //LoggerD("Platform contact have a empty phone number");
                        continue;
                }
 
@@ -513,7 +512,7 @@ void ContactObjectP2AConverter::exportEmailList()
 
        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;
        }
 
@@ -541,7 +540,7 @@ void ContactObjectP2AConverter::exportEmailList()
                }
                else
                {
-                       //LogDebug("Platform contact have a empty email address");
+                       //LoggerD("Platform contact have a empty email address");
                        continue;
                }
 
@@ -581,7 +580,7 @@ void ContactObjectP2AConverter::exportGrouprelList()
 
        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;
        }
 
@@ -620,7 +619,7 @@ void ContactObjectP2AConverter::exportEventList()
 
        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;
        }
 
@@ -645,7 +644,7 @@ void ContactObjectP2AConverter::exportEventList()
                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);
@@ -690,7 +689,7 @@ void ContactObjectP2AConverter::exportPostalList()
 
        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;
        }
 
@@ -772,7 +771,7 @@ void ContactObjectP2AConverter::exportWebAddrList()
 
        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;
        }
 
@@ -837,7 +836,7 @@ void ContactObjectP2AConverter::exportNicknameList()
 
        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;
        }