wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Callhistory / CallHistoryFilter.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 2b6bb8a..45f2e3c
 // limitations under the License.
 //
 
-
-#include <dpl/log/log.h>
 #include <iomanip>
-
 #include "CallHistoryDefine.h"
 #include "CallHistoryFilter.h"
+#include <Logger.h>
 
 using namespace std;
 using namespace DeviceAPI::Tizen;
@@ -45,30 +43,30 @@ CallHistoryFilter::~CallHistoryFilter()
 
 void CallHistoryFilter::visitPreComposite(FilterType& type, int depth)
 {
-       LogDebug(" type [" << type << "] depth[" << depth << "]");
+       LoggerD(" type [" << type << "] depth[" << depth << "]");
        contacts_filter_h filter = NULL;
        contacts_filter_create(_contacts_phone_log._uri, &filter);
        if (filter != NULL) {
                m_filterStack.push(filter);
        }
-       LogDebug("filter stack size [" << m_filterStack.size() << "]");
+       LoggerD("filter stack size [" << m_filterStack.size() << "]");
 }
 
 void CallHistoryFilter::visitInComposite(FilterType& type, int depth)
 {
-       LogDebug("type [" << type << "] depth[" << depth << "]");
+       LoggerD("type [" << type << "] depth[" << depth << "]");
        contacts_filter_h filter = m_filterStack.top();
        if(type == DeviceAPI::Tizen::UNION_FILTER)
                contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
        else if(type == DeviceAPI::Tizen::INTERSECTION_FILTER)
                contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_AND);
 
-       LogDebug("filter stack size [" << m_filterStack.size() << "]");
+       LoggerD("filter stack size [" << m_filterStack.size() << "]");
 }
 
 void CallHistoryFilter::visitPostComposite(FilterType& type, int depth)
 {
-       LogDebug(" type [" << type << "] depth[" << depth << "]");
+       LoggerD(" type [" << type << "] depth[" << depth << "]");
        contacts_filter_h filter = m_filterStack.top();
        if (m_filterStack.size() > 1) {
                m_filterStack.pop();
@@ -76,7 +74,7 @@ void CallHistoryFilter::visitPostComposite(FilterType& type, int depth)
                contacts_filter_add_filter(filterParent, filter);
                contacts_filter_destroy(filter);
        }
-       LogDebug("filter stack size [" << m_filterStack.size() << "]");
+       LoggerD("filter stack size [" << m_filterStack.size() << "]");
 }
 
 void CallHistoryFilter::visitAttribute(std::string& attrName, MatchFlag& matchFlag, DeviceAPI::Tizen::AnyPtr& matchValue, int depth)
@@ -88,7 +86,7 @@ void CallHistoryFilter::visitAttribute(std::string& attrName, MatchFlag& matchFl
                return;
        }
 
-       LogDebug("attrName [" << attrName << "] matchValue[" << matchValue->toString() << "] depth[" << depth << "]");
+       LoggerD("attrName [" << attrName << "] matchValue[" << matchValue->toString() << "] depth[" << depth << "]");
        contacts_filter_h filter = m_filterStack.top();
        contacts_filter_h subFilter = NULL;
        contacts_filter_create(_contacts_phone_log._uri, &subFilter);
@@ -218,7 +216,7 @@ void CallHistoryFilter::visitAttributeRange(std::string& attrName, AnyPtr& initi
        if(initialValue == NULL || endValue == NULL)
                return;
 
-       LogDebug("attrName [" << attrName << "] initialValue[" << initialValue->toString() << "] endValue[" << endValue->toString() << "] depth[" << depth <<"]");
+       LoggerD("attrName [" << attrName << "] initialValue[" << initialValue->toString() << "] endValue[" << endValue->toString() << "] depth[" << depth <<"]");
        contacts_filter_h filter = m_filterStack.top();
        
        unsigned int propertyId = 0;
@@ -247,7 +245,7 @@ void CallHistoryFilter::visitAttributeRange(std::string& attrName, AnyPtr& initi
                                iValue = atoi(initialValue->getString().c_str());
                        }
                }
-               LogDebug("attrName [" << attrName << "] initialValue[" << initialValue->toString() << "] iValue[" << iValue << "]");
+               LoggerD("attrName [" << attrName << "] initialValue[" << initialValue->toString() << "] iValue[" << iValue << "]");
        }
 
        if (!endValue->isNullOrUndefined()) {
@@ -258,7 +256,7 @@ void CallHistoryFilter::visitAttributeRange(std::string& attrName, AnyPtr& initi
                                eValue = atoi(endValue->getString().c_str());
                        }
                }
-               LogDebug("attrName [" << attrName << "] endValue[" << endValue->toString() << "] eValue[" << eValue << "]");
+               LoggerD("attrName [" << attrName << "] endValue[" << endValue->toString() << "] eValue[" << eValue << "]");
        }
 
        contacts_filter_h subFilter = NULL;
@@ -292,7 +290,7 @@ void CallHistoryFilter::visitAttributeRange(std::string& attrName, AnyPtr& initi
 
 contacts_filter_h CallHistoryFilter::getResult() const
 {
-       LogDebug("filter stack size [" << m_filterStack.size() << "]");
+       LoggerD("filter stack size [" << m_filterStack.size() << "]");
        contacts_filter_h filter = m_filterStack.top();
        return filter;
 }